From 8a8182944f78254a5fc7d10826227f5866ec443f Mon Sep 17 00:00:00 2001 From: michael1011 Date: Sat, 19 Aug 2023 18:17:57 +0200 Subject: [PATCH] feat: CLN integration in backend --- .github/workflows/ci.yml | 3 + .gitignore | 3 + docker/build.py | 2 +- docker/regtest/data/cln/config | 2 + docker/regtest/scripts/setup.sh | 2 + docker/regtest/startRegtest.sh | 9 +- lib/Boltz.ts | 63 +- lib/Config.ts | 2 + lib/VersionCheck.ts | 151 +- lib/api/Controller.ts | 15 +- lib/chain/ChainClient.ts | 14 +- lib/chain/ZmqClient.ts | 5 +- lib/consts/Enums.ts | 2 +- lib/db/Migration.ts | 34 +- lib/db/models/ReverseSwap.ts | 19 +- lib/lightning/ChannelUtils.ts | 26 + lib/lightning/ClnClient.ts | 693 + lib/lightning/Errors.ts | 14 +- lib/lightning/GrpcUtils.ts | 38 + lib/lightning/LightningClient.ts | 181 + lib/lightning/LndClient.ts | 355 +- lib/notifications/CommandHandler.ts | 11 +- lib/proto/cln/node_grpc_pb.d.ts | 3519 + lib/proto/cln/node_grpc_pb.js | 1761 + lib/proto/cln/node_pb.d.ts | 9752 +++ lib/proto/cln/node_pb.js | 62851 ++++++++++++++++ lib/proto/cln/primitives_grpc_pb.js | 1 + lib/proto/cln/primitives_pb.d.ts | 503 + lib/proto/cln/primitives_pb.js | 2719 + lib/proto/hold/hold_grpc_pb.d.ts | 476 + lib/proto/hold/hold_grpc_pb.js | 275 + lib/proto/hold/hold_pb.d.ts | 683 + lib/proto/hold/hold_pb.js | 3719 + lib/rates/data/DataAggregator.ts | 2 - lib/rates/data/exchanges/Poloniex.ts | 18 - lib/service/NodeInfo.ts | 38 +- lib/service/Service.ts | 55 +- lib/service/TimeoutDeltaProvider.ts | 42 +- lib/swap/ChannelNursery.ts | 39 +- lib/swap/LightningNursery.ts | 23 +- lib/swap/NodeSwitch.ts | 74 + lib/swap/PaymentHandler.ts | 39 +- lib/swap/RoutingHintsProvider.ts | 109 - lib/swap/SwapManager.ts | 45 +- lib/swap/SwapNursery.ts | 69 +- lib/swap/UtxoNursery.ts | 5 +- lib/swap/routing/RoutingHints.ts | 67 + lib/swap/routing/RoutingHintsLnd.ts | 91 + lib/wallet/WalletManager.ts | 6 +- lib/wallet/ethereum/ContractUtils.ts | 10 +- lib/wallet/providers/LndWalletProvider.ts | 10 +- package-lock.json | 578 +- package.json | 19 +- proto/cln/node.proto | 1700 + proto/cln/primitives.proto | 107 + protos.js | 44 +- test/integration/Nodes.ts | 20 + test/integration/Utils.spec.ts | 4 +- test/integration/lightning/ClnClient.spec.ts | 93 + .../lightning/LightningClient.spec.ts | 41 + test/integration/lightning/LndClient.spec.ts | 35 +- test/integration/rates/data/Exchanges.spec.ts | 8 - .../service/TimeoutDeltaProvider.spec.ts | 9 +- .../providers/LndWalletProvider.spec.ts | 5 +- test/unit/VersionCheck.spec.ts | 84 +- test/unit/api/Controller.spec.ts | 4 +- test/unit/lightning/ChannelUtils.spec.ts | 52 + .../unit/notifications/CommandHandler.spec.ts | 11 +- test/unit/notifications/ExampleSwaps.ts | 7 +- test/unit/service/NodeInfo.spec.ts | 72 +- test/unit/service/Service.spec.ts | 125 +- .../unit/service/TimeoutDeltaProvider.spec.ts | 74 +- test/unit/swap/ChannelNursery.spec.ts | 18 +- test/unit/swap/LightningNursery.spec.ts | 40 +- test/unit/swap/NodeSwitch.spec.ts | 85 + test/unit/swap/SwapManager.spec.ts | 19 +- test/unit/swap/routing/RoutingHints.spec.ts | 73 + .../RoutingHintsLnd.spec.ts} | 103 +- tools/hold/consts.py | 1 + tools/hold/datastore.py | 33 +- tools/hold/enums.py | 6 +- tools/hold/hold.py | 10 +- tools/hold/invoice.py | 2 +- tools/hold/plugin.py | 26 +- tools/hold/protos/hold.proto | 31 +- tools/hold/protos/hold_pb2.py | 86 +- tools/hold/protos/hold_pb2.pyi | 60 +- tools/hold/protos/hold_pb2_grpc.py | 45 + tools/hold/server.py | 11 +- tools/hold/settler.py | 9 + tools/hold/test_grpc.py | 56 +- tools/hold/test_tracker.py | 16 +- tools/hold/tracker.py | 5 +- tools/hold/transformers.py | 43 +- tools/poetry.lock | 38 +- tools/pyproject.toml | 2 +- 96 files changed, 91298 insertions(+), 1257 deletions(-) create mode 100644 lib/lightning/ChannelUtils.ts create mode 100644 lib/lightning/ClnClient.ts create mode 100644 lib/lightning/GrpcUtils.ts create mode 100644 lib/lightning/LightningClient.ts create mode 100644 lib/proto/cln/node_grpc_pb.d.ts create mode 100644 lib/proto/cln/node_grpc_pb.js create mode 100644 lib/proto/cln/node_pb.d.ts create mode 100644 lib/proto/cln/node_pb.js create mode 100644 lib/proto/cln/primitives_grpc_pb.js create mode 100644 lib/proto/cln/primitives_pb.d.ts create mode 100644 lib/proto/cln/primitives_pb.js create mode 100644 lib/proto/hold/hold_grpc_pb.d.ts create mode 100644 lib/proto/hold/hold_grpc_pb.js create mode 100644 lib/proto/hold/hold_pb.d.ts create mode 100644 lib/proto/hold/hold_pb.js delete mode 100644 lib/rates/data/exchanges/Poloniex.ts create mode 100644 lib/swap/NodeSwitch.ts delete mode 100644 lib/swap/RoutingHintsProvider.ts create mode 100644 lib/swap/routing/RoutingHints.ts create mode 100644 lib/swap/routing/RoutingHintsLnd.ts create mode 100644 proto/cln/node.proto create mode 100644 proto/cln/primitives.proto create mode 100644 test/integration/lightning/ClnClient.spec.ts create mode 100644 test/integration/lightning/LightningClient.spec.ts create mode 100644 test/unit/lightning/ChannelUtils.spec.ts create mode 100644 test/unit/swap/NodeSwitch.spec.ts create mode 100644 test/unit/swap/routing/RoutingHints.spec.ts rename test/unit/swap/{RoutingHintsProvider.spec.ts => routing/RoutingHintsLnd.spec.ts} (58%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25addc306..e80bf3912 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,9 @@ jobs: - name: Python lint run: npm run python:lint + - name: Start hold invoice plugin + run: docker exec -it regtest lightning-cli plugin start /root/hold.sh + - name: Unit tests run: npm run test:unit diff --git a/.gitignore b/.gitignore index 4d8078fd3..1ec850971 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,6 @@ contracts/ # Bitcoin and Litecoin Core RPC cookies docker/regtest/data/core/cookies/ + +# CLN data directory +docker/regtest/data/cln/regtest diff --git a/docker/build.py b/docker/build.py index b36a32847..39be9a61f 100755 --- a/docker/build.py +++ b/docker/build.py @@ -101,7 +101,7 @@ class Image: ], ), "regtest": Image( - tags=["4.0.1"], + tags=["4.0.2"], arguments=[ UBUNTU_VERSION, BITCOIN_BUILD_ARG, diff --git a/docker/regtest/data/cln/config b/docker/regtest/data/cln/config index 2bcab7696..7d456f50d 100644 --- a/docker/regtest/data/cln/config +++ b/docker/regtest/data/cln/config @@ -7,4 +7,6 @@ fee-base=0 fee-per-satoshi=1 large-channels +grpc-port=9291 + dev-fast-gossip diff --git a/docker/regtest/scripts/setup.sh b/docker/regtest/scripts/setup.sh index 90c542002..ab031b1b2 100755 --- a/docker/regtest/scripts/setup.sh +++ b/docker/regtest/scripts/setup.sh @@ -80,6 +80,8 @@ elements-cli rescanblockchain > /dev/null startCln startLnds +mkdir /root/.lightning/regtest/certs + echo "Opening BTC channels" openChannel bitcoin-cli \ diff --git a/docker/regtest/startRegtest.sh b/docker/regtest/startRegtest.sh index 80d7e45f5..f2055da20 100755 --- a/docker/regtest/startRegtest.sh +++ b/docker/regtest/startRegtest.sh @@ -3,10 +3,12 @@ docker run \ -d \ --name regtest \ - --volume "${PWD}"/docker/regtest/data/core/cookies:/cookies \ + --volume "${PWD}"/docker/regtest/data/core/cookies:/cookies/ \ + --volume "${PWD}"/docker/regtest/data/cln/regtest:/root/.lightning/regtest/certs \ --volume "${PWD}"/tools:/tools \ -p 10735:10735 \ -p 9736:9735 \ + -p 9291:9291 \ -p 9292:9292 \ -p 18443:18443 \ -p 18444:18444 \ @@ -34,4 +36,7 @@ docker run \ -p 31000:31000 \ -p 31001:31001 \ -p 31002:31002 \ - boltz/regtest:4.0.1 + boltz/regtest:4.0.2 + +docker exec regtest bash -c "cp /root/.lightning/regtest/*.pem /root/.lightning/regtest/certs" +docker exec regtest chmod -R 777 /root/.lightning/regtest/certs diff --git a/lib/Boltz.ts b/lib/Boltz.ts index 6fa786c42..920d585da 100644 --- a/lib/Boltz.ts +++ b/lib/Boltz.ts @@ -12,6 +12,7 @@ import VersionCheck from './VersionCheck'; import GrpcServer from './grpc/GrpcServer'; import ChainTip from './db/models/ChainTip'; import GrpcService from './grpc/GrpcService'; +import ClnClient from './lightning/ClnClient'; import LndClient from './lightning/LndClient'; import ChainClient from './chain/ChainClient'; import Config, { ConfigType } from './Config'; @@ -19,6 +20,7 @@ import { CurrencyType } from './consts/Enums'; import { formatError, getVersion } from './Utils'; import ElementsClient from './chain/ElementsClient'; import BackupScheduler from './backup/BackupScheduler'; +import { LightningClient } from './lightning/LightningClient'; import EthereumManager from './wallet/ethereum/EthereumManager'; import WalletManager, { Currency } from './wallet/WalletManager'; import ChainTipRepository from './db/repositories/ChainTipRepository'; @@ -147,15 +149,26 @@ class Boltz { // Query the chain tips now to avoid them being updated after the chain clients are initialized const chainTips = await ChainTipRepository.getChainTips(); - for (const [, currency] of this.currencies) { - if (currency.chainClient) { - await this.connectChainClient(currency.chainClient); + await Promise.all( + Array.from(this.currencies.values()).flatMap((currency) => { + const prms: Promise[] = []; - if (currency.lndClient) { - await this.connectLnd(currency.lndClient); + if (currency.chainClient) { + prms.push(this.connectChainClient(currency.chainClient)); } - } - } + + prms.concat( + [currency.lndClient, currency.clnClient] + .filter( + (client): client is ClnClient | LndClient => + client !== undefined, + ) + .map((client) => this.connectLightningClient(client)), + ); + + return prms; + }), + ); await this.walletManager.init(this.config.currencies); await this.service.init(this.config.pairs); @@ -248,18 +261,27 @@ class Boltz { } }; - private connectLnd = async (client: LndClient) => { - const service = `${client.symbol} LND`; + private connectLightningClient = async (client: LightningClient) => { + const service = `${client.symbol} ${client.serviceName()}`; try { await client.connect(); const info = await client.getInfo(); + VersionCheck.checkLightningVersion( + client.serviceName(), + client.symbol, + info.version, + ); - VersionCheck.checkLndVersion(client.symbol, info.version); - - // The featuresMap is just annoying to see on startup - info.featuresMap = undefined as any; + if (client instanceof ClnClient) { + const holdInfo = await client.getHoldInfo(); + VersionCheck.checkLightningVersion( + ClnClient.serviceNameHold, + client.symbol, + holdInfo.version, + ); + } this.logStatus(service, info); } catch (error) { @@ -278,18 +300,19 @@ class Boltz { currency.symbol, ); - let lndClient: LndClient | undefined; - - if (currency.lnd) { - lndClient = new LndClient(this.logger, currency.symbol, currency.lnd); - } - result.set(currency.symbol, { - lndClient, chainClient, symbol: currency.symbol, type: CurrencyType.BitcoinLike, network: Networks[currency.network], + lndClient: + currency.lnd !== undefined + ? new LndClient(this.logger, currency.symbol, currency.lnd) + : undefined, + clnClient: + currency.cln !== undefined + ? new ClnClient(this.logger, currency.symbol, currency.cln) + : undefined, limits: { ...currency, }, diff --git a/lib/Config.ts b/lib/Config.ts index 800d06d1f..5ad947eae 100644 --- a/lib/Config.ts +++ b/lib/Config.ts @@ -9,6 +9,7 @@ import { LndConfig } from './lightning/LndClient'; import { WebdavConfig } from './backup/providers/Webdav'; import { GoogleCloudConfig } from './backup/providers/GoogleCloud'; import { deepMerge, getServiceDataDir, resolveHome } from './Utils'; +import { ClnConfig } from './lightning/ClnClient'; type ChainConfig = { host: string; @@ -50,6 +51,7 @@ type CurrencyConfig = BaseCurrencyConfig & { preferredWallet: 'lnd' | 'core' | undefined; lnd?: LndConfig; + cln?: ClnConfig; routingOffsetExceptions?: RoutingOffsetException[]; // Expiry for invoices of this currency in seconds diff --git a/lib/VersionCheck.ts b/lib/VersionCheck.ts index 9bbf94312..e34e7a1c0 100644 --- a/lib/VersionCheck.ts +++ b/lib/VersionCheck.ts @@ -1,49 +1,145 @@ +import ClnClient from './lightning/ClnClient'; +import LndClient from './lightning/LndClient'; +import ChainClient from './chain/ChainClient'; + type Version = string | number; -class VersionCheck { - private static chainClientVersionLimits = { - minimal: 180100, - maximal: 250000, +type VersionLimits = { + minimal: Version; + maximal: Version; +}; + +class VersionSplit { + private readonly parts: number[]; + + constructor(version: string) { + const split = version.split('.'); + this.parts = split.map(Number); + } + + public eq = (cmp: VersionSplit): boolean => { + return ( + this.parts.length === cmp.parts.length && + this.parts.every((elem, i) => elem === cmp.parts[i]) + ); + }; + + public gt = (cmp: VersionSplit): boolean => { + for (let i = 0; i < Math.max(this.parts.length, cmp.parts.length); i++) { + const v1 = VersionSplit.getVersionPart(this.parts, i); + const v2 = VersionSplit.getVersionPart(cmp.parts, i); + + if (v1 > v2) { + return true; + } else if (v2 > v1) { + return false; + } + } + + return false; + }; + + private static getVersionPart = (arr: number[], index: number): number => { + return arr.length > index ? arr[index] : 0; + }; +} + +class Comperator { + public static versionInBounds = ( + version: Version, + limits: VersionLimits, + ): boolean => { + if (typeof version === 'number') { + return ( + version <= (limits.maximal as number) && + version >= (limits.minimal as number) + ); + } + + const [versionSplit, minSplit, maxSplit] = [ + version, + limits.minimal, + limits.maximal, + ].map((ver) => new VersionSplit(ver as string)); + return ( + !minSplit.gt(versionSplit) && + (maxSplit.gt(versionSplit) || maxSplit.eq(versionSplit)) + ); }; +} - private static lndVersionLimits = { - minimal: '0.15.0', - maximal: '0.16.4', +class VersionCheck { + private static versionLimits = { + [ChainClient.serviceName]: { + minimal: 180100, + maximal: 250000, + }, + [ClnClient.serviceName]: { + minimal: '23.05', + maximal: '23.05.2', + }, + [ClnClient.serviceNameHold]: { + minimal: '0.0.1', + maximal: '0.0.1', + }, + [LndClient.serviceName]: { + minimal: '0.15.0', + maximal: '0.16.4', + }, }; public static checkChainClientVersion = ( symbol: string, version: number, ): void => { - const { maximal, minimal } = VersionCheck.chainClientVersionLimits; - - if (version > maximal || version < minimal) { + if ( + !Comperator.versionInBounds( + version, + VersionCheck.versionLimits[ChainClient.serviceName], + ) + ) { throw VersionCheck.unsupportedVersionError( `${symbol} Core`, version, - maximal, - minimal, + VersionCheck.versionLimits[ChainClient.serviceName], ); } }; - public static checkLndVersion = (symbol: string, version: string): void => { - const parseStringVersion = (version: string) => { - return Number(version.split('-')[0].replace('.', '')); - }; + public static checkLightningVersion = ( + serviceName: string, + symbol: string, + version: string, + ): void => { + let limits: VersionLimits; + let sanitizedVersion = version; - const { maximal, minimal } = VersionCheck.lndVersionLimits; - const versionNumber = parseStringVersion(version); + switch (serviceName) { + case LndClient.serviceName: + sanitizedVersion = version.split('-')[0]; + limits = VersionCheck.versionLimits[LndClient.serviceName]; + break; - if ( - versionNumber > parseStringVersion(maximal) || - versionNumber < parseStringVersion(minimal) - ) { + case ClnClient.serviceName: + if (version.startsWith('v')) { + sanitizedVersion = version.slice(1); + } + limits = VersionCheck.versionLimits[ClnClient.serviceName]; + break; + + case ClnClient.serviceNameHold: + limits = VersionCheck.versionLimits[ClnClient.serviceNameHold]; + break; + + default: + throw `unsupported lightning client ${serviceName}`; + } + + if (!Comperator.versionInBounds(sanitizedVersion, limits)) { throw VersionCheck.unsupportedVersionError( - `${symbol} LND`, + `${symbol} ${serviceName}`, version, - maximal, - minimal, + limits, ); } }; @@ -51,10 +147,9 @@ class VersionCheck { private static unsupportedVersionError = ( service: string, actual: Version, - maximal: Version, - minimal: Version, + limits: VersionLimits, ) => { - return `unsupported ${service} version: ${actual}; min version ${minimal}; max version ${maximal}`; + return `unsupported ${service} version: ${actual}; min version ${limits.minimal}; max version ${limits.maximal}`; }; } diff --git a/lib/api/Controller.ts b/lib/api/Controller.ts index 8318e0ab1..9e42b68d0 100644 --- a/lib/api/Controller.ts +++ b/lib/api/Controller.ts @@ -63,7 +63,7 @@ class Controller { ]); for (const swap of swaps) { - const status = swap.status as SwapUpdateEvent; + const status = swap.status; switch (status) { case SwapUpdateEvent.ChannelCreated: { @@ -101,7 +101,7 @@ class Controller { } for (const reverseSwap of reverseSwaps) { - const status = reverseSwap.status as SwapUpdateEvent; + const status = reverseSwap.status; switch (status) { case SwapUpdateEvent.TransactionMempool: @@ -153,7 +153,9 @@ class Controller { } default: - this.pendingSwapInfos.set(reverseSwap.id, { status }); + this.pendingSwapInfos.set(reverseSwap.id, { + status: status as SwapUpdateEvent, + }); break; } } @@ -231,14 +233,17 @@ class Controller { }; // POST requests - public routingHints = (req: Request, res: Response): void => { + public routingHints = async (req: Request, res: Response): Promise => { try { const { symbol, routingNode } = this.validateRequest(req.body, [ { name: 'symbol', type: 'string' }, { name: 'routingNode', type: 'string' }, ]); - const routingHints = this.service.getRoutingHints(symbol, routingNode); + const routingHints = await this.service.getRoutingHints( + symbol, + routingNode, + ); this.successResponse(res, { routingHints, diff --git a/lib/chain/ChainClient.ts b/lib/chain/ChainClient.ts index b2cd847e5..d6d309013 100644 --- a/lib/chain/ChainClient.ts +++ b/lib/chain/ChainClient.ts @@ -11,12 +11,12 @@ import ZmqClient, { filters, ZmqNotification } from './ZmqClient'; import ChainTipRepository from '../db/repositories/ChainTipRepository'; import { Block, - BlockchainInfo, - BlockVerbose, + WalletInfo, NetworkInfo, - RawTransaction, UnspentUtxo, - WalletInfo, + BlockVerbose, + BlockchainInfo, + RawTransaction, } from '../consts/Types'; enum AddressType { @@ -45,6 +45,7 @@ interface ChainClient { } class ChainClient extends BaseClient { + public static readonly serviceName = 'Core'; public static readonly decimals = 100000000; public currencyType: CurrencyType = CurrencyType.BitcoinLike; @@ -150,9 +151,8 @@ class ChainClient extends BaseClient { scannedBlocks: number; } > => { - const blockchainInfo = await this.client.request( - 'getblockchaininfo', - ); + const blockchainInfo = + await this.client.request('getblockchaininfo'); return { ...blockchainInfo, diff --git a/lib/chain/ZmqClient.ts b/lib/chain/ZmqClient.ts index dd1642ceb..548282a9e 100644 --- a/lib/chain/ZmqClient.ts +++ b/lib/chain/ZmqClient.ts @@ -266,9 +266,8 @@ class ZmqClient extends EventEmitter { // If there are many blocks added to the chain at once, Bitcoin Core might // take a few milliseconds to write all of them to the disk. Therefore, // we just get the height of the previous block and increase it by 1 - const previousBlock = await this.chainClient.getBlock( - previousBlockHash, - ); + const previousBlock = + await this.chainClient.getBlock(previousBlockHash); const height = previousBlock.height + 1; if (height > this.blockHeight) { diff --git a/lib/consts/Enums.ts b/lib/consts/Enums.ts index 0b56287b8..1cb6f2563 100644 --- a/lib/consts/Enums.ts +++ b/lib/consts/Enums.ts @@ -4,7 +4,7 @@ export enum ErrorCodePrefix { Service = 2, Wallet = 3, Chain = 4, - Lnd = 5, + Lightning = 5, Swap = 6, Rates = 7, Backup = 8, diff --git a/lib/db/Migration.ts b/lib/db/Migration.ts index 382c1abe0..327cbd9eb 100644 --- a/lib/db/Migration.ts +++ b/lib/db/Migration.ts @@ -4,7 +4,7 @@ import { DataTypes, Op, Sequelize } from 'sequelize'; import Logger from '../Logger'; import Swap from './models/Swap'; import Referral from './models/Referral'; -import ReverseSwap from './models/ReverseSwap'; +import ReverseSwap, { NodeType } from './models/ReverseSwap'; import { Currency } from '../wallet/WalletManager'; import ChannelCreation from './models/ChannelCreation'; import DatabaseVersion from './models/DatabaseVersion'; @@ -20,7 +20,7 @@ import { // TODO: integration tests for actual migrations class Migration { - private static latestSchemaVersion = 6; + private static latestSchemaVersion = 7; constructor( private logger: Logger, @@ -335,6 +335,36 @@ class Migration { break; } + case 6: { + this.logUpdatingTable('reverseSwaps'); + + const attrs = { + type: new DataTypes.INTEGER(), + allowNull: true, + validate: { + isIn: [ + Object.values(NodeType).filter((val) => typeof val === 'number'), + ], + }, + }; + await this.sequelize + .getQueryInterface() + .addColumn('reverseSwaps', 'node', attrs); + + await this.sequelize + .getQueryInterface() + .bulkUpdate('reverseSwaps', { node: NodeType.LND }, {}); + + attrs.allowNull = false; + await this.sequelize + .getQueryInterface() + .changeColumn('reverseSwaps', 'node', attrs); + + await this.finishMigration(versionRow.version, currencies); + + break; + } + default: throw `found unexpected database version ${versionRow.version}`; } diff --git a/lib/db/models/ReverseSwap.ts b/lib/db/models/ReverseSwap.ts index b24669ebe..30f041b22 100644 --- a/lib/db/models/ReverseSwap.ts +++ b/lib/db/models/ReverseSwap.ts @@ -1,6 +1,11 @@ import { Model, Sequelize, DataTypes } from 'sequelize'; import Pair from './Pair'; +enum NodeType { + LND = 0, + CLN = 1, +} + type ReverseSwapType = { id: string; @@ -24,6 +29,7 @@ type ReverseSwapType = { timeoutBlockHeight: number; + node: NodeType; invoice: string; invoiceAmount: number; @@ -63,6 +69,8 @@ class ReverseSwap extends Model implements ReverseSwapType { public timeoutBlockHeight!: number; + public node!: NodeType; + public invoice!: string; public invoiceAmount!: number; @@ -101,6 +109,15 @@ class ReverseSwap extends Model implements ReverseSwapType { status: { type: new DataTypes.STRING(255), allowNull: false }, failureReason: { type: new DataTypes.STRING(255), allowNull: true }, timeoutBlockHeight: { type: new DataTypes.INTEGER(), allowNull: false }, + node: { + type: new DataTypes.INTEGER(), + allowNull: false, + validate: { + isIn: [ + Object.values(NodeType).filter((val) => typeof val === 'number'), + ], + }, + }, invoice: { type: new DataTypes.STRING(255), allowNull: false, @@ -166,4 +183,4 @@ class ReverseSwap extends Model implements ReverseSwapType { } export default ReverseSwap; -export { ReverseSwapType }; +export { ReverseSwapType, NodeType }; diff --git a/lib/lightning/ChannelUtils.ts b/lib/lightning/ChannelUtils.ts new file mode 100644 index 000000000..d74c6b390 --- /dev/null +++ b/lib/lightning/ChannelUtils.ts @@ -0,0 +1,26 @@ +const msatFactor = 1000; + +export const scidLndToCln = (s: string): string => { + const big = BigInt(s); + const block = big >> BigInt(40); + const tx = (big >> BigInt(16)) & BigInt(0xffffff); + const output = big & BigInt(0xffff); + return [block, tx, output].join('x'); +}; + +export const scidClnToLnd = (s: string): string => { + const parts = s.split('x').map((part) => BigInt(part)); + return ( + (parts[0] << BigInt(40)) | + (parts[1] << BigInt(16)) | + parts[2] + ).toString(); +}; + +export const msatToSat = (msat: number): number => { + return Math.round(msat / msatFactor); +}; + +export const satToMsat = (sat: number): number => { + return Math.round(sat * msatFactor); +}; diff --git a/lib/lightning/ClnClient.ts b/lib/lightning/ClnClient.ts new file mode 100644 index 000000000..26944952a --- /dev/null +++ b/lib/lightning/ClnClient.ts @@ -0,0 +1,693 @@ +import fs from 'fs'; +import bolt11 from 'bolt11'; +import { + ChannelCredentials, + ClientReadableStream, + credentials, + Metadata, +} from '@grpc/grpc-js'; +import Errors from './Errors'; +import Logger from '../Logger'; +import BaseClient from '../BaseClient'; +import { ClientStatus } from '../consts/Enums'; +import * as noderpc from '../proto/cln/node_pb'; +import * as holdrpc from '../proto/hold/hold_pb'; +import { grpcOptions, unaryCall } from './GrpcUtils'; +import { formatError, getHexString } from '../Utils'; +import { NodeClient } from '../proto/cln/node_grpc_pb'; +import { HoldClient } from '../proto/hold/hold_grpc_pb'; +import * as primitivesrpc from '../proto/cln/primitives_pb'; +import { + msatToSat, + satToMsat, + scidClnToLnd, + scidLndToCln, +} from './ChannelUtils'; +import { + calculatePaymentFee, + ChannelInfo, + DecodedInvoice, + HopHint, + Htlc, + HtlcState, + Invoice, + InvoiceFeature, + InvoiceState, + LightningClient, + NodeInfo, + PaymentResponse, + Route, + RoutingHintsProvider, +} from './LightningClient'; + +type ClnConfig = { + host: string; + port: number; + + rootCertPath: string; + privateKeyPath: string; + certChainPath: string; + + maxPaymentFeeRatio: number; + + hold: { + host: string; + port: number; + }; +}; + +class ClnClient + extends BaseClient + implements LightningClient, RoutingHintsProvider +{ + public static readonly serviceName = 'CLN'; + public static readonly serviceNameHold = 'hold'; + + private static readonly paymentMinFee = 121; + private static readonly paymentTimeout = 300; + + private readonly maxPaymentFeeRatio!: number; + + private readonly nodeUri: string; + private readonly holdUri: string; + + private nodeClient?: NodeClient; + private readonly nodeCreds: ChannelCredentials; + private readonly nodeMeta = new Metadata(); + + private holdClient?: HoldClient; + private readonly holdMeta = new Metadata(); + + private trackAllSubscription?: ClientReadableStream; + + constructor( + private logger: Logger, + public readonly symbol: string, + config: ClnConfig, + ) { + super(); + + this.maxPaymentFeeRatio = + config.maxPaymentFeeRatio > 0 ? config.maxPaymentFeeRatio : 0.01; + + const certFiles = [ + config.rootCertPath, + config.privateKeyPath, + config.certChainPath, + ]; + + if ( + !certFiles.map((file) => fs.existsSync(file)).every((exists) => exists) + ) { + throw Errors.COULD_NOT_FIND_FILES(symbol, ClnClient.serviceName); + } + + this.nodeUri = `${config.host}:${config.port}`; + const [rootCert, privateKey, certChain] = certFiles.map((file) => + fs.readFileSync(file), + ); + this.nodeCreds = credentials.createSsl(rootCert, privateKey, certChain); + + this.holdUri = `${config.hold.host}:${config.hold.port}`; + } + + public serviceName = (): string => { + return ClnClient.serviceName; + }; + + public connect = async (startSubscriptions = true): Promise => { + if (!this.isConnected()) { + this.nodeClient = new NodeClient(this.nodeUri, this.nodeCreds, { + ...grpcOptions, + 'grpc.ssl_target_name_override': 'cln', + }); + + this.holdClient = new HoldClient( + this.holdUri, + credentials.createInsecure(), + grpcOptions, + ); + + try { + // TODO: sanity check hold invoice plugin is running + await this.getInfo(); + + if (startSubscriptions) { + this.subscribeTrackHoldInvoices(); + } + } catch (error) { + this.setClientStatus(ClientStatus.Disconnected); + + this.logger.error( + `Could not connect to ${ClnClient.serviceName} ${ + this.symbol + }: ${formatError(error)}`, + ); + this.logger.info(`Retrying in ${this.RECONNECT_INTERVAL} ms`); + + this.reconnectionTimer = setTimeout( + this.connect, + this.RECONNECT_INTERVAL, + ); + + return false; + } + } + + return true; + }; + + public disconnect = (): void => { + this.clearReconnectTimer(); + + if (this.trackAllSubscription) { + this.trackAllSubscription.cancel(); + this.trackAllSubscription = undefined; + } + + if (this.holdClient) { + this.holdClient.close(); + this.holdClient = undefined; + } + + this.removeAllListeners(); + + this.setClientStatus(ClientStatus.Disconnected); + }; + + private reconnect = async () => { + this.setClientStatus(ClientStatus.Disconnected); + + try { + await this.getInfo(); + + this.logger.info( + `Reestablished connection to ${ClnClient.serviceName} ${this.symbol}`, + ); + + this.clearReconnectTimer(); + + this.subscribeTrackHoldInvoices(); + + this.setClientStatus(ClientStatus.Connected); + this.emit('subscription.reconnected'); + } catch (err) { + this.setClientStatus(ClientStatus.Disconnected); + + this.logger.error( + `Could not reconnect to ${ClnClient.serviceName} ${this.symbol}: ${err}`, + ); + this.logger.info(`Retrying in ${this.RECONNECT_INTERVAL} ms`); + + this.reconnectionTimer = setTimeout( + this.reconnect, + this.RECONNECT_INTERVAL, + ); + } + }; + + public getInfo = async (): Promise => { + const info = await this.unaryNodeCall< + noderpc.GetinfoRequest, + noderpc.GetinfoResponse + >('getinfo', new noderpc.GetinfoRequest(), false); + + return { + version: info.getVersion(), + pubkey: getHexString(Buffer.from(info.getId_asU8())), + uris: [], + peers: info.getNumPeers(), + blockHeight: info.getBlockheight(), + channels: { + active: info.getNumActiveChannels(), + inactive: info.getNumInactiveChannels(), + pending: info.getNumPendingChannels(), + }, + }; + }; + + public getHoldInfo = (): Promise => { + return this.unaryHoldCall< + holdrpc.GetInfoRequest, + holdrpc.GetInfoResponse.AsObject + >('getInfo', new holdrpc.GetInfoRequest()); + }; + + public listChannels = async ( + activeOnly = false, + privateOnly = false, + ): Promise => { + const res = await this.unaryNodeCall< + noderpc.ListpeerchannelsRequest, + noderpc.ListpeerchannelsResponse + >('listPeerChannels', new noderpc.ListpeerchannelsRequest(), false); + + return res + .getChannelsList() + .filter( + (chan) => + !activeOnly || + (chan.getPeerConnected() && + chan.getState() === + noderpc.ListpeerchannelsChannels.ListpeerchannelsChannelsState + .CHANNELD_NORMAL), + ) + .filter((chan) => !privateOnly || chan.getPrivate()) + .map((chan) => { + return { + private: chan.getPrivate()!, + fundingTransactionId: getHexString( + Buffer.from(chan.getFundingTxid_asU8()), + ), + capacity: msatToSat(chan.getTotalMsat()!.getMsat()), + chanId: scidClnToLnd(chan.getShortChannelId()!), + fundingTransactionVout: chan.getFundingOutnum()!, + localBalance: msatToSat(chan.getSpendableMsat()!.getMsat()), + remoteBalance: msatToSat(chan.getReceivableMsat()!.getMsat()), + remotePubkey: getHexString(Buffer.from(chan.getPeerId_asU8())), + }; + }); + }; + + public routingHints = async (node: string): Promise => { + const req = new holdrpc.RoutingHintsRequest(); + req.setNode(node); + + const res = await this.unaryHoldCall< + holdrpc.RoutingHintsRequest, + holdrpc.RoutingHintsResponse.AsObject + >('routingHints', req); + return ClnClient.routingHintsFromGrpc(res.hintsList); + }; + + public addHoldInvoice = async ( + value: number, + preimageHash: Buffer, + cltvExpiry?: number, + expiry?: number, + memo?: string, + routingHints?: HopHint[][], + ): Promise => { + const req = new holdrpc.InvoiceRequest(); + req.setAmountMsat(satToMsat(value)); + req.setPaymentHash(getHexString(preimageHash)); + + if (cltvExpiry) { + req.setMinFinalCltvExpiry(cltvExpiry); + } + + if (expiry) { + req.setExpiry(expiry); + } + + if (memo) { + req.setDescription(memo); + } + + if (routingHints) { + req.setRoutingHintsList(ClnClient.routingHintsToGrpc(routingHints)); + } + + return ( + await this.unaryHoldCall< + holdrpc.InvoiceRequest, + holdrpc.InvoiceResponse.AsObject + >('invoice', req) + ).bolt11; + }; + + public lookupHoldInvoice = async (preimageHash: Buffer): Promise => { + const req = new holdrpc.ListRequest(); + req.setPaymentHash(getHexString(preimageHash)); + + const res = await this.unaryHoldCall< + holdrpc.ListRequest, + holdrpc.ListResponse.AsObject + >('list', req); + if (res.invoicesList.length === 0) { + throw Errors.INVOICE_NOT_FOUND(); + } + + const invoice = res.invoicesList[0]; + + return { + state: ClnClient.invoiceStateFromGrpc(invoice.state), + htlcs: invoice.htlcsList.map(ClnClient.htlcFromGrpc), + }; + }; + + public cancelHoldInvoice = async (preimageHash: Buffer): Promise => { + const req = new holdrpc.CancelRequest(); + req.setPaymentHash(getHexString(preimageHash)); + + await this.unaryHoldCall< + holdrpc.CancelRequest, + holdrpc.CancelRequest.AsObject + >('cancel', req); + }; + + public settleHoldInvoice = async (preimage: Buffer): Promise => { + const req = new holdrpc.SettleRequest(); + req.setPaymentPreimage(getHexString(preimage)); + + await this.unaryHoldCall< + holdrpc.SettleRequest, + holdrpc.SettleRequest.AsObject + >('settle', req); + }; + + public decodeInvoice = async (invoice: string): Promise => { + // Just to make sure CLN can parse the invoice + const req = new noderpc.DecodeRequest(); + req.setString(invoice); + + const clnRes = await this.unaryNodeCall< + noderpc.DecodeRequest, + noderpc.DecodeResponse.AsObject + >('decode', req); + + const features = new Set(); + + const dec = bolt11.decode(invoice); + const featureBits = dec.tags.find((e) => e.tagName === 'feature_bits'); + if (featureBits && featureBits.data) { + const mpp = (featureBits.data as any)['basic_mpp']; + if (mpp.supported || mpp.required) { + features.add(InvoiceFeature.MPP); + } + } + + const routingHints: HopHint[][] = []; + + // TODO: routing hints with multiple hops? + const routingHintsTag = dec.tags.find((e) => e.tagName === 'routing_info'); + if (routingHintsTag && routingHintsTag.data) { + (routingHintsTag.data as any).forEach( + (route: { + pubkey: string; + fee_base_msat: number; + short_channel_id: string; + cltv_expiry_delta: number; + fee_proportional_millionths: number; + }) => { + const chanId = BigInt(`0x${route.short_channel_id}`).toString(); + routingHints.push([ + { + chanId, + nodeId: route.pubkey, + feeBaseMsat: route.fee_base_msat, + cltvExpiryDelta: route.cltv_expiry_delta, + feeProportionalMillionths: route.fee_proportional_millionths, + }, + ]); + }, + ); + } + + return { + features, + routingHints, + value: dec.satoshis || 0, + destination: dec.payeeNodeKey!, + cltvExpiry: clnRes.minFinalCltvExpiry || 0, + }; + }; + + public queryRoutes = async ( + destination: string, + amt: number, + cltvLimit?: number, + finalCltvDelta?: number, + routingHints?: HopHint[][], + ): Promise => { + const prms: Promise[] = [ + this.queryRoute(destination, amt, finalCltvDelta), + ]; + + if (routingHints) { + routingHints.forEach((hint) => { + const hintCtlvs = hint.reduce( + (sum, hint) => sum + hint.cltvExpiryDelta, + 0, + ); + prms.push( + this.queryRoute( + hint[0].nodeId, + amt, + (finalCltvDelta || 0) + hintCtlvs, + ), + ); + }); + } + + let routes = (await Promise.allSettled(prms)) + .filter( + (res): res is PromiseFulfilledResult => + res.status === 'fulfilled', + ) + .map((res) => res.value); + + if (cltvLimit) { + // TODO: does this work in practice? + routes = routes.filter((route) => route.ctlv <= cltvLimit); + } + + if (routes.length === 0) { + throw Errors.NO_ROUTE(); + } + + return routes; + }; + + // TODO: support for setting outgoing channel id + public sendPayment = async ( + invoice: string, + cltvDelta?: number, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _?: string, + ): Promise => { + const req = new noderpc.PayRequest(); + + req.setBolt11(invoice); + req.setRetryFor(ClnClient.paymentTimeout); + + const feeAmount = new primitivesrpc.Amount(); + feeAmount.setMsat( + satToMsat( + calculatePaymentFee( + invoice, + this.maxPaymentFeeRatio, + ClnClient.paymentMinFee, + ), + ), + ); + req.setMaxfee(feeAmount); + + if (cltvDelta) { + req.setMaxdelay(cltvDelta); + } + + const res = await this.unaryNodeCall< + noderpc.PayRequest, + noderpc.PayResponse + >('pay', req, false); + + if (res.getStatus() !== noderpc.PayResponse.PayStatus.COMPLETE) { + // TODO: error message? + throw 'payment failed'; + } + + const fee = + BigInt(res.getAmountSentMsat()!.getMsat()) - + BigInt(res.getAmountMsat()!.getMsat()); + + return { + feeMsat: Number(fee), + preimage: Buffer.from(res.getPaymentPreimage_asU8()), + }; + }; + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + public subscribeSingleInvoice = (_: Buffer): void => { + // Just here for interface compatibility; + // with CLN we can subscribe to all hold invoice with one gRPC subscription + return; + }; + + private static routingHintsToGrpc = ( + routingHints: HopHint[][], + ): holdrpc.RoutingHint[] => { + return routingHints.map((hints) => { + const routeHint = new holdrpc.RoutingHint(); + for (const hint of hints) { + const hopHint = new holdrpc.Hop(); + hopHint.setPublicKey(hint.nodeId); + hopHint.setShortChannelId(scidLndToCln(hint.chanId)); + hopHint.setBaseFee(hint.feeBaseMsat); + hopHint.setPpmFee(hint.feeProportionalMillionths); + hopHint.setCltvExpiryDelta(hint.cltvExpiryDelta); + + routeHint.addHops(hopHint); + } + + return routeHint; + }); + }; + + private static routingHintsFromGrpc = ( + routingHints: holdrpc.RoutingHint.AsObject[], + ): HopHint[][] => { + return routingHints.map((hint) => + hint.hopsList.map((hop) => ({ + nodeId: hop.publicKey, + chanId: hop.shortChannelId, + feeBaseMsat: hop.baseFee, + feeProportionalMillionths: hop.ppmFee, + cltvExpiryDelta: hop.cltvExpiryDelta, + })), + ); + }; + + private static invoiceStateFromGrpc = ( + state: holdrpc.InvoiceState, + ): InvoiceState => { + switch (state) { + case holdrpc.InvoiceState.INVOICE_UNPAID: + return InvoiceState.Open; + case holdrpc.InvoiceState.INVOICE_ACCEPTED: + return InvoiceState.Accepted; + case holdrpc.InvoiceState.INVOICE_CANCELLED: + return InvoiceState.Cancelled; + case holdrpc.InvoiceState.INVOICE_PAID: + return InvoiceState.Settled; + } + }; + + private static htlcFromGrpc = (htlc: holdrpc.Htlc.AsObject): Htlc => { + return { + state: ClnClient.htlcStateFromGrpc(htlc.state), + valueMsat: htlc.msat, + }; + }; + + private static htlcStateFromGrpc = (state: holdrpc.HtlcState): HtlcState => { + switch (state) { + case holdrpc.HtlcState.HTLC_ACCEPTED: + return HtlcState.Accepted; + case holdrpc.HtlcState.HTLC_CANCELLED: + return HtlcState.Cancelled; + case holdrpc.HtlcState.HTLC_SETTLED: + return HtlcState.Settled; + } + }; + + private queryRoute = async ( + destination: string, + amt: number, + finalCltvDelta?: number, + ): Promise => { + const req = new noderpc.GetrouteRequest(); + req.setId(destination); + req.setRiskfactor(0); + + const amtGrpc = new primitivesrpc.Amount(); + amtGrpc.setMsat(satToMsat(amt)); + req.setAmountMsat(amtGrpc); + + if (finalCltvDelta) { + req.setCltv(finalCltvDelta); + } + + const res = await this.unaryNodeCall< + noderpc.GetrouteRequest, + noderpc.GetrouteResponse.AsObject + >('getRoute', req); + + // TODO: does that happen or does CLN throw? + if (res.routeList.length === 0) { + throw Errors.NO_ROUTE(); + } + + return { + ctlv: res.routeList[0].delay, + feesMsat: Number(BigInt(res.routeList[0].amountMsat!.msat) - BigInt(amt)), + }; + }; + + private subscribeTrackHoldInvoices = () => { + if (this.trackAllSubscription) { + this.trackAllSubscription.cancel(); + } + + this.trackAllSubscription = this.holdClient!.trackAll( + new holdrpc.TrackAllRequest(), + ); + + this.trackAllSubscription.on('data', (update: holdrpc.TrackAllResponse) => { + switch (update.getState()) { + case holdrpc.InvoiceState.INVOICE_ACCEPTED: + this.logger.debug( + `${ClnClient.serviceName} ${ + this.symbol + } accepted invoice: ${update.getBolt11()}`, + ); + + this.emit('htlc.accepted', update.getBolt11()); + break; + + case holdrpc.InvoiceState.INVOICE_PAID: + this.logger.debug( + `${ClnClient.serviceName} ${ + this.symbol + } invoice settled: ${update.getBolt11()}`, + ); + this.emit('invoice.settled', update.getBolt11()); + + break; + } + }); + this.trackAllSubscription.on('error', async (error) => { + await this.handleSubscriptionError('track hold invoices', error); + }); + }; + + private unaryNodeCall = ( + methodName: keyof NodeClient, + params: T, + toObject = true, + ): Promise => { + return unaryCall( + this.nodeClient, + methodName, + params, + this.nodeMeta, + toObject, + ); + }; + + private unaryHoldCall = ( + methodName: keyof HoldClient, + params: T, + ): Promise => { + return unaryCall(this.holdClient, methodName, params, this.holdMeta, true); + }; + + private handleSubscriptionError = async ( + subscriptionName: string, + error: any, + ) => { + this.logger.error( + `${ClnClient.serviceName} ${ + this.symbol + } ${subscriptionName} subscription errored: ${formatError(error)}`, + ); + + if (this.status === ClientStatus.Connected) { + this.emit('subscription.error'); + await this.reconnect(); + } + }; +} + +export default ClnClient; +export { ClnConfig }; diff --git a/lib/lightning/Errors.ts b/lib/lightning/Errors.ts index b03af443a..f01301a01 100644 --- a/lib/lightning/Errors.ts +++ b/lib/lightning/Errors.ts @@ -3,8 +3,16 @@ import { ErrorCodePrefix } from '../consts/Enums'; import { concatErrorCode } from '../Utils'; export default { - COULD_NOT_FIND_FILES: (chainType: string): Error => ({ - message: `could not find required files for ${chainType} LND`, - code: concatErrorCode(ErrorCodePrefix.Lnd, 0), + COULD_NOT_FIND_FILES: (symbol: string, service: string): Error => ({ + message: `could not find required files for ${symbol} ${service}`, + code: concatErrorCode(ErrorCodePrefix.Lightning, 0), + }), + INVOICE_NOT_FOUND: (): Error => ({ + message: 'hold invoice not found', + code: concatErrorCode(ErrorCodePrefix.Lightning, 1), + }), + NO_ROUTE: (): Error => ({ + message: 'no route found', + code: concatErrorCode(ErrorCodePrefix.Lightning, 2), }), }; diff --git a/lib/lightning/GrpcUtils.ts b/lib/lightning/GrpcUtils.ts new file mode 100644 index 000000000..325675e96 --- /dev/null +++ b/lib/lightning/GrpcUtils.ts @@ -0,0 +1,38 @@ +import { Metadata, ServiceError } from '@grpc/grpc-js'; + +export const grpcOptions = { + // 200 MB which is the same value lncli uses: https://github.com/lightningnetwork/lnd/commit/7470f696aebc51b4ab354324e6536f54446538e1 + 'grpc.max_receive_message_length': 1024 * 1024 * 200, +}; + +interface GrpcResponse { + toObject: () => any; +} + +type GrpcMethodFunction = ( + params: any, + meta: Metadata | undefined, + listener: (err: ServiceError, response: GrpcResponse) => unknown, +) => any; + +export const unaryCall = ( + client: any, + methodName: string, + params: T, + meta: Metadata, + toObject = true, +): Promise => { + return new Promise((resolve, reject) => { + (client[methodName] as GrpcMethodFunction)( + params, + meta, + (err: ServiceError, response: GrpcResponse) => { + if (err) { + reject(err); + } else { + resolve(toObject ? response.toObject() : response); + } + }, + ); + }); +}; diff --git a/lib/lightning/LightningClient.ts b/lib/lightning/LightningClient.ts new file mode 100644 index 000000000..aaab8f14d --- /dev/null +++ b/lib/lightning/LightningClient.ts @@ -0,0 +1,181 @@ +import bolt11 from 'bolt11'; +import * as lndrpc from '../proto/lnd/rpc_pb'; + +enum InvoiceState { + Open, + Settled, + Cancelled, + Accepted, +} + +enum HtlcState { + Accepted, + Settled, + Cancelled, +} + +type NodeInfo = { + version: string; + pubkey: string; + uris: string[]; + peers: number; + blockHeight: number; + channels: { + active: number; + inactive: number; + pending: number; + }; +}; + +type ChannelInfo = { + remotePubkey: string; + private: boolean; + chanId: string; + fundingTransactionId: string; + fundingTransactionVout: number; + capacity: number; + localBalance: number; + remoteBalance: number; +}; + +type HopHint = { + nodeId: string; + chanId: string; + feeBaseMsat: number; + feeProportionalMillionths: number; + cltvExpiryDelta: number; +}; + +type Htlc = { + valueMsat: number; + state: HtlcState; +}; + +type Invoice = { + state: InvoiceState; + htlcs: Htlc[]; +}; + +enum InvoiceFeature { + MPP, + AMP, +} + +type DecodedInvoice = { + value: number; + cltvExpiry: number; + destination: string; + routingHints: HopHint[][]; + features: Set; +}; + +type PaymentResponse = { + preimage: Buffer; + feeMsat: number; +}; + +type Route = { + ctlv: number; + feesMsat: number; +}; + +interface LightningClient { + on(event: 'peer.online', listener: (publicKey: string) => void): void; + emit(event: 'peer.online', publicKey: string): boolean; + + // TODO: get rid of LND types + on( + even: 'channel.active', + listener: (channel: lndrpc.ChannelPoint.AsObject) => void, + ): void; + emit(even: 'channel.active', channel: lndrpc.ChannelPoint.AsObject): boolean; + + on(event: 'htlc.accepted', listener: (invoice: string) => void): void; + emit(event: 'htlc.accepted', invoice: string): boolean; + + on(event: 'invoice.settled', listener: (invoice: string) => void): void; + emit(event: 'invoice.settled', string: string): boolean; + + on(event: 'channel.backup', listener: (channelBackup: string) => void): void; + emit(event: 'channel.backup', channelBackup: string): boolean; + + on( + event: 'subscription.error', + listener: (subscription?: string) => void, + ): void; + emit(event: 'subscription.error', subscription?: string): void; + + on(event: 'subscription.reconnected', listener: () => void): void; + emit(event: 'subscription.reconnected'): void; + + symbol: string; + serviceName(): string; + + connect(startSubscriptions?: boolean): Promise; + disconnect(): void; + + getInfo(): Promise; + listChannels( + activeOnly?: boolean, + privateOnly?: boolean, + ): Promise; + + addHoldInvoice( + value: number, + preimageHash: Buffer, + cltvExpiry?: number, + expiry?: number, + memo?: string, + routingHints?: HopHint[][], + ): Promise; + lookupHoldInvoice(preimageHash: Buffer): Promise; + settleHoldInvoice(preimage: Buffer): Promise; + cancelHoldInvoice(preimageHash: Buffer): Promise; + + subscribeSingleInvoice(preimageHash: Buffer): void; + + decodeInvoice(invoice: string): Promise; + + sendPayment( + invoice: string, + cltvDelta?: number, + outgoingChannelId?: string, + ): Promise; + queryRoutes( + destination: string, + amt: number, + cltvLimit?: number, + finalCltvDelta?: number, + routingHints?: HopHint[][], + ): Promise; +} + +interface RoutingHintsProvider { + routingHints(nodeId: string): Promise; +} + +const calculatePaymentFee = ( + invoice: string, + maxRatio: number, + minFee: number, +): number => { + const invoiceAmt = bolt11.decode(invoice).satoshis || 0; + return Math.ceil(Math.max(invoiceAmt * maxRatio, minFee)); +}; + +export { + Htlc, + Route, + HopHint, + Invoice, + NodeInfo, + HtlcState, + ChannelInfo, + InvoiceState, + InvoiceFeature, + DecodedInvoice, + LightningClient, + PaymentResponse, + calculatePaymentFee, + RoutingHintsProvider, +}; diff --git a/lib/lightning/LndClient.ts b/lib/lightning/LndClient.ts index 0fdca4837..89ad22889 100644 --- a/lib/lightning/LndClient.ts +++ b/lib/lightning/LndClient.ts @@ -1,11 +1,9 @@ import fs from 'fs'; -import bolt11 from '@boltz/bolt11'; import { ChannelCredentials, ClientReadableStream, credentials, Metadata, - ServiceError, } from '@grpc/grpc-js'; import Errors from './Errors'; import Logger from '../Logger'; @@ -13,11 +11,32 @@ import BaseClient from '../BaseClient'; import * as lndrpc from '../proto/lnd/rpc_pb'; import { ClientStatus } from '../consts/Enums'; import * as routerrpc from '../proto/lnd/router_pb'; -import { formatError, getHexString } from '../Utils'; +import { grpcOptions, unaryCall } from './GrpcUtils'; import * as invoicesrpc from '../proto/lnd/invoices_pb'; import { RouterClient } from '../proto/lnd/router_grpc_pb'; -import { LightningClient } from '../proto/lnd/rpc_grpc_pb'; import { InvoicesClient } from '../proto/lnd/invoices_grpc_pb'; +import { LightningClient as LndLightningClient } from '../proto/lnd/rpc_grpc_pb'; +import { + formatError, + getHexBuffer, + getHexString, + splitChannelPoint, +} from '../Utils'; +import { + calculatePaymentFee, + ChannelInfo, + DecodedInvoice, + HopHint, + Htlc, + HtlcState, + Invoice, + InvoiceFeature, + InvoiceState, + LightningClient, + NodeInfo, + PaymentResponse, + Route, +} from './LightningClient'; /** * The configurable options for the LND client @@ -30,54 +49,15 @@ type LndConfig = { maxPaymentFeeRatio: number; }; -type LndMethodFunction = (params: any, meta: Metadata, listener) => any; - -interface GrpcResponse { - toObject: () => any; -} - -interface LndClient { - on(event: 'peer.online', listener: (publicKey: string) => void): this; - emit(event: 'peer.online', publicKey: string): boolean; - - on( - even: 'channel.active', - listener: (channel: lndrpc.ChannelPoint.AsObject) => void, - ): this; - emit(even: 'channel.active', channel: lndrpc.ChannelPoint.AsObject): boolean; - - on(event: 'htlc.accepted', listener: (invoice: string) => void): this; - emit(event: 'htlc.accepted', invoice: string): boolean; - - on(event: 'invoice.settled', listener: (invoice: string) => void): this; - emit(event: 'invoice.settled', string: string): boolean; - - on(event: 'channel.backup', listener: (channelBackup: string) => void): this; - emit(event: 'channel.backup', channelBackup: string): boolean; - - on( - event: 'subscription.error', - listener: (subscription?: string) => void, - ): this; - emit(event: 'subscription.error', subscription?: string): this; - - on(event: 'subscription.reconnected', listener: () => void): this; - emit(event: 'subscription.reconnected'): this; -} - /** * A class representing a client to interact with LND */ -class LndClient extends BaseClient implements LndClient { +class LndClient extends BaseClient implements LightningClient { public static readonly serviceName = 'LND'; - private static readonly grpcOptions = { - // 200 MB which is the same value lncli uses: https://github.com/lightningnetwork/lnd/commit/7470f696aebc51b4ab354324e6536f54446538e1 - 'grpc.max_receive_message_length': 1024 * 1024 * 200, - }; - + public static readonly paymentMinFee = 121; public static readonly paymentMaxParts = 5; - private static readonly paymentMinFee = 121; + private static readonly paymentTimeout = 300; private static readonly paymentTimePreference = 0.9; @@ -89,7 +69,7 @@ class LndClient extends BaseClient implements LndClient { private router?: RouterClient; private invoices?: InvoicesClient; - private lightning?: LightningClient; + private lightning?: LndLightningClient; private peerEventSubscription?: ClientReadableStream; private channelEventSubscription?: ClientReadableStream; @@ -132,7 +112,11 @@ class LndClient extends BaseClient implements LndClient { } private throwFilesNotFound = () => { - throw Errors.COULD_NOT_FIND_FILES(this.symbol); + throw Errors.COULD_NOT_FIND_FILES(this.symbol, LndClient.serviceName); + }; + + public serviceName = (): string => { + return LndClient.serviceName; }; /** @@ -140,20 +124,16 @@ class LndClient extends BaseClient implements LndClient { */ public connect = async (startSubscriptions = true): Promise => { if (!this.isConnected()) { - this.router = new RouterClient( - this.uri, - this.credentials, - LndClient.grpcOptions, - ); + this.router = new RouterClient(this.uri, this.credentials, grpcOptions); this.invoices = new InvoicesClient( this.uri, this.credentials, - LndClient.grpcOptions, + grpcOptions, ); - this.lightning = new LightningClient( + this.lightning = new LndLightningClient( this.uri, this.credentials, - LndClient.grpcOptions, + grpcOptions, ); try { @@ -228,21 +208,6 @@ class LndClient extends BaseClient implements LndClient { public disconnect = (): void => { this.clearReconnectTimer(); - if (this.lightning) { - this.lightning.close(); - this.lightning = undefined; - } - - if (this.router) { - this.router.close(); - this.router = undefined; - } - - if (this.invoices) { - this.invoices.close(); - this.invoices = undefined; - } - if (this.peerEventSubscription) { this.peerEventSubscription.cancel(); this.peerEventSubscription = undefined; @@ -258,63 +223,66 @@ class LndClient extends BaseClient implements LndClient { this.channelBackupSubscription = undefined; } + if (this.lightning) { + this.lightning.close(); + this.lightning = undefined; + } + + if (this.router) { + this.router.close(); + this.router = undefined; + } + + if (this.invoices) { + this.invoices.close(); + this.invoices = undefined; + } + this.removeAllListeners(); this.setClientStatus(ClientStatus.Disconnected); }; - private unaryCall = ( - client: any, - methodName: string, - params: T, - toObject: boolean, - ): Promise => { - return new Promise((resolve, reject) => { - (client[methodName] as LndMethodFunction)( - params, - this.meta, - (err: ServiceError, response: GrpcResponse) => { - if (err) { - reject(err); - } else { - resolve(toObject ? response.toObject() : response); - } - }, - ); - }); - }; - private unaryInvoicesCall = ( methodName: keyof InvoicesClient, params: T, ): Promise => { - return this.unaryCall(this.invoices, methodName, params, true); + return unaryCall(this.invoices, methodName, params, this.meta, true); }; private unaryRouterCall = ( methodName: keyof RouterClient, params: T, ): Promise => { - return this.unaryCall(this.router, methodName, params, true); + return unaryCall(this.router, methodName, params, this.meta, true); }; private unaryLightningCall = ( - methodName: keyof LightningClient, + methodName: keyof LndLightningClient, params: T, toObject = true, ): Promise => { - return this.unaryCall(this.lightning, methodName, params, toObject); + return unaryCall(this.lightning, methodName, params, this.meta, toObject); }; - /** - * Return general information concerning the lightning node including it’s identity pubkey, alias, the chains it - * is connected to, and information concerning the number of open+pending channels - */ - public getInfo = (): Promise => { - return this.unaryLightningCall< + public getInfo = async (): Promise => { + const info = await this.unaryLightningCall< lndrpc.GetInfoRequest, lndrpc.GetInfoResponse.AsObject >('getInfo', new lndrpc.GetInfoRequest()); + + return { + version: info.version, + pubkey: info.identityPubkey, + uris: info.urisList, + peers: info.numPeers, + blockHeight: info.blockHeight, + channels: { + active: info.numActiveChannels, + inactive: info.numInactiveChannels, + pending: info.numPendingChannels, + }, + }; }; /** @@ -350,14 +318,14 @@ class LndClient extends BaseClient implements LndClient { /** * Creates a hold invoice with the supplied preimage hash */ - public addHoldInvoice = ( + public addHoldInvoice = async ( value: number, preimageHash: Buffer, cltvExpiry?: number, expiry?: number, memo?: string, - routingHints?: lndrpc.RouteHint[], - ): Promise => { + routingHints?: HopHint[][], + ): Promise => { const request = new invoicesrpc.AddHoldInvoiceRequest(); request.setValue(value); request.setHash(Uint8Array.from(preimageHash)); @@ -375,13 +343,23 @@ class LndClient extends BaseClient implements LndClient { } if (routingHints) { - request.setRouteHintsList(routingHints); + request.setRouteHintsList(LndClient.routingHintsToGrpc(routingHints)); } - return this.unaryInvoicesCall< - invoicesrpc.AddHoldInvoiceRequest, - invoicesrpc.AddHoldInvoiceResp.AsObject - >('addHoldInvoice', request); + return ( + await this.unaryInvoicesCall< + invoicesrpc.AddHoldInvoiceRequest, + invoicesrpc.AddHoldInvoiceResp.AsObject + >('addHoldInvoice', request) + ).paymentRequest; + }; + + public lookupHoldInvoice = async (preimageHash: Buffer): Promise => { + const res = await this.lookupInvoice(preimageHash); + return { + state: LndClient.invoiceStateFromGrpc(res.state), + htlcs: res.htlcsList.map(LndClient.htlcFromGrpc), + }; }; public lookupInvoice = ( @@ -438,14 +416,20 @@ class LndClient extends BaseClient implements LndClient { invoice: string, cltvDelta?: number, outgoingChannelId?: string, - ): Promise => { - return new Promise((resolve, reject) => { + ): Promise => { + return new Promise((resolve, reject) => { const request = new routerrpc.SendPaymentRequest(); request.setMaxParts(LndClient.paymentMaxParts); request.setTimeoutSeconds(LndClient.paymentTimeout); request.setTimePref(LndClient.paymentTimePreference); - request.setFeeLimitSat(this.calculatePaymentFee(invoice)); + request.setFeeLimitSat( + calculatePaymentFee( + invoice, + this.maxPaymentFeeRatio, + LndClient.paymentMinFee, + ), + ); request.setPaymentRequest(invoice); @@ -463,7 +447,10 @@ class LndClient extends BaseClient implements LndClient { switch (response.getStatus()) { case lndrpc.Payment.PaymentStatus.SUCCEEDED: stream.removeAllListeners(); - resolve(response.toObject()); + resolve({ + feeMsat: response.getFeeMsat(), + preimage: getHexBuffer(response.getPaymentPreimage()), + }); return; case lndrpc.Payment.PaymentStatus.FAILED: @@ -511,13 +498,11 @@ class LndClient extends BaseClient implements LndClient { /** * Cancel a hold invoice */ - public cancelInvoice = ( - preimageHash: Buffer, - ): Promise => { + public cancelHoldInvoice = async (preimageHash: Buffer): Promise => { const request = new invoicesrpc.CancelInvoiceMsg(); request.setPaymentHash(Uint8Array.from(preimageHash)); - return this.unaryInvoicesCall< + await this.unaryInvoicesCall< invoicesrpc.CancelInvoiceMsg, invoicesrpc.CancelInvoiceResp.AsObject >('cancelInvoice', request); @@ -526,13 +511,11 @@ class LndClient extends BaseClient implements LndClient { /** * Settle a hold invoice with an already accepted HTLC */ - public settleInvoice = ( - preimage: Buffer, - ): Promise => { + public settleHoldInvoice = async (preimage: Buffer): Promise => { const request = new invoicesrpc.SettleInvoiceMsg(); request.setPreimage(Uint8Array.from(preimage)); - return this.unaryInvoicesCall< + await this.unaryInvoicesCall< invoicesrpc.SettleInvoiceMsg, invoicesrpc.SettleInvoiceResp.AsObject >('settleInvoice', request); @@ -541,13 +524,13 @@ class LndClient extends BaseClient implements LndClient { /** * Queries for a possible route to the target destination */ - public queryRoutes = ( + public queryRoutes = async ( destination: string, amt: number, cltvLimit?: number, finalCltvDelta?: number, - routingHints?: lndrpc.RouteHint[], - ): Promise => { + routingHints?: HopHint[][], + ): Promise => { const request = new lndrpc.QueryRoutesRequest(); request.setAmt(amt); request.setPubKey(destination); @@ -563,13 +546,43 @@ class LndClient extends BaseClient implements LndClient { } if (routingHints) { - request.setRouteHintsList(routingHints); + request.setRouteHintsList(LndClient.routingHintsToGrpc(routingHints)); } - return this.unaryLightningCall< + const res = await this.unaryLightningCall< lndrpc.QueryRoutesRequest, lndrpc.QueryRoutesResponse.AsObject >('queryRoutes', request); + + return res.routesList.map((route) => ({ + ctlv: route.totalTimeLock, + feesMsat: route.totalFeesMsat, + })); + }; + + public decodeInvoice = async (invoice: string): Promise => { + const res = await this.decodePayReq(invoice); + + const features = new Set(); + for (const [, feature] of res.featuresMap) { + switch (feature.name) { + case 'amp': + features.add(InvoiceFeature.AMP); + break; + + case 'multi-path-payments': + features.add(InvoiceFeature.MPP); + break; + } + } + + return { + features, + value: res.numSatoshis, + cltvExpiry: res.cltvExpiry, + destination: res.destination, + routingHints: LndClient.routingHintsFromGrpc(res.routeHintsList), + }; }; /** @@ -756,18 +769,32 @@ class LndClient extends BaseClient implements LndClient { /** * Gets a list of all open channels */ - public listChannels = ( + public listChannels = async ( activeOnly = false, privateOnly = false, - ): Promise => { + ): Promise => { const request = new lndrpc.ListChannelsRequest(); request.setActiveOnly(activeOnly); request.setPrivateOnly(privateOnly); - return this.unaryLightningCall< + const res = await this.unaryLightningCall< lndrpc.ListChannelsRequest, lndrpc.ListChannelsResponse.AsObject >('listChannels', request); + + return res.channelsList.map((chan) => { + const { id, vout } = splitChannelPoint(chan.channelPoint); + return { + chanId: chan.chanId, + capacity: chan.capacity, + private: chan.pb_private, + fundingTransactionId: id, + fundingTransactionVout: vout, + remotePubkey: chan.remotePubkey, + localBalance: chan.localBalance, + remoteBalance: chan.remoteBalance, + }; + }); }; /** @@ -858,6 +885,67 @@ class LndClient extends BaseClient implements LndClient { }); }; + private static routingHintsToGrpc = ( + routingHints: HopHint[][], + ): lndrpc.RouteHint[] => { + return routingHints.map((hints) => { + const routeHint = new lndrpc.RouteHint(); + for (const hint of hints) { + const hopHint = new lndrpc.HopHint(); + hopHint.setNodeId(hint.nodeId); + hopHint.setChanId(hint.chanId); + hopHint.setFeeBaseMsat(hint.feeBaseMsat); + hopHint.setFeeProportionalMillionths(hint.feeProportionalMillionths); + hopHint.setCltvExpiryDelta(hint.cltvExpiryDelta); + + routeHint.addHopHints(hopHint); + } + + return routeHint; + }); + }; + + private static routingHintsFromGrpc = ( + hints: lndrpc.RouteHint.AsObject[], + ): HopHint[][] => { + return hints.map((hint) => hint.hopHintsList.map((hop) => hop)); + }; + + private static invoiceStateFromGrpc = ( + state: lndrpc.Invoice.InvoiceState, + ): InvoiceState => { + switch (state) { + case lndrpc.Invoice.InvoiceState.OPEN: + return InvoiceState.Open; + case lndrpc.Invoice.InvoiceState.ACCEPTED: + return InvoiceState.Accepted; + case lndrpc.Invoice.InvoiceState.CANCELED: + return InvoiceState.Accepted; + case lndrpc.Invoice.InvoiceState.SETTLED: + return InvoiceState.Settled; + } + }; + + private static htlcFromGrpc = (htlc: lndrpc.InvoiceHTLC.AsObject): Htlc => { + return { + valueMsat: htlc.amtMsat, + state: LndClient.htlcStateFromGrpc(htlc.state), + }; + }; + + private static htlcStateFromGrpc = ( + state: lndrpc.InvoiceHTLCState, + ): HtlcState => { + switch (state) { + case lndrpc.InvoiceHTLCState.ACCEPTED: + return HtlcState.Accepted; + case lndrpc.InvoiceHTLCState.CANCELED: + return HtlcState.Cancelled; + case lndrpc.InvoiceHTLCState.SETTLED: + return HtlcState.Settled; + } + }; + private handleSubscriptionError = async ( subscriptionName: string, error: any, @@ -944,13 +1032,6 @@ class LndClient extends BaseClient implements LndClient { this.emit('subscription.error', 'channel backup'); }); }; - - private calculatePaymentFee = (invoice: string): number => { - const invoiceAmt = bolt11.decode(invoice).satoshis || 0; - return Math.ceil( - Math.max(invoiceAmt * this.maxPaymentFeeRatio, LndClient.paymentMinFee), - ); - }; } export default LndClient; diff --git a/lib/notifications/CommandHandler.ts b/lib/notifications/CommandHandler.ts index 6ba11fe82..1321abe70 100644 --- a/lib/notifications/CommandHandler.ts +++ b/lib/notifications/CommandHandler.ts @@ -17,13 +17,14 @@ import FeeRepository from '../db/repositories/FeeRepository'; import SwapRepository from '../db/repositories/SwapRepository'; import { coinsToSatoshis, satoshisToCoins } from '../DenominationConverter'; import ReverseSwapRepository from '../db/repositories/ReverseSwapRepository'; +import ChannelCreationRepository from '../db/repositories/ChannelCreationRepository'; import { + formatError, getChainCurrency, - stringify, + getHexString, splitPairId, - formatError, + stringify, } from '../Utils'; -import ChannelCreationRepository from '../db/repositories/ChannelCreationRepository'; enum Command { Help = 'help', @@ -481,7 +482,9 @@ class CommandHandler { const response = await this.service.payInvoice(symbol, args[2]); await this.discord.sendMessage( - `Paid lightning invoice\nPreimage: ${response.paymentPreimage}`, + `Paid lightning invoice\nPreimage: ${getHexString( + response.preimage, + )}`, ); } catch (error) { await this.discord.sendMessage( diff --git a/lib/proto/cln/node_grpc_pb.d.ts b/lib/proto/cln/node_grpc_pb.d.ts new file mode 100644 index 000000000..721158b4b --- /dev/null +++ b/lib/proto/cln/node_grpc_pb.d.ts @@ -0,0 +1,3519 @@ +// package: cln +// file: cln/node.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from '@grpc/grpc-js'; +import * as cln_node_pb from '../cln/node_pb'; +import * as cln_primitives_pb from '../cln/primitives_pb'; + +interface INodeService + extends grpc.ServiceDefinition { + getinfo: INodeService_IGetinfo; + listPeers: INodeService_IListPeers; + listFunds: INodeService_IListFunds; + sendPay: INodeService_ISendPay; + listChannels: INodeService_IListChannels; + addGossip: INodeService_IAddGossip; + autoCleanInvoice: INodeService_IAutoCleanInvoice; + checkMessage: INodeService_ICheckMessage; + close: INodeService_IClose; + connectPeer: INodeService_IConnectPeer; + createInvoice: INodeService_ICreateInvoice; + datastore: INodeService_IDatastore; + createOnion: INodeService_ICreateOnion; + delDatastore: INodeService_IDelDatastore; + delExpiredInvoice: INodeService_IDelExpiredInvoice; + delInvoice: INodeService_IDelInvoice; + invoice: INodeService_IInvoice; + listDatastore: INodeService_IListDatastore; + listInvoices: INodeService_IListInvoices; + sendOnion: INodeService_ISendOnion; + listSendPays: INodeService_IListSendPays; + listTransactions: INodeService_IListTransactions; + pay: INodeService_IPay; + listNodes: INodeService_IListNodes; + waitAnyInvoice: INodeService_IWaitAnyInvoice; + waitInvoice: INodeService_IWaitInvoice; + waitSendPay: INodeService_IWaitSendPay; + newAddr: INodeService_INewAddr; + withdraw: INodeService_IWithdraw; + keySend: INodeService_IKeySend; + fundPsbt: INodeService_IFundPsbt; + sendPsbt: INodeService_ISendPsbt; + signPsbt: INodeService_ISignPsbt; + utxoPsbt: INodeService_IUtxoPsbt; + txDiscard: INodeService_ITxDiscard; + txPrepare: INodeService_ITxPrepare; + txSend: INodeService_ITxSend; + listPeerChannels: INodeService_IListPeerChannels; + listClosedChannels: INodeService_IListClosedChannels; + decodePay: INodeService_IDecodePay; + decode: INodeService_IDecode; + disconnect: INodeService_IDisconnect; + feerates: INodeService_IFeerates; + fundChannel: INodeService_IFundChannel; + getRoute: INodeService_IGetRoute; + listForwards: INodeService_IListForwards; + listPays: INodeService_IListPays; + ping: INodeService_IPing; + sendCustomMsg: INodeService_ISendCustomMsg; + setChannel: INodeService_ISetChannel; + signInvoice: INodeService_ISignInvoice; + signMessage: INodeService_ISignMessage; + stop: INodeService_IStop; +} + +interface INodeService_IGetinfo + extends grpc.MethodDefinition< + cln_node_pb.GetinfoRequest, + cln_node_pb.GetinfoResponse + > { + path: '/cln.Node/Getinfo'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListPeers + extends grpc.MethodDefinition< + cln_node_pb.ListpeersRequest, + cln_node_pb.ListpeersResponse + > { + path: '/cln.Node/ListPeers'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListFunds + extends grpc.MethodDefinition< + cln_node_pb.ListfundsRequest, + cln_node_pb.ListfundsResponse + > { + path: '/cln.Node/ListFunds'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISendPay + extends grpc.MethodDefinition< + cln_node_pb.SendpayRequest, + cln_node_pb.SendpayResponse + > { + path: '/cln.Node/SendPay'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListChannels + extends grpc.MethodDefinition< + cln_node_pb.ListchannelsRequest, + cln_node_pb.ListchannelsResponse + > { + path: '/cln.Node/ListChannels'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IAddGossip + extends grpc.MethodDefinition< + cln_node_pb.AddgossipRequest, + cln_node_pb.AddgossipResponse + > { + path: '/cln.Node/AddGossip'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IAutoCleanInvoice + extends grpc.MethodDefinition< + cln_node_pb.AutocleaninvoiceRequest, + cln_node_pb.AutocleaninvoiceResponse + > { + path: '/cln.Node/AutoCleanInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ICheckMessage + extends grpc.MethodDefinition< + cln_node_pb.CheckmessageRequest, + cln_node_pb.CheckmessageResponse + > { + path: '/cln.Node/CheckMessage'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IClose + extends grpc.MethodDefinition< + cln_node_pb.CloseRequest, + cln_node_pb.CloseResponse + > { + path: '/cln.Node/Close'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IConnectPeer + extends grpc.MethodDefinition< + cln_node_pb.ConnectRequest, + cln_node_pb.ConnectResponse + > { + path: '/cln.Node/ConnectPeer'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ICreateInvoice + extends grpc.MethodDefinition< + cln_node_pb.CreateinvoiceRequest, + cln_node_pb.CreateinvoiceResponse + > { + path: '/cln.Node/CreateInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDatastore + extends grpc.MethodDefinition< + cln_node_pb.DatastoreRequest, + cln_node_pb.DatastoreResponse + > { + path: '/cln.Node/Datastore'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ICreateOnion + extends grpc.MethodDefinition< + cln_node_pb.CreateonionRequest, + cln_node_pb.CreateonionResponse + > { + path: '/cln.Node/CreateOnion'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDelDatastore + extends grpc.MethodDefinition< + cln_node_pb.DeldatastoreRequest, + cln_node_pb.DeldatastoreResponse + > { + path: '/cln.Node/DelDatastore'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDelExpiredInvoice + extends grpc.MethodDefinition< + cln_node_pb.DelexpiredinvoiceRequest, + cln_node_pb.DelexpiredinvoiceResponse + > { + path: '/cln.Node/DelExpiredInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDelInvoice + extends grpc.MethodDefinition< + cln_node_pb.DelinvoiceRequest, + cln_node_pb.DelinvoiceResponse + > { + path: '/cln.Node/DelInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IInvoice + extends grpc.MethodDefinition< + cln_node_pb.InvoiceRequest, + cln_node_pb.InvoiceResponse + > { + path: '/cln.Node/Invoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListDatastore + extends grpc.MethodDefinition< + cln_node_pb.ListdatastoreRequest, + cln_node_pb.ListdatastoreResponse + > { + path: '/cln.Node/ListDatastore'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListInvoices + extends grpc.MethodDefinition< + cln_node_pb.ListinvoicesRequest, + cln_node_pb.ListinvoicesResponse + > { + path: '/cln.Node/ListInvoices'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISendOnion + extends grpc.MethodDefinition< + cln_node_pb.SendonionRequest, + cln_node_pb.SendonionResponse + > { + path: '/cln.Node/SendOnion'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListSendPays + extends grpc.MethodDefinition< + cln_node_pb.ListsendpaysRequest, + cln_node_pb.ListsendpaysResponse + > { + path: '/cln.Node/ListSendPays'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListTransactions + extends grpc.MethodDefinition< + cln_node_pb.ListtransactionsRequest, + cln_node_pb.ListtransactionsResponse + > { + path: '/cln.Node/ListTransactions'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IPay + extends grpc.MethodDefinition< + cln_node_pb.PayRequest, + cln_node_pb.PayResponse + > { + path: '/cln.Node/Pay'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListNodes + extends grpc.MethodDefinition< + cln_node_pb.ListnodesRequest, + cln_node_pb.ListnodesResponse + > { + path: '/cln.Node/ListNodes'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IWaitAnyInvoice + extends grpc.MethodDefinition< + cln_node_pb.WaitanyinvoiceRequest, + cln_node_pb.WaitanyinvoiceResponse + > { + path: '/cln.Node/WaitAnyInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IWaitInvoice + extends grpc.MethodDefinition< + cln_node_pb.WaitinvoiceRequest, + cln_node_pb.WaitinvoiceResponse + > { + path: '/cln.Node/WaitInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IWaitSendPay + extends grpc.MethodDefinition< + cln_node_pb.WaitsendpayRequest, + cln_node_pb.WaitsendpayResponse + > { + path: '/cln.Node/WaitSendPay'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_INewAddr + extends grpc.MethodDefinition< + cln_node_pb.NewaddrRequest, + cln_node_pb.NewaddrResponse + > { + path: '/cln.Node/NewAddr'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IWithdraw + extends grpc.MethodDefinition< + cln_node_pb.WithdrawRequest, + cln_node_pb.WithdrawResponse + > { + path: '/cln.Node/Withdraw'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IKeySend + extends grpc.MethodDefinition< + cln_node_pb.KeysendRequest, + cln_node_pb.KeysendResponse + > { + path: '/cln.Node/KeySend'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IFundPsbt + extends grpc.MethodDefinition< + cln_node_pb.FundpsbtRequest, + cln_node_pb.FundpsbtResponse + > { + path: '/cln.Node/FundPsbt'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISendPsbt + extends grpc.MethodDefinition< + cln_node_pb.SendpsbtRequest, + cln_node_pb.SendpsbtResponse + > { + path: '/cln.Node/SendPsbt'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISignPsbt + extends grpc.MethodDefinition< + cln_node_pb.SignpsbtRequest, + cln_node_pb.SignpsbtResponse + > { + path: '/cln.Node/SignPsbt'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IUtxoPsbt + extends grpc.MethodDefinition< + cln_node_pb.UtxopsbtRequest, + cln_node_pb.UtxopsbtResponse + > { + path: '/cln.Node/UtxoPsbt'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ITxDiscard + extends grpc.MethodDefinition< + cln_node_pb.TxdiscardRequest, + cln_node_pb.TxdiscardResponse + > { + path: '/cln.Node/TxDiscard'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ITxPrepare + extends grpc.MethodDefinition< + cln_node_pb.TxprepareRequest, + cln_node_pb.TxprepareResponse + > { + path: '/cln.Node/TxPrepare'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ITxSend + extends grpc.MethodDefinition< + cln_node_pb.TxsendRequest, + cln_node_pb.TxsendResponse + > { + path: '/cln.Node/TxSend'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListPeerChannels + extends grpc.MethodDefinition< + cln_node_pb.ListpeerchannelsRequest, + cln_node_pb.ListpeerchannelsResponse + > { + path: '/cln.Node/ListPeerChannels'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListClosedChannels + extends grpc.MethodDefinition< + cln_node_pb.ListclosedchannelsRequest, + cln_node_pb.ListclosedchannelsResponse + > { + path: '/cln.Node/ListClosedChannels'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDecodePay + extends grpc.MethodDefinition< + cln_node_pb.DecodepayRequest, + cln_node_pb.DecodepayResponse + > { + path: '/cln.Node/DecodePay'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDecode + extends grpc.MethodDefinition< + cln_node_pb.DecodeRequest, + cln_node_pb.DecodeResponse + > { + path: '/cln.Node/Decode'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IDisconnect + extends grpc.MethodDefinition< + cln_node_pb.DisconnectRequest, + cln_node_pb.DisconnectResponse + > { + path: '/cln.Node/Disconnect'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IFeerates + extends grpc.MethodDefinition< + cln_node_pb.FeeratesRequest, + cln_node_pb.FeeratesResponse + > { + path: '/cln.Node/Feerates'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IFundChannel + extends grpc.MethodDefinition< + cln_node_pb.FundchannelRequest, + cln_node_pb.FundchannelResponse + > { + path: '/cln.Node/FundChannel'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IGetRoute + extends grpc.MethodDefinition< + cln_node_pb.GetrouteRequest, + cln_node_pb.GetrouteResponse + > { + path: '/cln.Node/GetRoute'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListForwards + extends grpc.MethodDefinition< + cln_node_pb.ListforwardsRequest, + cln_node_pb.ListforwardsResponse + > { + path: '/cln.Node/ListForwards'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IListPays + extends grpc.MethodDefinition< + cln_node_pb.ListpaysRequest, + cln_node_pb.ListpaysResponse + > { + path: '/cln.Node/ListPays'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IPing + extends grpc.MethodDefinition< + cln_node_pb.PingRequest, + cln_node_pb.PingResponse + > { + path: '/cln.Node/Ping'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISendCustomMsg + extends grpc.MethodDefinition< + cln_node_pb.SendcustommsgRequest, + cln_node_pb.SendcustommsgResponse + > { + path: '/cln.Node/SendCustomMsg'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISetChannel + extends grpc.MethodDefinition< + cln_node_pb.SetchannelRequest, + cln_node_pb.SetchannelResponse + > { + path: '/cln.Node/SetChannel'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISignInvoice + extends grpc.MethodDefinition< + cln_node_pb.SigninvoiceRequest, + cln_node_pb.SigninvoiceResponse + > { + path: '/cln.Node/SignInvoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_ISignMessage + extends grpc.MethodDefinition< + cln_node_pb.SignmessageRequest, + cln_node_pb.SignmessageResponse + > { + path: '/cln.Node/SignMessage'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface INodeService_IStop + extends grpc.MethodDefinition< + cln_node_pb.StopRequest, + cln_node_pb.StopResponse + > { + path: '/cln.Node/Stop'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const NodeService: INodeService; + +export interface INodeServer extends grpc.UntypedServiceImplementation { + getinfo: grpc.handleUnaryCall< + cln_node_pb.GetinfoRequest, + cln_node_pb.GetinfoResponse + >; + listPeers: grpc.handleUnaryCall< + cln_node_pb.ListpeersRequest, + cln_node_pb.ListpeersResponse + >; + listFunds: grpc.handleUnaryCall< + cln_node_pb.ListfundsRequest, + cln_node_pb.ListfundsResponse + >; + sendPay: grpc.handleUnaryCall< + cln_node_pb.SendpayRequest, + cln_node_pb.SendpayResponse + >; + listChannels: grpc.handleUnaryCall< + cln_node_pb.ListchannelsRequest, + cln_node_pb.ListchannelsResponse + >; + addGossip: grpc.handleUnaryCall< + cln_node_pb.AddgossipRequest, + cln_node_pb.AddgossipResponse + >; + autoCleanInvoice: grpc.handleUnaryCall< + cln_node_pb.AutocleaninvoiceRequest, + cln_node_pb.AutocleaninvoiceResponse + >; + checkMessage: grpc.handleUnaryCall< + cln_node_pb.CheckmessageRequest, + cln_node_pb.CheckmessageResponse + >; + close: grpc.handleUnaryCall< + cln_node_pb.CloseRequest, + cln_node_pb.CloseResponse + >; + connectPeer: grpc.handleUnaryCall< + cln_node_pb.ConnectRequest, + cln_node_pb.ConnectResponse + >; + createInvoice: grpc.handleUnaryCall< + cln_node_pb.CreateinvoiceRequest, + cln_node_pb.CreateinvoiceResponse + >; + datastore: grpc.handleUnaryCall< + cln_node_pb.DatastoreRequest, + cln_node_pb.DatastoreResponse + >; + createOnion: grpc.handleUnaryCall< + cln_node_pb.CreateonionRequest, + cln_node_pb.CreateonionResponse + >; + delDatastore: grpc.handleUnaryCall< + cln_node_pb.DeldatastoreRequest, + cln_node_pb.DeldatastoreResponse + >; + delExpiredInvoice: grpc.handleUnaryCall< + cln_node_pb.DelexpiredinvoiceRequest, + cln_node_pb.DelexpiredinvoiceResponse + >; + delInvoice: grpc.handleUnaryCall< + cln_node_pb.DelinvoiceRequest, + cln_node_pb.DelinvoiceResponse + >; + invoice: grpc.handleUnaryCall< + cln_node_pb.InvoiceRequest, + cln_node_pb.InvoiceResponse + >; + listDatastore: grpc.handleUnaryCall< + cln_node_pb.ListdatastoreRequest, + cln_node_pb.ListdatastoreResponse + >; + listInvoices: grpc.handleUnaryCall< + cln_node_pb.ListinvoicesRequest, + cln_node_pb.ListinvoicesResponse + >; + sendOnion: grpc.handleUnaryCall< + cln_node_pb.SendonionRequest, + cln_node_pb.SendonionResponse + >; + listSendPays: grpc.handleUnaryCall< + cln_node_pb.ListsendpaysRequest, + cln_node_pb.ListsendpaysResponse + >; + listTransactions: grpc.handleUnaryCall< + cln_node_pb.ListtransactionsRequest, + cln_node_pb.ListtransactionsResponse + >; + pay: grpc.handleUnaryCall; + listNodes: grpc.handleUnaryCall< + cln_node_pb.ListnodesRequest, + cln_node_pb.ListnodesResponse + >; + waitAnyInvoice: grpc.handleUnaryCall< + cln_node_pb.WaitanyinvoiceRequest, + cln_node_pb.WaitanyinvoiceResponse + >; + waitInvoice: grpc.handleUnaryCall< + cln_node_pb.WaitinvoiceRequest, + cln_node_pb.WaitinvoiceResponse + >; + waitSendPay: grpc.handleUnaryCall< + cln_node_pb.WaitsendpayRequest, + cln_node_pb.WaitsendpayResponse + >; + newAddr: grpc.handleUnaryCall< + cln_node_pb.NewaddrRequest, + cln_node_pb.NewaddrResponse + >; + withdraw: grpc.handleUnaryCall< + cln_node_pb.WithdrawRequest, + cln_node_pb.WithdrawResponse + >; + keySend: grpc.handleUnaryCall< + cln_node_pb.KeysendRequest, + cln_node_pb.KeysendResponse + >; + fundPsbt: grpc.handleUnaryCall< + cln_node_pb.FundpsbtRequest, + cln_node_pb.FundpsbtResponse + >; + sendPsbt: grpc.handleUnaryCall< + cln_node_pb.SendpsbtRequest, + cln_node_pb.SendpsbtResponse + >; + signPsbt: grpc.handleUnaryCall< + cln_node_pb.SignpsbtRequest, + cln_node_pb.SignpsbtResponse + >; + utxoPsbt: grpc.handleUnaryCall< + cln_node_pb.UtxopsbtRequest, + cln_node_pb.UtxopsbtResponse + >; + txDiscard: grpc.handleUnaryCall< + cln_node_pb.TxdiscardRequest, + cln_node_pb.TxdiscardResponse + >; + txPrepare: grpc.handleUnaryCall< + cln_node_pb.TxprepareRequest, + cln_node_pb.TxprepareResponse + >; + txSend: grpc.handleUnaryCall< + cln_node_pb.TxsendRequest, + cln_node_pb.TxsendResponse + >; + listPeerChannels: grpc.handleUnaryCall< + cln_node_pb.ListpeerchannelsRequest, + cln_node_pb.ListpeerchannelsResponse + >; + listClosedChannels: grpc.handleUnaryCall< + cln_node_pb.ListclosedchannelsRequest, + cln_node_pb.ListclosedchannelsResponse + >; + decodePay: grpc.handleUnaryCall< + cln_node_pb.DecodepayRequest, + cln_node_pb.DecodepayResponse + >; + decode: grpc.handleUnaryCall< + cln_node_pb.DecodeRequest, + cln_node_pb.DecodeResponse + >; + disconnect: grpc.handleUnaryCall< + cln_node_pb.DisconnectRequest, + cln_node_pb.DisconnectResponse + >; + feerates: grpc.handleUnaryCall< + cln_node_pb.FeeratesRequest, + cln_node_pb.FeeratesResponse + >; + fundChannel: grpc.handleUnaryCall< + cln_node_pb.FundchannelRequest, + cln_node_pb.FundchannelResponse + >; + getRoute: grpc.handleUnaryCall< + cln_node_pb.GetrouteRequest, + cln_node_pb.GetrouteResponse + >; + listForwards: grpc.handleUnaryCall< + cln_node_pb.ListforwardsRequest, + cln_node_pb.ListforwardsResponse + >; + listPays: grpc.handleUnaryCall< + cln_node_pb.ListpaysRequest, + cln_node_pb.ListpaysResponse + >; + ping: grpc.handleUnaryCall; + sendCustomMsg: grpc.handleUnaryCall< + cln_node_pb.SendcustommsgRequest, + cln_node_pb.SendcustommsgResponse + >; + setChannel: grpc.handleUnaryCall< + cln_node_pb.SetchannelRequest, + cln_node_pb.SetchannelResponse + >; + signInvoice: grpc.handleUnaryCall< + cln_node_pb.SigninvoiceRequest, + cln_node_pb.SigninvoiceResponse + >; + signMessage: grpc.handleUnaryCall< + cln_node_pb.SignmessageRequest, + cln_node_pb.SignmessageResponse + >; + stop: grpc.handleUnaryCall; +} + +export interface INodeClient { + getinfo( + request: cln_node_pb.GetinfoRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetinfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + getinfo( + request: cln_node_pb.GetinfoRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetinfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + getinfo( + request: cln_node_pb.GetinfoRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetinfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPeers( + request: cln_node_pb.ListpeersRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeersResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPeers( + request: cln_node_pb.ListpeersRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeersResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPeers( + request: cln_node_pb.ListpeersRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeersResponse, + ) => void, + ): grpc.ClientUnaryCall; + listFunds( + request: cln_node_pb.ListfundsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListfundsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listFunds( + request: cln_node_pb.ListfundsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListfundsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listFunds( + request: cln_node_pb.ListfundsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListfundsResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendPay( + request: cln_node_pb.SendpayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendPay( + request: cln_node_pb.SendpayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendPay( + request: cln_node_pb.SendpayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + listChannels( + request: cln_node_pb.ListchannelsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listChannels( + request: cln_node_pb.ListchannelsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listChannels( + request: cln_node_pb.ListchannelsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + addGossip( + request: cln_node_pb.AddgossipRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AddgossipResponse, + ) => void, + ): grpc.ClientUnaryCall; + addGossip( + request: cln_node_pb.AddgossipRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AddgossipResponse, + ) => void, + ): grpc.ClientUnaryCall; + addGossip( + request: cln_node_pb.AddgossipRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AddgossipResponse, + ) => void, + ): grpc.ClientUnaryCall; + autoCleanInvoice( + request: cln_node_pb.AutocleaninvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AutocleaninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + autoCleanInvoice( + request: cln_node_pb.AutocleaninvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AutocleaninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + autoCleanInvoice( + request: cln_node_pb.AutocleaninvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AutocleaninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + checkMessage( + request: cln_node_pb.CheckmessageRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CheckmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + checkMessage( + request: cln_node_pb.CheckmessageRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CheckmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + checkMessage( + request: cln_node_pb.CheckmessageRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CheckmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + close( + request: cln_node_pb.CloseRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CloseResponse, + ) => void, + ): grpc.ClientUnaryCall; + close( + request: cln_node_pb.CloseRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CloseResponse, + ) => void, + ): grpc.ClientUnaryCall; + close( + request: cln_node_pb.CloseRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CloseResponse, + ) => void, + ): grpc.ClientUnaryCall; + connectPeer( + request: cln_node_pb.ConnectRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ConnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + connectPeer( + request: cln_node_pb.ConnectRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ConnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + connectPeer( + request: cln_node_pb.ConnectRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ConnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + createInvoice( + request: cln_node_pb.CreateinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + createInvoice( + request: cln_node_pb.CreateinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + createInvoice( + request: cln_node_pb.CreateinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + datastore( + request: cln_node_pb.DatastoreRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + datastore( + request: cln_node_pb.DatastoreRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + datastore( + request: cln_node_pb.DatastoreRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + createOnion( + request: cln_node_pb.CreateonionRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + createOnion( + request: cln_node_pb.CreateonionRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + createOnion( + request: cln_node_pb.CreateonionRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + delDatastore( + request: cln_node_pb.DeldatastoreRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DeldatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + delDatastore( + request: cln_node_pb.DeldatastoreRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DeldatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + delDatastore( + request: cln_node_pb.DeldatastoreRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DeldatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + delExpiredInvoice( + request: cln_node_pb.DelexpiredinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelexpiredinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + delExpiredInvoice( + request: cln_node_pb.DelexpiredinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelexpiredinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + delExpiredInvoice( + request: cln_node_pb.DelexpiredinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelexpiredinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + delInvoice( + request: cln_node_pb.DelinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + delInvoice( + request: cln_node_pb.DelinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + delInvoice( + request: cln_node_pb.DelinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + invoice( + request: cln_node_pb.InvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + invoice( + request: cln_node_pb.InvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + invoice( + request: cln_node_pb.InvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + listDatastore( + request: cln_node_pb.ListdatastoreRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListdatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + listDatastore( + request: cln_node_pb.ListdatastoreRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListdatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + listDatastore( + request: cln_node_pb.ListdatastoreRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListdatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + listInvoices( + request: cln_node_pb.ListinvoicesRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListinvoicesResponse, + ) => void, + ): grpc.ClientUnaryCall; + listInvoices( + request: cln_node_pb.ListinvoicesRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListinvoicesResponse, + ) => void, + ): grpc.ClientUnaryCall; + listInvoices( + request: cln_node_pb.ListinvoicesRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListinvoicesResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendOnion( + request: cln_node_pb.SendonionRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendOnion( + request: cln_node_pb.SendonionRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendOnion( + request: cln_node_pb.SendonionRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + listSendPays( + request: cln_node_pb.ListsendpaysRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListsendpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + listSendPays( + request: cln_node_pb.ListsendpaysRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListsendpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + listSendPays( + request: cln_node_pb.ListsendpaysRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListsendpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + listTransactions( + request: cln_node_pb.ListtransactionsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListtransactionsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listTransactions( + request: cln_node_pb.ListtransactionsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListtransactionsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listTransactions( + request: cln_node_pb.ListtransactionsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListtransactionsResponse, + ) => void, + ): grpc.ClientUnaryCall; + pay( + request: cln_node_pb.PayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PayResponse, + ) => void, + ): grpc.ClientUnaryCall; + pay( + request: cln_node_pb.PayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PayResponse, + ) => void, + ): grpc.ClientUnaryCall; + pay( + request: cln_node_pb.PayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PayResponse, + ) => void, + ): grpc.ClientUnaryCall; + listNodes( + request: cln_node_pb.ListnodesRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListnodesResponse, + ) => void, + ): grpc.ClientUnaryCall; + listNodes( + request: cln_node_pb.ListnodesRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListnodesResponse, + ) => void, + ): grpc.ClientUnaryCall; + listNodes( + request: cln_node_pb.ListnodesRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListnodesResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitAnyInvoice( + request: cln_node_pb.WaitanyinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitanyinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitAnyInvoice( + request: cln_node_pb.WaitanyinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitanyinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitAnyInvoice( + request: cln_node_pb.WaitanyinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitanyinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitInvoice( + request: cln_node_pb.WaitinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitInvoice( + request: cln_node_pb.WaitinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitInvoice( + request: cln_node_pb.WaitinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitSendPay( + request: cln_node_pb.WaitsendpayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitsendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitSendPay( + request: cln_node_pb.WaitsendpayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitsendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + waitSendPay( + request: cln_node_pb.WaitsendpayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitsendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + newAddr( + request: cln_node_pb.NewaddrRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.NewaddrResponse, + ) => void, + ): grpc.ClientUnaryCall; + newAddr( + request: cln_node_pb.NewaddrRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.NewaddrResponse, + ) => void, + ): grpc.ClientUnaryCall; + newAddr( + request: cln_node_pb.NewaddrRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.NewaddrResponse, + ) => void, + ): grpc.ClientUnaryCall; + withdraw( + request: cln_node_pb.WithdrawRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WithdrawResponse, + ) => void, + ): grpc.ClientUnaryCall; + withdraw( + request: cln_node_pb.WithdrawRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WithdrawResponse, + ) => void, + ): grpc.ClientUnaryCall; + withdraw( + request: cln_node_pb.WithdrawRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WithdrawResponse, + ) => void, + ): grpc.ClientUnaryCall; + keySend( + request: cln_node_pb.KeysendRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.KeysendResponse, + ) => void, + ): grpc.ClientUnaryCall; + keySend( + request: cln_node_pb.KeysendRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.KeysendResponse, + ) => void, + ): grpc.ClientUnaryCall; + keySend( + request: cln_node_pb.KeysendRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.KeysendResponse, + ) => void, + ): grpc.ClientUnaryCall; + fundPsbt( + request: cln_node_pb.FundpsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + fundPsbt( + request: cln_node_pb.FundpsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + fundPsbt( + request: cln_node_pb.FundpsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendPsbt( + request: cln_node_pb.SendpsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendPsbt( + request: cln_node_pb.SendpsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendPsbt( + request: cln_node_pb.SendpsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + signPsbt( + request: cln_node_pb.SignpsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + signPsbt( + request: cln_node_pb.SignpsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + signPsbt( + request: cln_node_pb.SignpsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + utxoPsbt( + request: cln_node_pb.UtxopsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.UtxopsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + utxoPsbt( + request: cln_node_pb.UtxopsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.UtxopsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + utxoPsbt( + request: cln_node_pb.UtxopsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.UtxopsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + txDiscard( + request: cln_node_pb.TxdiscardRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxdiscardResponse, + ) => void, + ): grpc.ClientUnaryCall; + txDiscard( + request: cln_node_pb.TxdiscardRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxdiscardResponse, + ) => void, + ): grpc.ClientUnaryCall; + txDiscard( + request: cln_node_pb.TxdiscardRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxdiscardResponse, + ) => void, + ): grpc.ClientUnaryCall; + txPrepare( + request: cln_node_pb.TxprepareRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxprepareResponse, + ) => void, + ): grpc.ClientUnaryCall; + txPrepare( + request: cln_node_pb.TxprepareRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxprepareResponse, + ) => void, + ): grpc.ClientUnaryCall; + txPrepare( + request: cln_node_pb.TxprepareRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxprepareResponse, + ) => void, + ): grpc.ClientUnaryCall; + txSend( + request: cln_node_pb.TxsendRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxsendResponse, + ) => void, + ): grpc.ClientUnaryCall; + txSend( + request: cln_node_pb.TxsendRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxsendResponse, + ) => void, + ): grpc.ClientUnaryCall; + txSend( + request: cln_node_pb.TxsendRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxsendResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPeerChannels( + request: cln_node_pb.ListpeerchannelsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeerchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPeerChannels( + request: cln_node_pb.ListpeerchannelsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeerchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPeerChannels( + request: cln_node_pb.ListpeerchannelsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeerchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listClosedChannels( + request: cln_node_pb.ListclosedchannelsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListclosedchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listClosedChannels( + request: cln_node_pb.ListclosedchannelsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListclosedchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listClosedChannels( + request: cln_node_pb.ListclosedchannelsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListclosedchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + decodePay( + request: cln_node_pb.DecodepayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodepayResponse, + ) => void, + ): grpc.ClientUnaryCall; + decodePay( + request: cln_node_pb.DecodepayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodepayResponse, + ) => void, + ): grpc.ClientUnaryCall; + decodePay( + request: cln_node_pb.DecodepayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodepayResponse, + ) => void, + ): grpc.ClientUnaryCall; + decode( + request: cln_node_pb.DecodeRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodeResponse, + ) => void, + ): grpc.ClientUnaryCall; + decode( + request: cln_node_pb.DecodeRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodeResponse, + ) => void, + ): grpc.ClientUnaryCall; + decode( + request: cln_node_pb.DecodeRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodeResponse, + ) => void, + ): grpc.ClientUnaryCall; + disconnect( + request: cln_node_pb.DisconnectRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DisconnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + disconnect( + request: cln_node_pb.DisconnectRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DisconnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + disconnect( + request: cln_node_pb.DisconnectRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DisconnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + feerates( + request: cln_node_pb.FeeratesRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FeeratesResponse, + ) => void, + ): grpc.ClientUnaryCall; + feerates( + request: cln_node_pb.FeeratesRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FeeratesResponse, + ) => void, + ): grpc.ClientUnaryCall; + feerates( + request: cln_node_pb.FeeratesRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FeeratesResponse, + ) => void, + ): grpc.ClientUnaryCall; + fundChannel( + request: cln_node_pb.FundchannelRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + fundChannel( + request: cln_node_pb.FundchannelRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + fundChannel( + request: cln_node_pb.FundchannelRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + getRoute( + request: cln_node_pb.GetrouteRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetrouteResponse, + ) => void, + ): grpc.ClientUnaryCall; + getRoute( + request: cln_node_pb.GetrouteRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetrouteResponse, + ) => void, + ): grpc.ClientUnaryCall; + getRoute( + request: cln_node_pb.GetrouteRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetrouteResponse, + ) => void, + ): grpc.ClientUnaryCall; + listForwards( + request: cln_node_pb.ListforwardsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListforwardsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listForwards( + request: cln_node_pb.ListforwardsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListforwardsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listForwards( + request: cln_node_pb.ListforwardsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListforwardsResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPays( + request: cln_node_pb.ListpaysRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPays( + request: cln_node_pb.ListpaysRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + listPays( + request: cln_node_pb.ListpaysRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + ping( + request: cln_node_pb.PingRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PingResponse, + ) => void, + ): grpc.ClientUnaryCall; + ping( + request: cln_node_pb.PingRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PingResponse, + ) => void, + ): grpc.ClientUnaryCall; + ping( + request: cln_node_pb.PingRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PingResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendCustomMsg( + request: cln_node_pb.SendcustommsgRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendcustommsgResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendCustomMsg( + request: cln_node_pb.SendcustommsgRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendcustommsgResponse, + ) => void, + ): grpc.ClientUnaryCall; + sendCustomMsg( + request: cln_node_pb.SendcustommsgRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendcustommsgResponse, + ) => void, + ): grpc.ClientUnaryCall; + setChannel( + request: cln_node_pb.SetchannelRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SetchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + setChannel( + request: cln_node_pb.SetchannelRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SetchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + setChannel( + request: cln_node_pb.SetchannelRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SetchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + signInvoice( + request: cln_node_pb.SigninvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SigninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + signInvoice( + request: cln_node_pb.SigninvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SigninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + signInvoice( + request: cln_node_pb.SigninvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SigninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + signMessage( + request: cln_node_pb.SignmessageRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + signMessage( + request: cln_node_pb.SignmessageRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + signMessage( + request: cln_node_pb.SignmessageRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + stop( + request: cln_node_pb.StopRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.StopResponse, + ) => void, + ): grpc.ClientUnaryCall; + stop( + request: cln_node_pb.StopRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.StopResponse, + ) => void, + ): grpc.ClientUnaryCall; + stop( + request: cln_node_pb.StopRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.StopResponse, + ) => void, + ): grpc.ClientUnaryCall; +} + +export class NodeClient extends grpc.Client implements INodeClient { + constructor( + address: string, + credentials: grpc.ChannelCredentials, + options?: Partial, + ); + public getinfo( + request: cln_node_pb.GetinfoRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetinfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getinfo( + request: cln_node_pb.GetinfoRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetinfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getinfo( + request: cln_node_pb.GetinfoRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetinfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPeers( + request: cln_node_pb.ListpeersRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeersResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPeers( + request: cln_node_pb.ListpeersRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeersResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPeers( + request: cln_node_pb.ListpeersRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeersResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listFunds( + request: cln_node_pb.ListfundsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListfundsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listFunds( + request: cln_node_pb.ListfundsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListfundsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listFunds( + request: cln_node_pb.ListfundsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListfundsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendPay( + request: cln_node_pb.SendpayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendPay( + request: cln_node_pb.SendpayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendPay( + request: cln_node_pb.SendpayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listChannels( + request: cln_node_pb.ListchannelsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listChannels( + request: cln_node_pb.ListchannelsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listChannels( + request: cln_node_pb.ListchannelsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public addGossip( + request: cln_node_pb.AddgossipRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AddgossipResponse, + ) => void, + ): grpc.ClientUnaryCall; + public addGossip( + request: cln_node_pb.AddgossipRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AddgossipResponse, + ) => void, + ): grpc.ClientUnaryCall; + public addGossip( + request: cln_node_pb.AddgossipRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AddgossipResponse, + ) => void, + ): grpc.ClientUnaryCall; + public autoCleanInvoice( + request: cln_node_pb.AutocleaninvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AutocleaninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public autoCleanInvoice( + request: cln_node_pb.AutocleaninvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AutocleaninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public autoCleanInvoice( + request: cln_node_pb.AutocleaninvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.AutocleaninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public checkMessage( + request: cln_node_pb.CheckmessageRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CheckmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + public checkMessage( + request: cln_node_pb.CheckmessageRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CheckmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + public checkMessage( + request: cln_node_pb.CheckmessageRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CheckmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + public close( + request: cln_node_pb.CloseRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CloseResponse, + ) => void, + ): grpc.ClientUnaryCall; + public close( + request: cln_node_pb.CloseRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CloseResponse, + ) => void, + ): grpc.ClientUnaryCall; + public close( + request: cln_node_pb.CloseRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CloseResponse, + ) => void, + ): grpc.ClientUnaryCall; + public connectPeer( + request: cln_node_pb.ConnectRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ConnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + public connectPeer( + request: cln_node_pb.ConnectRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ConnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + public connectPeer( + request: cln_node_pb.ConnectRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ConnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + public createInvoice( + request: cln_node_pb.CreateinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public createInvoice( + request: cln_node_pb.CreateinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public createInvoice( + request: cln_node_pb.CreateinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public datastore( + request: cln_node_pb.DatastoreRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public datastore( + request: cln_node_pb.DatastoreRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public datastore( + request: cln_node_pb.DatastoreRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public createOnion( + request: cln_node_pb.CreateonionRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + public createOnion( + request: cln_node_pb.CreateonionRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + public createOnion( + request: cln_node_pb.CreateonionRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.CreateonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delDatastore( + request: cln_node_pb.DeldatastoreRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DeldatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delDatastore( + request: cln_node_pb.DeldatastoreRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DeldatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delDatastore( + request: cln_node_pb.DeldatastoreRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DeldatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delExpiredInvoice( + request: cln_node_pb.DelexpiredinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelexpiredinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delExpiredInvoice( + request: cln_node_pb.DelexpiredinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelexpiredinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delExpiredInvoice( + request: cln_node_pb.DelexpiredinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelexpiredinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delInvoice( + request: cln_node_pb.DelinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delInvoice( + request: cln_node_pb.DelinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public delInvoice( + request: cln_node_pb.DelinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DelinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public invoice( + request: cln_node_pb.InvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public invoice( + request: cln_node_pb.InvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public invoice( + request: cln_node_pb.InvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listDatastore( + request: cln_node_pb.ListdatastoreRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListdatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listDatastore( + request: cln_node_pb.ListdatastoreRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListdatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listDatastore( + request: cln_node_pb.ListdatastoreRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListdatastoreResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listInvoices( + request: cln_node_pb.ListinvoicesRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListinvoicesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listInvoices( + request: cln_node_pb.ListinvoicesRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListinvoicesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listInvoices( + request: cln_node_pb.ListinvoicesRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListinvoicesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendOnion( + request: cln_node_pb.SendonionRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendOnion( + request: cln_node_pb.SendonionRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendOnion( + request: cln_node_pb.SendonionRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendonionResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listSendPays( + request: cln_node_pb.ListsendpaysRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListsendpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listSendPays( + request: cln_node_pb.ListsendpaysRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListsendpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listSendPays( + request: cln_node_pb.ListsendpaysRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListsendpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listTransactions( + request: cln_node_pb.ListtransactionsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListtransactionsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listTransactions( + request: cln_node_pb.ListtransactionsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListtransactionsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listTransactions( + request: cln_node_pb.ListtransactionsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListtransactionsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public pay( + request: cln_node_pb.PayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public pay( + request: cln_node_pb.PayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public pay( + request: cln_node_pb.PayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listNodes( + request: cln_node_pb.ListnodesRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListnodesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listNodes( + request: cln_node_pb.ListnodesRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListnodesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listNodes( + request: cln_node_pb.ListnodesRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListnodesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitAnyInvoice( + request: cln_node_pb.WaitanyinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitanyinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitAnyInvoice( + request: cln_node_pb.WaitanyinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitanyinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitAnyInvoice( + request: cln_node_pb.WaitanyinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitanyinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitInvoice( + request: cln_node_pb.WaitinvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitInvoice( + request: cln_node_pb.WaitinvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitInvoice( + request: cln_node_pb.WaitinvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitinvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitSendPay( + request: cln_node_pb.WaitsendpayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitsendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitSendPay( + request: cln_node_pb.WaitsendpayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitsendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public waitSendPay( + request: cln_node_pb.WaitsendpayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WaitsendpayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public newAddr( + request: cln_node_pb.NewaddrRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.NewaddrResponse, + ) => void, + ): grpc.ClientUnaryCall; + public newAddr( + request: cln_node_pb.NewaddrRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.NewaddrResponse, + ) => void, + ): grpc.ClientUnaryCall; + public newAddr( + request: cln_node_pb.NewaddrRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.NewaddrResponse, + ) => void, + ): grpc.ClientUnaryCall; + public withdraw( + request: cln_node_pb.WithdrawRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WithdrawResponse, + ) => void, + ): grpc.ClientUnaryCall; + public withdraw( + request: cln_node_pb.WithdrawRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WithdrawResponse, + ) => void, + ): grpc.ClientUnaryCall; + public withdraw( + request: cln_node_pb.WithdrawRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.WithdrawResponse, + ) => void, + ): grpc.ClientUnaryCall; + public keySend( + request: cln_node_pb.KeysendRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.KeysendResponse, + ) => void, + ): grpc.ClientUnaryCall; + public keySend( + request: cln_node_pb.KeysendRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.KeysendResponse, + ) => void, + ): grpc.ClientUnaryCall; + public keySend( + request: cln_node_pb.KeysendRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.KeysendResponse, + ) => void, + ): grpc.ClientUnaryCall; + public fundPsbt( + request: cln_node_pb.FundpsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public fundPsbt( + request: cln_node_pb.FundpsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public fundPsbt( + request: cln_node_pb.FundpsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendPsbt( + request: cln_node_pb.SendpsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendPsbt( + request: cln_node_pb.SendpsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendPsbt( + request: cln_node_pb.SendpsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signPsbt( + request: cln_node_pb.SignpsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signPsbt( + request: cln_node_pb.SignpsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signPsbt( + request: cln_node_pb.SignpsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignpsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public utxoPsbt( + request: cln_node_pb.UtxopsbtRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.UtxopsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public utxoPsbt( + request: cln_node_pb.UtxopsbtRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.UtxopsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public utxoPsbt( + request: cln_node_pb.UtxopsbtRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.UtxopsbtResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txDiscard( + request: cln_node_pb.TxdiscardRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxdiscardResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txDiscard( + request: cln_node_pb.TxdiscardRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxdiscardResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txDiscard( + request: cln_node_pb.TxdiscardRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxdiscardResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txPrepare( + request: cln_node_pb.TxprepareRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxprepareResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txPrepare( + request: cln_node_pb.TxprepareRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxprepareResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txPrepare( + request: cln_node_pb.TxprepareRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxprepareResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txSend( + request: cln_node_pb.TxsendRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxsendResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txSend( + request: cln_node_pb.TxsendRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxsendResponse, + ) => void, + ): grpc.ClientUnaryCall; + public txSend( + request: cln_node_pb.TxsendRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.TxsendResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPeerChannels( + request: cln_node_pb.ListpeerchannelsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeerchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPeerChannels( + request: cln_node_pb.ListpeerchannelsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeerchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPeerChannels( + request: cln_node_pb.ListpeerchannelsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpeerchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listClosedChannels( + request: cln_node_pb.ListclosedchannelsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListclosedchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listClosedChannels( + request: cln_node_pb.ListclosedchannelsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListclosedchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listClosedChannels( + request: cln_node_pb.ListclosedchannelsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListclosedchannelsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public decodePay( + request: cln_node_pb.DecodepayRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodepayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public decodePay( + request: cln_node_pb.DecodepayRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodepayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public decodePay( + request: cln_node_pb.DecodepayRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodepayResponse, + ) => void, + ): grpc.ClientUnaryCall; + public decode( + request: cln_node_pb.DecodeRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodeResponse, + ) => void, + ): grpc.ClientUnaryCall; + public decode( + request: cln_node_pb.DecodeRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodeResponse, + ) => void, + ): grpc.ClientUnaryCall; + public decode( + request: cln_node_pb.DecodeRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DecodeResponse, + ) => void, + ): grpc.ClientUnaryCall; + public disconnect( + request: cln_node_pb.DisconnectRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DisconnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + public disconnect( + request: cln_node_pb.DisconnectRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DisconnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + public disconnect( + request: cln_node_pb.DisconnectRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.DisconnectResponse, + ) => void, + ): grpc.ClientUnaryCall; + public feerates( + request: cln_node_pb.FeeratesRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FeeratesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public feerates( + request: cln_node_pb.FeeratesRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FeeratesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public feerates( + request: cln_node_pb.FeeratesRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FeeratesResponse, + ) => void, + ): grpc.ClientUnaryCall; + public fundChannel( + request: cln_node_pb.FundchannelRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public fundChannel( + request: cln_node_pb.FundchannelRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public fundChannel( + request: cln_node_pb.FundchannelRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.FundchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getRoute( + request: cln_node_pb.GetrouteRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetrouteResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getRoute( + request: cln_node_pb.GetrouteRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetrouteResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getRoute( + request: cln_node_pb.GetrouteRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.GetrouteResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listForwards( + request: cln_node_pb.ListforwardsRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListforwardsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listForwards( + request: cln_node_pb.ListforwardsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListforwardsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listForwards( + request: cln_node_pb.ListforwardsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListforwardsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPays( + request: cln_node_pb.ListpaysRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPays( + request: cln_node_pb.ListpaysRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + public listPays( + request: cln_node_pb.ListpaysRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.ListpaysResponse, + ) => void, + ): grpc.ClientUnaryCall; + public ping( + request: cln_node_pb.PingRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PingResponse, + ) => void, + ): grpc.ClientUnaryCall; + public ping( + request: cln_node_pb.PingRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PingResponse, + ) => void, + ): grpc.ClientUnaryCall; + public ping( + request: cln_node_pb.PingRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.PingResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendCustomMsg( + request: cln_node_pb.SendcustommsgRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendcustommsgResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendCustomMsg( + request: cln_node_pb.SendcustommsgRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendcustommsgResponse, + ) => void, + ): grpc.ClientUnaryCall; + public sendCustomMsg( + request: cln_node_pb.SendcustommsgRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SendcustommsgResponse, + ) => void, + ): grpc.ClientUnaryCall; + public setChannel( + request: cln_node_pb.SetchannelRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SetchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public setChannel( + request: cln_node_pb.SetchannelRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SetchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public setChannel( + request: cln_node_pb.SetchannelRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SetchannelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signInvoice( + request: cln_node_pb.SigninvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SigninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signInvoice( + request: cln_node_pb.SigninvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SigninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signInvoice( + request: cln_node_pb.SigninvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SigninvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signMessage( + request: cln_node_pb.SignmessageRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signMessage( + request: cln_node_pb.SignmessageRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + public signMessage( + request: cln_node_pb.SignmessageRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.SignmessageResponse, + ) => void, + ): grpc.ClientUnaryCall; + public stop( + request: cln_node_pb.StopRequest, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.StopResponse, + ) => void, + ): grpc.ClientUnaryCall; + public stop( + request: cln_node_pb.StopRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.StopResponse, + ) => void, + ): grpc.ClientUnaryCall; + public stop( + request: cln_node_pb.StopRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: cln_node_pb.StopResponse, + ) => void, + ): grpc.ClientUnaryCall; +} diff --git a/lib/proto/cln/node_grpc_pb.js b/lib/proto/cln/node_grpc_pb.js new file mode 100644 index 000000000..9fb13c9f6 --- /dev/null +++ b/lib/proto/cln/node_grpc_pb.js @@ -0,0 +1,1761 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var cln_node_pb = require('../cln/node_pb.js'); +var cln_primitives_pb = require('../cln/primitives_pb.js'); + +function serialize_cln_AddgossipRequest(arg) { + if (!(arg instanceof cln_node_pb.AddgossipRequest)) { + throw new Error('Expected argument of type cln.AddgossipRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_AddgossipRequest(buffer_arg) { + return cln_node_pb.AddgossipRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_AddgossipResponse(arg) { + if (!(arg instanceof cln_node_pb.AddgossipResponse)) { + throw new Error('Expected argument of type cln.AddgossipResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_AddgossipResponse(buffer_arg) { + return cln_node_pb.AddgossipResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_AutocleaninvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.AutocleaninvoiceRequest)) { + throw new Error('Expected argument of type cln.AutocleaninvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_AutocleaninvoiceRequest(buffer_arg) { + return cln_node_pb.AutocleaninvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_AutocleaninvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.AutocleaninvoiceResponse)) { + throw new Error('Expected argument of type cln.AutocleaninvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_AutocleaninvoiceResponse(buffer_arg) { + return cln_node_pb.AutocleaninvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CheckmessageRequest(arg) { + if (!(arg instanceof cln_node_pb.CheckmessageRequest)) { + throw new Error('Expected argument of type cln.CheckmessageRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CheckmessageRequest(buffer_arg) { + return cln_node_pb.CheckmessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CheckmessageResponse(arg) { + if (!(arg instanceof cln_node_pb.CheckmessageResponse)) { + throw new Error('Expected argument of type cln.CheckmessageResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CheckmessageResponse(buffer_arg) { + return cln_node_pb.CheckmessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CloseRequest(arg) { + if (!(arg instanceof cln_node_pb.CloseRequest)) { + throw new Error('Expected argument of type cln.CloseRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CloseRequest(buffer_arg) { + return cln_node_pb.CloseRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CloseResponse(arg) { + if (!(arg instanceof cln_node_pb.CloseResponse)) { + throw new Error('Expected argument of type cln.CloseResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CloseResponse(buffer_arg) { + return cln_node_pb.CloseResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ConnectRequest(arg) { + if (!(arg instanceof cln_node_pb.ConnectRequest)) { + throw new Error('Expected argument of type cln.ConnectRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ConnectRequest(buffer_arg) { + return cln_node_pb.ConnectRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ConnectResponse(arg) { + if (!(arg instanceof cln_node_pb.ConnectResponse)) { + throw new Error('Expected argument of type cln.ConnectResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ConnectResponse(buffer_arg) { + return cln_node_pb.ConnectResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CreateinvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.CreateinvoiceRequest)) { + throw new Error('Expected argument of type cln.CreateinvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CreateinvoiceRequest(buffer_arg) { + return cln_node_pb.CreateinvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CreateinvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.CreateinvoiceResponse)) { + throw new Error('Expected argument of type cln.CreateinvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CreateinvoiceResponse(buffer_arg) { + return cln_node_pb.CreateinvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CreateonionRequest(arg) { + if (!(arg instanceof cln_node_pb.CreateonionRequest)) { + throw new Error('Expected argument of type cln.CreateonionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CreateonionRequest(buffer_arg) { + return cln_node_pb.CreateonionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_CreateonionResponse(arg) { + if (!(arg instanceof cln_node_pb.CreateonionResponse)) { + throw new Error('Expected argument of type cln.CreateonionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_CreateonionResponse(buffer_arg) { + return cln_node_pb.CreateonionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DatastoreRequest(arg) { + if (!(arg instanceof cln_node_pb.DatastoreRequest)) { + throw new Error('Expected argument of type cln.DatastoreRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DatastoreRequest(buffer_arg) { + return cln_node_pb.DatastoreRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DatastoreResponse(arg) { + if (!(arg instanceof cln_node_pb.DatastoreResponse)) { + throw new Error('Expected argument of type cln.DatastoreResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DatastoreResponse(buffer_arg) { + return cln_node_pb.DatastoreResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DecodeRequest(arg) { + if (!(arg instanceof cln_node_pb.DecodeRequest)) { + throw new Error('Expected argument of type cln.DecodeRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DecodeRequest(buffer_arg) { + return cln_node_pb.DecodeRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DecodeResponse(arg) { + if (!(arg instanceof cln_node_pb.DecodeResponse)) { + throw new Error('Expected argument of type cln.DecodeResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DecodeResponse(buffer_arg) { + return cln_node_pb.DecodeResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DecodepayRequest(arg) { + if (!(arg instanceof cln_node_pb.DecodepayRequest)) { + throw new Error('Expected argument of type cln.DecodepayRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DecodepayRequest(buffer_arg) { + return cln_node_pb.DecodepayRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DecodepayResponse(arg) { + if (!(arg instanceof cln_node_pb.DecodepayResponse)) { + throw new Error('Expected argument of type cln.DecodepayResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DecodepayResponse(buffer_arg) { + return cln_node_pb.DecodepayResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DeldatastoreRequest(arg) { + if (!(arg instanceof cln_node_pb.DeldatastoreRequest)) { + throw new Error('Expected argument of type cln.DeldatastoreRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DeldatastoreRequest(buffer_arg) { + return cln_node_pb.DeldatastoreRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DeldatastoreResponse(arg) { + if (!(arg instanceof cln_node_pb.DeldatastoreResponse)) { + throw new Error('Expected argument of type cln.DeldatastoreResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DeldatastoreResponse(buffer_arg) { + return cln_node_pb.DeldatastoreResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DelexpiredinvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.DelexpiredinvoiceRequest)) { + throw new Error('Expected argument of type cln.DelexpiredinvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DelexpiredinvoiceRequest(buffer_arg) { + return cln_node_pb.DelexpiredinvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DelexpiredinvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.DelexpiredinvoiceResponse)) { + throw new Error('Expected argument of type cln.DelexpiredinvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DelexpiredinvoiceResponse(buffer_arg) { + return cln_node_pb.DelexpiredinvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DelinvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.DelinvoiceRequest)) { + throw new Error('Expected argument of type cln.DelinvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DelinvoiceRequest(buffer_arg) { + return cln_node_pb.DelinvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DelinvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.DelinvoiceResponse)) { + throw new Error('Expected argument of type cln.DelinvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DelinvoiceResponse(buffer_arg) { + return cln_node_pb.DelinvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DisconnectRequest(arg) { + if (!(arg instanceof cln_node_pb.DisconnectRequest)) { + throw new Error('Expected argument of type cln.DisconnectRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DisconnectRequest(buffer_arg) { + return cln_node_pb.DisconnectRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_DisconnectResponse(arg) { + if (!(arg instanceof cln_node_pb.DisconnectResponse)) { + throw new Error('Expected argument of type cln.DisconnectResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_DisconnectResponse(buffer_arg) { + return cln_node_pb.DisconnectResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_FeeratesRequest(arg) { + if (!(arg instanceof cln_node_pb.FeeratesRequest)) { + throw new Error('Expected argument of type cln.FeeratesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_FeeratesRequest(buffer_arg) { + return cln_node_pb.FeeratesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_FeeratesResponse(arg) { + if (!(arg instanceof cln_node_pb.FeeratesResponse)) { + throw new Error('Expected argument of type cln.FeeratesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_FeeratesResponse(buffer_arg) { + return cln_node_pb.FeeratesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_FundchannelRequest(arg) { + if (!(arg instanceof cln_node_pb.FundchannelRequest)) { + throw new Error('Expected argument of type cln.FundchannelRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_FundchannelRequest(buffer_arg) { + return cln_node_pb.FundchannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_FundchannelResponse(arg) { + if (!(arg instanceof cln_node_pb.FundchannelResponse)) { + throw new Error('Expected argument of type cln.FundchannelResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_FundchannelResponse(buffer_arg) { + return cln_node_pb.FundchannelResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_FundpsbtRequest(arg) { + if (!(arg instanceof cln_node_pb.FundpsbtRequest)) { + throw new Error('Expected argument of type cln.FundpsbtRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_FundpsbtRequest(buffer_arg) { + return cln_node_pb.FundpsbtRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_FundpsbtResponse(arg) { + if (!(arg instanceof cln_node_pb.FundpsbtResponse)) { + throw new Error('Expected argument of type cln.FundpsbtResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_FundpsbtResponse(buffer_arg) { + return cln_node_pb.FundpsbtResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_GetinfoRequest(arg) { + if (!(arg instanceof cln_node_pb.GetinfoRequest)) { + throw new Error('Expected argument of type cln.GetinfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_GetinfoRequest(buffer_arg) { + return cln_node_pb.GetinfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_GetinfoResponse(arg) { + if (!(arg instanceof cln_node_pb.GetinfoResponse)) { + throw new Error('Expected argument of type cln.GetinfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_GetinfoResponse(buffer_arg) { + return cln_node_pb.GetinfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_GetrouteRequest(arg) { + if (!(arg instanceof cln_node_pb.GetrouteRequest)) { + throw new Error('Expected argument of type cln.GetrouteRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_GetrouteRequest(buffer_arg) { + return cln_node_pb.GetrouteRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_GetrouteResponse(arg) { + if (!(arg instanceof cln_node_pb.GetrouteResponse)) { + throw new Error('Expected argument of type cln.GetrouteResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_GetrouteResponse(buffer_arg) { + return cln_node_pb.GetrouteResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_InvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.InvoiceRequest)) { + throw new Error('Expected argument of type cln.InvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_InvoiceRequest(buffer_arg) { + return cln_node_pb.InvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_InvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.InvoiceResponse)) { + throw new Error('Expected argument of type cln.InvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_InvoiceResponse(buffer_arg) { + return cln_node_pb.InvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_KeysendRequest(arg) { + if (!(arg instanceof cln_node_pb.KeysendRequest)) { + throw new Error('Expected argument of type cln.KeysendRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_KeysendRequest(buffer_arg) { + return cln_node_pb.KeysendRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_KeysendResponse(arg) { + if (!(arg instanceof cln_node_pb.KeysendResponse)) { + throw new Error('Expected argument of type cln.KeysendResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_KeysendResponse(buffer_arg) { + return cln_node_pb.KeysendResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListchannelsRequest(arg) { + if (!(arg instanceof cln_node_pb.ListchannelsRequest)) { + throw new Error('Expected argument of type cln.ListchannelsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListchannelsRequest(buffer_arg) { + return cln_node_pb.ListchannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListchannelsResponse(arg) { + if (!(arg instanceof cln_node_pb.ListchannelsResponse)) { + throw new Error('Expected argument of type cln.ListchannelsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListchannelsResponse(buffer_arg) { + return cln_node_pb.ListchannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListclosedchannelsRequest(arg) { + if (!(arg instanceof cln_node_pb.ListclosedchannelsRequest)) { + throw new Error('Expected argument of type cln.ListclosedchannelsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListclosedchannelsRequest(buffer_arg) { + return cln_node_pb.ListclosedchannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListclosedchannelsResponse(arg) { + if (!(arg instanceof cln_node_pb.ListclosedchannelsResponse)) { + throw new Error('Expected argument of type cln.ListclosedchannelsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListclosedchannelsResponse(buffer_arg) { + return cln_node_pb.ListclosedchannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListdatastoreRequest(arg) { + if (!(arg instanceof cln_node_pb.ListdatastoreRequest)) { + throw new Error('Expected argument of type cln.ListdatastoreRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListdatastoreRequest(buffer_arg) { + return cln_node_pb.ListdatastoreRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListdatastoreResponse(arg) { + if (!(arg instanceof cln_node_pb.ListdatastoreResponse)) { + throw new Error('Expected argument of type cln.ListdatastoreResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListdatastoreResponse(buffer_arg) { + return cln_node_pb.ListdatastoreResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListforwardsRequest(arg) { + if (!(arg instanceof cln_node_pb.ListforwardsRequest)) { + throw new Error('Expected argument of type cln.ListforwardsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListforwardsRequest(buffer_arg) { + return cln_node_pb.ListforwardsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListforwardsResponse(arg) { + if (!(arg instanceof cln_node_pb.ListforwardsResponse)) { + throw new Error('Expected argument of type cln.ListforwardsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListforwardsResponse(buffer_arg) { + return cln_node_pb.ListforwardsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListfundsRequest(arg) { + if (!(arg instanceof cln_node_pb.ListfundsRequest)) { + throw new Error('Expected argument of type cln.ListfundsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListfundsRequest(buffer_arg) { + return cln_node_pb.ListfundsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListfundsResponse(arg) { + if (!(arg instanceof cln_node_pb.ListfundsResponse)) { + throw new Error('Expected argument of type cln.ListfundsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListfundsResponse(buffer_arg) { + return cln_node_pb.ListfundsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListinvoicesRequest(arg) { + if (!(arg instanceof cln_node_pb.ListinvoicesRequest)) { + throw new Error('Expected argument of type cln.ListinvoicesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListinvoicesRequest(buffer_arg) { + return cln_node_pb.ListinvoicesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListinvoicesResponse(arg) { + if (!(arg instanceof cln_node_pb.ListinvoicesResponse)) { + throw new Error('Expected argument of type cln.ListinvoicesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListinvoicesResponse(buffer_arg) { + return cln_node_pb.ListinvoicesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListnodesRequest(arg) { + if (!(arg instanceof cln_node_pb.ListnodesRequest)) { + throw new Error('Expected argument of type cln.ListnodesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListnodesRequest(buffer_arg) { + return cln_node_pb.ListnodesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListnodesResponse(arg) { + if (!(arg instanceof cln_node_pb.ListnodesResponse)) { + throw new Error('Expected argument of type cln.ListnodesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListnodesResponse(buffer_arg) { + return cln_node_pb.ListnodesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListpaysRequest(arg) { + if (!(arg instanceof cln_node_pb.ListpaysRequest)) { + throw new Error('Expected argument of type cln.ListpaysRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListpaysRequest(buffer_arg) { + return cln_node_pb.ListpaysRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListpaysResponse(arg) { + if (!(arg instanceof cln_node_pb.ListpaysResponse)) { + throw new Error('Expected argument of type cln.ListpaysResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListpaysResponse(buffer_arg) { + return cln_node_pb.ListpaysResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListpeerchannelsRequest(arg) { + if (!(arg instanceof cln_node_pb.ListpeerchannelsRequest)) { + throw new Error('Expected argument of type cln.ListpeerchannelsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListpeerchannelsRequest(buffer_arg) { + return cln_node_pb.ListpeerchannelsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListpeerchannelsResponse(arg) { + if (!(arg instanceof cln_node_pb.ListpeerchannelsResponse)) { + throw new Error('Expected argument of type cln.ListpeerchannelsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListpeerchannelsResponse(buffer_arg) { + return cln_node_pb.ListpeerchannelsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListpeersRequest(arg) { + if (!(arg instanceof cln_node_pb.ListpeersRequest)) { + throw new Error('Expected argument of type cln.ListpeersRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListpeersRequest(buffer_arg) { + return cln_node_pb.ListpeersRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListpeersResponse(arg) { + if (!(arg instanceof cln_node_pb.ListpeersResponse)) { + throw new Error('Expected argument of type cln.ListpeersResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListpeersResponse(buffer_arg) { + return cln_node_pb.ListpeersResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListsendpaysRequest(arg) { + if (!(arg instanceof cln_node_pb.ListsendpaysRequest)) { + throw new Error('Expected argument of type cln.ListsendpaysRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListsendpaysRequest(buffer_arg) { + return cln_node_pb.ListsendpaysRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListsendpaysResponse(arg) { + if (!(arg instanceof cln_node_pb.ListsendpaysResponse)) { + throw new Error('Expected argument of type cln.ListsendpaysResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListsendpaysResponse(buffer_arg) { + return cln_node_pb.ListsendpaysResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListtransactionsRequest(arg) { + if (!(arg instanceof cln_node_pb.ListtransactionsRequest)) { + throw new Error('Expected argument of type cln.ListtransactionsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListtransactionsRequest(buffer_arg) { + return cln_node_pb.ListtransactionsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_ListtransactionsResponse(arg) { + if (!(arg instanceof cln_node_pb.ListtransactionsResponse)) { + throw new Error('Expected argument of type cln.ListtransactionsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_ListtransactionsResponse(buffer_arg) { + return cln_node_pb.ListtransactionsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_NewaddrRequest(arg) { + if (!(arg instanceof cln_node_pb.NewaddrRequest)) { + throw new Error('Expected argument of type cln.NewaddrRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_NewaddrRequest(buffer_arg) { + return cln_node_pb.NewaddrRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_NewaddrResponse(arg) { + if (!(arg instanceof cln_node_pb.NewaddrResponse)) { + throw new Error('Expected argument of type cln.NewaddrResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_NewaddrResponse(buffer_arg) { + return cln_node_pb.NewaddrResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_PayRequest(arg) { + if (!(arg instanceof cln_node_pb.PayRequest)) { + throw new Error('Expected argument of type cln.PayRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_PayRequest(buffer_arg) { + return cln_node_pb.PayRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_PayResponse(arg) { + if (!(arg instanceof cln_node_pb.PayResponse)) { + throw new Error('Expected argument of type cln.PayResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_PayResponse(buffer_arg) { + return cln_node_pb.PayResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_PingRequest(arg) { + if (!(arg instanceof cln_node_pb.PingRequest)) { + throw new Error('Expected argument of type cln.PingRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_PingRequest(buffer_arg) { + return cln_node_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_PingResponse(arg) { + if (!(arg instanceof cln_node_pb.PingResponse)) { + throw new Error('Expected argument of type cln.PingResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_PingResponse(buffer_arg) { + return cln_node_pb.PingResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendcustommsgRequest(arg) { + if (!(arg instanceof cln_node_pb.SendcustommsgRequest)) { + throw new Error('Expected argument of type cln.SendcustommsgRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendcustommsgRequest(buffer_arg) { + return cln_node_pb.SendcustommsgRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendcustommsgResponse(arg) { + if (!(arg instanceof cln_node_pb.SendcustommsgResponse)) { + throw new Error('Expected argument of type cln.SendcustommsgResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendcustommsgResponse(buffer_arg) { + return cln_node_pb.SendcustommsgResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendonionRequest(arg) { + if (!(arg instanceof cln_node_pb.SendonionRequest)) { + throw new Error('Expected argument of type cln.SendonionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendonionRequest(buffer_arg) { + return cln_node_pb.SendonionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendonionResponse(arg) { + if (!(arg instanceof cln_node_pb.SendonionResponse)) { + throw new Error('Expected argument of type cln.SendonionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendonionResponse(buffer_arg) { + return cln_node_pb.SendonionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendpayRequest(arg) { + if (!(arg instanceof cln_node_pb.SendpayRequest)) { + throw new Error('Expected argument of type cln.SendpayRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendpayRequest(buffer_arg) { + return cln_node_pb.SendpayRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendpayResponse(arg) { + if (!(arg instanceof cln_node_pb.SendpayResponse)) { + throw new Error('Expected argument of type cln.SendpayResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendpayResponse(buffer_arg) { + return cln_node_pb.SendpayResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendpsbtRequest(arg) { + if (!(arg instanceof cln_node_pb.SendpsbtRequest)) { + throw new Error('Expected argument of type cln.SendpsbtRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendpsbtRequest(buffer_arg) { + return cln_node_pb.SendpsbtRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SendpsbtResponse(arg) { + if (!(arg instanceof cln_node_pb.SendpsbtResponse)) { + throw new Error('Expected argument of type cln.SendpsbtResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SendpsbtResponse(buffer_arg) { + return cln_node_pb.SendpsbtResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SetchannelRequest(arg) { + if (!(arg instanceof cln_node_pb.SetchannelRequest)) { + throw new Error('Expected argument of type cln.SetchannelRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SetchannelRequest(buffer_arg) { + return cln_node_pb.SetchannelRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SetchannelResponse(arg) { + if (!(arg instanceof cln_node_pb.SetchannelResponse)) { + throw new Error('Expected argument of type cln.SetchannelResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SetchannelResponse(buffer_arg) { + return cln_node_pb.SetchannelResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SigninvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.SigninvoiceRequest)) { + throw new Error('Expected argument of type cln.SigninvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SigninvoiceRequest(buffer_arg) { + return cln_node_pb.SigninvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SigninvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.SigninvoiceResponse)) { + throw new Error('Expected argument of type cln.SigninvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SigninvoiceResponse(buffer_arg) { + return cln_node_pb.SigninvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SignmessageRequest(arg) { + if (!(arg instanceof cln_node_pb.SignmessageRequest)) { + throw new Error('Expected argument of type cln.SignmessageRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SignmessageRequest(buffer_arg) { + return cln_node_pb.SignmessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SignmessageResponse(arg) { + if (!(arg instanceof cln_node_pb.SignmessageResponse)) { + throw new Error('Expected argument of type cln.SignmessageResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SignmessageResponse(buffer_arg) { + return cln_node_pb.SignmessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SignpsbtRequest(arg) { + if (!(arg instanceof cln_node_pb.SignpsbtRequest)) { + throw new Error('Expected argument of type cln.SignpsbtRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SignpsbtRequest(buffer_arg) { + return cln_node_pb.SignpsbtRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_SignpsbtResponse(arg) { + if (!(arg instanceof cln_node_pb.SignpsbtResponse)) { + throw new Error('Expected argument of type cln.SignpsbtResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_SignpsbtResponse(buffer_arg) { + return cln_node_pb.SignpsbtResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_StopRequest(arg) { + if (!(arg instanceof cln_node_pb.StopRequest)) { + throw new Error('Expected argument of type cln.StopRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_StopRequest(buffer_arg) { + return cln_node_pb.StopRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_StopResponse(arg) { + if (!(arg instanceof cln_node_pb.StopResponse)) { + throw new Error('Expected argument of type cln.StopResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_StopResponse(buffer_arg) { + return cln_node_pb.StopResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_TxdiscardRequest(arg) { + if (!(arg instanceof cln_node_pb.TxdiscardRequest)) { + throw new Error('Expected argument of type cln.TxdiscardRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_TxdiscardRequest(buffer_arg) { + return cln_node_pb.TxdiscardRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_TxdiscardResponse(arg) { + if (!(arg instanceof cln_node_pb.TxdiscardResponse)) { + throw new Error('Expected argument of type cln.TxdiscardResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_TxdiscardResponse(buffer_arg) { + return cln_node_pb.TxdiscardResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_TxprepareRequest(arg) { + if (!(arg instanceof cln_node_pb.TxprepareRequest)) { + throw new Error('Expected argument of type cln.TxprepareRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_TxprepareRequest(buffer_arg) { + return cln_node_pb.TxprepareRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_TxprepareResponse(arg) { + if (!(arg instanceof cln_node_pb.TxprepareResponse)) { + throw new Error('Expected argument of type cln.TxprepareResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_TxprepareResponse(buffer_arg) { + return cln_node_pb.TxprepareResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_TxsendRequest(arg) { + if (!(arg instanceof cln_node_pb.TxsendRequest)) { + throw new Error('Expected argument of type cln.TxsendRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_TxsendRequest(buffer_arg) { + return cln_node_pb.TxsendRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_TxsendResponse(arg) { + if (!(arg instanceof cln_node_pb.TxsendResponse)) { + throw new Error('Expected argument of type cln.TxsendResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_TxsendResponse(buffer_arg) { + return cln_node_pb.TxsendResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_UtxopsbtRequest(arg) { + if (!(arg instanceof cln_node_pb.UtxopsbtRequest)) { + throw new Error('Expected argument of type cln.UtxopsbtRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_UtxopsbtRequest(buffer_arg) { + return cln_node_pb.UtxopsbtRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_UtxopsbtResponse(arg) { + if (!(arg instanceof cln_node_pb.UtxopsbtResponse)) { + throw new Error('Expected argument of type cln.UtxopsbtResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_UtxopsbtResponse(buffer_arg) { + return cln_node_pb.UtxopsbtResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WaitanyinvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.WaitanyinvoiceRequest)) { + throw new Error('Expected argument of type cln.WaitanyinvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WaitanyinvoiceRequest(buffer_arg) { + return cln_node_pb.WaitanyinvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WaitanyinvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.WaitanyinvoiceResponse)) { + throw new Error('Expected argument of type cln.WaitanyinvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WaitanyinvoiceResponse(buffer_arg) { + return cln_node_pb.WaitanyinvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WaitinvoiceRequest(arg) { + if (!(arg instanceof cln_node_pb.WaitinvoiceRequest)) { + throw new Error('Expected argument of type cln.WaitinvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WaitinvoiceRequest(buffer_arg) { + return cln_node_pb.WaitinvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WaitinvoiceResponse(arg) { + if (!(arg instanceof cln_node_pb.WaitinvoiceResponse)) { + throw new Error('Expected argument of type cln.WaitinvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WaitinvoiceResponse(buffer_arg) { + return cln_node_pb.WaitinvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WaitsendpayRequest(arg) { + if (!(arg instanceof cln_node_pb.WaitsendpayRequest)) { + throw new Error('Expected argument of type cln.WaitsendpayRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WaitsendpayRequest(buffer_arg) { + return cln_node_pb.WaitsendpayRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WaitsendpayResponse(arg) { + if (!(arg instanceof cln_node_pb.WaitsendpayResponse)) { + throw new Error('Expected argument of type cln.WaitsendpayResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WaitsendpayResponse(buffer_arg) { + return cln_node_pb.WaitsendpayResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WithdrawRequest(arg) { + if (!(arg instanceof cln_node_pb.WithdrawRequest)) { + throw new Error('Expected argument of type cln.WithdrawRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WithdrawRequest(buffer_arg) { + return cln_node_pb.WithdrawRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_cln_WithdrawResponse(arg) { + if (!(arg instanceof cln_node_pb.WithdrawResponse)) { + throw new Error('Expected argument of type cln.WithdrawResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_cln_WithdrawResponse(buffer_arg) { + return cln_node_pb.WithdrawResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var NodeService = exports.NodeService = { + getinfo: { + path: '/cln.Node/Getinfo', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.GetinfoRequest, + responseType: cln_node_pb.GetinfoResponse, + requestSerialize: serialize_cln_GetinfoRequest, + requestDeserialize: deserialize_cln_GetinfoRequest, + responseSerialize: serialize_cln_GetinfoResponse, + responseDeserialize: deserialize_cln_GetinfoResponse, + }, + listPeers: { + path: '/cln.Node/ListPeers', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListpeersRequest, + responseType: cln_node_pb.ListpeersResponse, + requestSerialize: serialize_cln_ListpeersRequest, + requestDeserialize: deserialize_cln_ListpeersRequest, + responseSerialize: serialize_cln_ListpeersResponse, + responseDeserialize: deserialize_cln_ListpeersResponse, + }, + listFunds: { + path: '/cln.Node/ListFunds', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListfundsRequest, + responseType: cln_node_pb.ListfundsResponse, + requestSerialize: serialize_cln_ListfundsRequest, + requestDeserialize: deserialize_cln_ListfundsRequest, + responseSerialize: serialize_cln_ListfundsResponse, + responseDeserialize: deserialize_cln_ListfundsResponse, + }, + sendPay: { + path: '/cln.Node/SendPay', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SendpayRequest, + responseType: cln_node_pb.SendpayResponse, + requestSerialize: serialize_cln_SendpayRequest, + requestDeserialize: deserialize_cln_SendpayRequest, + responseSerialize: serialize_cln_SendpayResponse, + responseDeserialize: deserialize_cln_SendpayResponse, + }, + listChannels: { + path: '/cln.Node/ListChannels', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListchannelsRequest, + responseType: cln_node_pb.ListchannelsResponse, + requestSerialize: serialize_cln_ListchannelsRequest, + requestDeserialize: deserialize_cln_ListchannelsRequest, + responseSerialize: serialize_cln_ListchannelsResponse, + responseDeserialize: deserialize_cln_ListchannelsResponse, + }, + addGossip: { + path: '/cln.Node/AddGossip', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.AddgossipRequest, + responseType: cln_node_pb.AddgossipResponse, + requestSerialize: serialize_cln_AddgossipRequest, + requestDeserialize: deserialize_cln_AddgossipRequest, + responseSerialize: serialize_cln_AddgossipResponse, + responseDeserialize: deserialize_cln_AddgossipResponse, + }, + autoCleanInvoice: { + path: '/cln.Node/AutoCleanInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.AutocleaninvoiceRequest, + responseType: cln_node_pb.AutocleaninvoiceResponse, + requestSerialize: serialize_cln_AutocleaninvoiceRequest, + requestDeserialize: deserialize_cln_AutocleaninvoiceRequest, + responseSerialize: serialize_cln_AutocleaninvoiceResponse, + responseDeserialize: deserialize_cln_AutocleaninvoiceResponse, + }, + checkMessage: { + path: '/cln.Node/CheckMessage', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.CheckmessageRequest, + responseType: cln_node_pb.CheckmessageResponse, + requestSerialize: serialize_cln_CheckmessageRequest, + requestDeserialize: deserialize_cln_CheckmessageRequest, + responseSerialize: serialize_cln_CheckmessageResponse, + responseDeserialize: deserialize_cln_CheckmessageResponse, + }, + close: { + path: '/cln.Node/Close', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.CloseRequest, + responseType: cln_node_pb.CloseResponse, + requestSerialize: serialize_cln_CloseRequest, + requestDeserialize: deserialize_cln_CloseRequest, + responseSerialize: serialize_cln_CloseResponse, + responseDeserialize: deserialize_cln_CloseResponse, + }, + connectPeer: { + path: '/cln.Node/ConnectPeer', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ConnectRequest, + responseType: cln_node_pb.ConnectResponse, + requestSerialize: serialize_cln_ConnectRequest, + requestDeserialize: deserialize_cln_ConnectRequest, + responseSerialize: serialize_cln_ConnectResponse, + responseDeserialize: deserialize_cln_ConnectResponse, + }, + createInvoice: { + path: '/cln.Node/CreateInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.CreateinvoiceRequest, + responseType: cln_node_pb.CreateinvoiceResponse, + requestSerialize: serialize_cln_CreateinvoiceRequest, + requestDeserialize: deserialize_cln_CreateinvoiceRequest, + responseSerialize: serialize_cln_CreateinvoiceResponse, + responseDeserialize: deserialize_cln_CreateinvoiceResponse, + }, + datastore: { + path: '/cln.Node/Datastore', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DatastoreRequest, + responseType: cln_node_pb.DatastoreResponse, + requestSerialize: serialize_cln_DatastoreRequest, + requestDeserialize: deserialize_cln_DatastoreRequest, + responseSerialize: serialize_cln_DatastoreResponse, + responseDeserialize: deserialize_cln_DatastoreResponse, + }, + createOnion: { + path: '/cln.Node/CreateOnion', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.CreateonionRequest, + responseType: cln_node_pb.CreateonionResponse, + requestSerialize: serialize_cln_CreateonionRequest, + requestDeserialize: deserialize_cln_CreateonionRequest, + responseSerialize: serialize_cln_CreateonionResponse, + responseDeserialize: deserialize_cln_CreateonionResponse, + }, + delDatastore: { + path: '/cln.Node/DelDatastore', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DeldatastoreRequest, + responseType: cln_node_pb.DeldatastoreResponse, + requestSerialize: serialize_cln_DeldatastoreRequest, + requestDeserialize: deserialize_cln_DeldatastoreRequest, + responseSerialize: serialize_cln_DeldatastoreResponse, + responseDeserialize: deserialize_cln_DeldatastoreResponse, + }, + delExpiredInvoice: { + path: '/cln.Node/DelExpiredInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DelexpiredinvoiceRequest, + responseType: cln_node_pb.DelexpiredinvoiceResponse, + requestSerialize: serialize_cln_DelexpiredinvoiceRequest, + requestDeserialize: deserialize_cln_DelexpiredinvoiceRequest, + responseSerialize: serialize_cln_DelexpiredinvoiceResponse, + responseDeserialize: deserialize_cln_DelexpiredinvoiceResponse, + }, + delInvoice: { + path: '/cln.Node/DelInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DelinvoiceRequest, + responseType: cln_node_pb.DelinvoiceResponse, + requestSerialize: serialize_cln_DelinvoiceRequest, + requestDeserialize: deserialize_cln_DelinvoiceRequest, + responseSerialize: serialize_cln_DelinvoiceResponse, + responseDeserialize: deserialize_cln_DelinvoiceResponse, + }, + invoice: { + path: '/cln.Node/Invoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.InvoiceRequest, + responseType: cln_node_pb.InvoiceResponse, + requestSerialize: serialize_cln_InvoiceRequest, + requestDeserialize: deserialize_cln_InvoiceRequest, + responseSerialize: serialize_cln_InvoiceResponse, + responseDeserialize: deserialize_cln_InvoiceResponse, + }, + listDatastore: { + path: '/cln.Node/ListDatastore', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListdatastoreRequest, + responseType: cln_node_pb.ListdatastoreResponse, + requestSerialize: serialize_cln_ListdatastoreRequest, + requestDeserialize: deserialize_cln_ListdatastoreRequest, + responseSerialize: serialize_cln_ListdatastoreResponse, + responseDeserialize: deserialize_cln_ListdatastoreResponse, + }, + listInvoices: { + path: '/cln.Node/ListInvoices', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListinvoicesRequest, + responseType: cln_node_pb.ListinvoicesResponse, + requestSerialize: serialize_cln_ListinvoicesRequest, + requestDeserialize: deserialize_cln_ListinvoicesRequest, + responseSerialize: serialize_cln_ListinvoicesResponse, + responseDeserialize: deserialize_cln_ListinvoicesResponse, + }, + sendOnion: { + path: '/cln.Node/SendOnion', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SendonionRequest, + responseType: cln_node_pb.SendonionResponse, + requestSerialize: serialize_cln_SendonionRequest, + requestDeserialize: deserialize_cln_SendonionRequest, + responseSerialize: serialize_cln_SendonionResponse, + responseDeserialize: deserialize_cln_SendonionResponse, + }, + listSendPays: { + path: '/cln.Node/ListSendPays', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListsendpaysRequest, + responseType: cln_node_pb.ListsendpaysResponse, + requestSerialize: serialize_cln_ListsendpaysRequest, + requestDeserialize: deserialize_cln_ListsendpaysRequest, + responseSerialize: serialize_cln_ListsendpaysResponse, + responseDeserialize: deserialize_cln_ListsendpaysResponse, + }, + listTransactions: { + path: '/cln.Node/ListTransactions', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListtransactionsRequest, + responseType: cln_node_pb.ListtransactionsResponse, + requestSerialize: serialize_cln_ListtransactionsRequest, + requestDeserialize: deserialize_cln_ListtransactionsRequest, + responseSerialize: serialize_cln_ListtransactionsResponse, + responseDeserialize: deserialize_cln_ListtransactionsResponse, + }, + pay: { + path: '/cln.Node/Pay', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.PayRequest, + responseType: cln_node_pb.PayResponse, + requestSerialize: serialize_cln_PayRequest, + requestDeserialize: deserialize_cln_PayRequest, + responseSerialize: serialize_cln_PayResponse, + responseDeserialize: deserialize_cln_PayResponse, + }, + listNodes: { + path: '/cln.Node/ListNodes', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListnodesRequest, + responseType: cln_node_pb.ListnodesResponse, + requestSerialize: serialize_cln_ListnodesRequest, + requestDeserialize: deserialize_cln_ListnodesRequest, + responseSerialize: serialize_cln_ListnodesResponse, + responseDeserialize: deserialize_cln_ListnodesResponse, + }, + waitAnyInvoice: { + path: '/cln.Node/WaitAnyInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.WaitanyinvoiceRequest, + responseType: cln_node_pb.WaitanyinvoiceResponse, + requestSerialize: serialize_cln_WaitanyinvoiceRequest, + requestDeserialize: deserialize_cln_WaitanyinvoiceRequest, + responseSerialize: serialize_cln_WaitanyinvoiceResponse, + responseDeserialize: deserialize_cln_WaitanyinvoiceResponse, + }, + waitInvoice: { + path: '/cln.Node/WaitInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.WaitinvoiceRequest, + responseType: cln_node_pb.WaitinvoiceResponse, + requestSerialize: serialize_cln_WaitinvoiceRequest, + requestDeserialize: deserialize_cln_WaitinvoiceRequest, + responseSerialize: serialize_cln_WaitinvoiceResponse, + responseDeserialize: deserialize_cln_WaitinvoiceResponse, + }, + waitSendPay: { + path: '/cln.Node/WaitSendPay', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.WaitsendpayRequest, + responseType: cln_node_pb.WaitsendpayResponse, + requestSerialize: serialize_cln_WaitsendpayRequest, + requestDeserialize: deserialize_cln_WaitsendpayRequest, + responseSerialize: serialize_cln_WaitsendpayResponse, + responseDeserialize: deserialize_cln_WaitsendpayResponse, + }, + newAddr: { + path: '/cln.Node/NewAddr', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.NewaddrRequest, + responseType: cln_node_pb.NewaddrResponse, + requestSerialize: serialize_cln_NewaddrRequest, + requestDeserialize: deserialize_cln_NewaddrRequest, + responseSerialize: serialize_cln_NewaddrResponse, + responseDeserialize: deserialize_cln_NewaddrResponse, + }, + withdraw: { + path: '/cln.Node/Withdraw', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.WithdrawRequest, + responseType: cln_node_pb.WithdrawResponse, + requestSerialize: serialize_cln_WithdrawRequest, + requestDeserialize: deserialize_cln_WithdrawRequest, + responseSerialize: serialize_cln_WithdrawResponse, + responseDeserialize: deserialize_cln_WithdrawResponse, + }, + keySend: { + path: '/cln.Node/KeySend', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.KeysendRequest, + responseType: cln_node_pb.KeysendResponse, + requestSerialize: serialize_cln_KeysendRequest, + requestDeserialize: deserialize_cln_KeysendRequest, + responseSerialize: serialize_cln_KeysendResponse, + responseDeserialize: deserialize_cln_KeysendResponse, + }, + fundPsbt: { + path: '/cln.Node/FundPsbt', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.FundpsbtRequest, + responseType: cln_node_pb.FundpsbtResponse, + requestSerialize: serialize_cln_FundpsbtRequest, + requestDeserialize: deserialize_cln_FundpsbtRequest, + responseSerialize: serialize_cln_FundpsbtResponse, + responseDeserialize: deserialize_cln_FundpsbtResponse, + }, + sendPsbt: { + path: '/cln.Node/SendPsbt', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SendpsbtRequest, + responseType: cln_node_pb.SendpsbtResponse, + requestSerialize: serialize_cln_SendpsbtRequest, + requestDeserialize: deserialize_cln_SendpsbtRequest, + responseSerialize: serialize_cln_SendpsbtResponse, + responseDeserialize: deserialize_cln_SendpsbtResponse, + }, + signPsbt: { + path: '/cln.Node/SignPsbt', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SignpsbtRequest, + responseType: cln_node_pb.SignpsbtResponse, + requestSerialize: serialize_cln_SignpsbtRequest, + requestDeserialize: deserialize_cln_SignpsbtRequest, + responseSerialize: serialize_cln_SignpsbtResponse, + responseDeserialize: deserialize_cln_SignpsbtResponse, + }, + utxoPsbt: { + path: '/cln.Node/UtxoPsbt', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.UtxopsbtRequest, + responseType: cln_node_pb.UtxopsbtResponse, + requestSerialize: serialize_cln_UtxopsbtRequest, + requestDeserialize: deserialize_cln_UtxopsbtRequest, + responseSerialize: serialize_cln_UtxopsbtResponse, + responseDeserialize: deserialize_cln_UtxopsbtResponse, + }, + txDiscard: { + path: '/cln.Node/TxDiscard', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.TxdiscardRequest, + responseType: cln_node_pb.TxdiscardResponse, + requestSerialize: serialize_cln_TxdiscardRequest, + requestDeserialize: deserialize_cln_TxdiscardRequest, + responseSerialize: serialize_cln_TxdiscardResponse, + responseDeserialize: deserialize_cln_TxdiscardResponse, + }, + txPrepare: { + path: '/cln.Node/TxPrepare', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.TxprepareRequest, + responseType: cln_node_pb.TxprepareResponse, + requestSerialize: serialize_cln_TxprepareRequest, + requestDeserialize: deserialize_cln_TxprepareRequest, + responseSerialize: serialize_cln_TxprepareResponse, + responseDeserialize: deserialize_cln_TxprepareResponse, + }, + txSend: { + path: '/cln.Node/TxSend', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.TxsendRequest, + responseType: cln_node_pb.TxsendResponse, + requestSerialize: serialize_cln_TxsendRequest, + requestDeserialize: deserialize_cln_TxsendRequest, + responseSerialize: serialize_cln_TxsendResponse, + responseDeserialize: deserialize_cln_TxsendResponse, + }, + listPeerChannels: { + path: '/cln.Node/ListPeerChannels', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListpeerchannelsRequest, + responseType: cln_node_pb.ListpeerchannelsResponse, + requestSerialize: serialize_cln_ListpeerchannelsRequest, + requestDeserialize: deserialize_cln_ListpeerchannelsRequest, + responseSerialize: serialize_cln_ListpeerchannelsResponse, + responseDeserialize: deserialize_cln_ListpeerchannelsResponse, + }, + listClosedChannels: { + path: '/cln.Node/ListClosedChannels', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListclosedchannelsRequest, + responseType: cln_node_pb.ListclosedchannelsResponse, + requestSerialize: serialize_cln_ListclosedchannelsRequest, + requestDeserialize: deserialize_cln_ListclosedchannelsRequest, + responseSerialize: serialize_cln_ListclosedchannelsResponse, + responseDeserialize: deserialize_cln_ListclosedchannelsResponse, + }, + decodePay: { + path: '/cln.Node/DecodePay', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DecodepayRequest, + responseType: cln_node_pb.DecodepayResponse, + requestSerialize: serialize_cln_DecodepayRequest, + requestDeserialize: deserialize_cln_DecodepayRequest, + responseSerialize: serialize_cln_DecodepayResponse, + responseDeserialize: deserialize_cln_DecodepayResponse, + }, + decode: { + path: '/cln.Node/Decode', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DecodeRequest, + responseType: cln_node_pb.DecodeResponse, + requestSerialize: serialize_cln_DecodeRequest, + requestDeserialize: deserialize_cln_DecodeRequest, + responseSerialize: serialize_cln_DecodeResponse, + responseDeserialize: deserialize_cln_DecodeResponse, + }, + disconnect: { + path: '/cln.Node/Disconnect', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.DisconnectRequest, + responseType: cln_node_pb.DisconnectResponse, + requestSerialize: serialize_cln_DisconnectRequest, + requestDeserialize: deserialize_cln_DisconnectRequest, + responseSerialize: serialize_cln_DisconnectResponse, + responseDeserialize: deserialize_cln_DisconnectResponse, + }, + feerates: { + path: '/cln.Node/Feerates', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.FeeratesRequest, + responseType: cln_node_pb.FeeratesResponse, + requestSerialize: serialize_cln_FeeratesRequest, + requestDeserialize: deserialize_cln_FeeratesRequest, + responseSerialize: serialize_cln_FeeratesResponse, + responseDeserialize: deserialize_cln_FeeratesResponse, + }, + fundChannel: { + path: '/cln.Node/FundChannel', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.FundchannelRequest, + responseType: cln_node_pb.FundchannelResponse, + requestSerialize: serialize_cln_FundchannelRequest, + requestDeserialize: deserialize_cln_FundchannelRequest, + responseSerialize: serialize_cln_FundchannelResponse, + responseDeserialize: deserialize_cln_FundchannelResponse, + }, + getRoute: { + path: '/cln.Node/GetRoute', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.GetrouteRequest, + responseType: cln_node_pb.GetrouteResponse, + requestSerialize: serialize_cln_GetrouteRequest, + requestDeserialize: deserialize_cln_GetrouteRequest, + responseSerialize: serialize_cln_GetrouteResponse, + responseDeserialize: deserialize_cln_GetrouteResponse, + }, + listForwards: { + path: '/cln.Node/ListForwards', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListforwardsRequest, + responseType: cln_node_pb.ListforwardsResponse, + requestSerialize: serialize_cln_ListforwardsRequest, + requestDeserialize: deserialize_cln_ListforwardsRequest, + responseSerialize: serialize_cln_ListforwardsResponse, + responseDeserialize: deserialize_cln_ListforwardsResponse, + }, + listPays: { + path: '/cln.Node/ListPays', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.ListpaysRequest, + responseType: cln_node_pb.ListpaysResponse, + requestSerialize: serialize_cln_ListpaysRequest, + requestDeserialize: deserialize_cln_ListpaysRequest, + responseSerialize: serialize_cln_ListpaysResponse, + responseDeserialize: deserialize_cln_ListpaysResponse, + }, + ping: { + path: '/cln.Node/Ping', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.PingRequest, + responseType: cln_node_pb.PingResponse, + requestSerialize: serialize_cln_PingRequest, + requestDeserialize: deserialize_cln_PingRequest, + responseSerialize: serialize_cln_PingResponse, + responseDeserialize: deserialize_cln_PingResponse, + }, + sendCustomMsg: { + path: '/cln.Node/SendCustomMsg', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SendcustommsgRequest, + responseType: cln_node_pb.SendcustommsgResponse, + requestSerialize: serialize_cln_SendcustommsgRequest, + requestDeserialize: deserialize_cln_SendcustommsgRequest, + responseSerialize: serialize_cln_SendcustommsgResponse, + responseDeserialize: deserialize_cln_SendcustommsgResponse, + }, + setChannel: { + path: '/cln.Node/SetChannel', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SetchannelRequest, + responseType: cln_node_pb.SetchannelResponse, + requestSerialize: serialize_cln_SetchannelRequest, + requestDeserialize: deserialize_cln_SetchannelRequest, + responseSerialize: serialize_cln_SetchannelResponse, + responseDeserialize: deserialize_cln_SetchannelResponse, + }, + signInvoice: { + path: '/cln.Node/SignInvoice', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SigninvoiceRequest, + responseType: cln_node_pb.SigninvoiceResponse, + requestSerialize: serialize_cln_SigninvoiceRequest, + requestDeserialize: deserialize_cln_SigninvoiceRequest, + responseSerialize: serialize_cln_SigninvoiceResponse, + responseDeserialize: deserialize_cln_SigninvoiceResponse, + }, + signMessage: { + path: '/cln.Node/SignMessage', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.SignmessageRequest, + responseType: cln_node_pb.SignmessageResponse, + requestSerialize: serialize_cln_SignmessageRequest, + requestDeserialize: deserialize_cln_SignmessageRequest, + responseSerialize: serialize_cln_SignmessageResponse, + responseDeserialize: deserialize_cln_SignmessageResponse, + }, + stop: { + path: '/cln.Node/Stop', + requestStream: false, + responseStream: false, + requestType: cln_node_pb.StopRequest, + responseType: cln_node_pb.StopResponse, + requestSerialize: serialize_cln_StopRequest, + requestDeserialize: deserialize_cln_StopRequest, + responseSerialize: serialize_cln_StopResponse, + responseDeserialize: deserialize_cln_StopResponse, + }, +}; + +exports.NodeClient = grpc.makeGenericClientConstructor(NodeService); diff --git a/lib/proto/cln/node_pb.d.ts b/lib/proto/cln/node_pb.d.ts new file mode 100644 index 000000000..ca39967bb --- /dev/null +++ b/lib/proto/cln/node_pb.d.ts @@ -0,0 +1,9752 @@ +// package: cln +// file: cln/node.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from 'google-protobuf'; +import * as cln_primitives_pb from '../cln/primitives_pb'; + +export class GetinfoRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetinfoRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: GetinfoRequest, + ): GetinfoRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetinfoRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetinfoRequest; + static deserializeBinaryFromReader( + message: GetinfoRequest, + reader: jspb.BinaryReader, + ): GetinfoRequest; +} + +export namespace GetinfoRequest { + export type AsObject = {}; +} + +export class GetinfoResponse extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): GetinfoResponse; + getAlias(): string; + setAlias(value: string): GetinfoResponse; + getColor(): Uint8Array | string; + getColor_asU8(): Uint8Array; + getColor_asB64(): string; + setColor(value: Uint8Array | string): GetinfoResponse; + getNumPeers(): number; + setNumPeers(value: number): GetinfoResponse; + getNumPendingChannels(): number; + setNumPendingChannels(value: number): GetinfoResponse; + getNumActiveChannels(): number; + setNumActiveChannels(value: number): GetinfoResponse; + getNumInactiveChannels(): number; + setNumInactiveChannels(value: number): GetinfoResponse; + getVersion(): string; + setVersion(value: string): GetinfoResponse; + getLightningDir(): string; + setLightningDir(value: string): GetinfoResponse; + + hasOurFeatures(): boolean; + clearOurFeatures(): void; + getOurFeatures(): GetinfoOur_features | undefined; + setOurFeatures(value?: GetinfoOur_features): GetinfoResponse; + getBlockheight(): number; + setBlockheight(value: number): GetinfoResponse; + getNetwork(): string; + setNetwork(value: string): GetinfoResponse; + + hasFeesCollectedMsat(): boolean; + clearFeesCollectedMsat(): void; + getFeesCollectedMsat(): cln_primitives_pb.Amount | undefined; + setFeesCollectedMsat(value?: cln_primitives_pb.Amount): GetinfoResponse; + clearAddressList(): void; + getAddressList(): Array; + setAddressList(value: Array): GetinfoResponse; + addAddress(value?: GetinfoAddress, index?: number): GetinfoAddress; + clearBindingList(): void; + getBindingList(): Array; + setBindingList(value: Array): GetinfoResponse; + addBinding(value?: GetinfoBinding, index?: number): GetinfoBinding; + + hasWarningBitcoindSync(): boolean; + clearWarningBitcoindSync(): void; + getWarningBitcoindSync(): string | undefined; + setWarningBitcoindSync(value: string): GetinfoResponse; + + hasWarningLightningdSync(): boolean; + clearWarningLightningdSync(): void; + getWarningLightningdSync(): string | undefined; + setWarningLightningdSync(value: string): GetinfoResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetinfoResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: GetinfoResponse, + ): GetinfoResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetinfoResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetinfoResponse; + static deserializeBinaryFromReader( + message: GetinfoResponse, + reader: jspb.BinaryReader, + ): GetinfoResponse; +} + +export namespace GetinfoResponse { + export type AsObject = { + id: Uint8Array | string; + alias: string; + color: Uint8Array | string; + numPeers: number; + numPendingChannels: number; + numActiveChannels: number; + numInactiveChannels: number; + version: string; + lightningDir: string; + ourFeatures?: GetinfoOur_features.AsObject; + blockheight: number; + network: string; + feesCollectedMsat?: cln_primitives_pb.Amount.AsObject; + addressList: Array; + bindingList: Array; + warningBitcoindSync?: string; + warningLightningdSync?: string; + }; +} + +export class GetinfoOur_features extends jspb.Message { + getInit(): Uint8Array | string; + getInit_asU8(): Uint8Array; + getInit_asB64(): string; + setInit(value: Uint8Array | string): GetinfoOur_features; + getNode(): Uint8Array | string; + getNode_asU8(): Uint8Array; + getNode_asB64(): string; + setNode(value: Uint8Array | string): GetinfoOur_features; + getChannel(): Uint8Array | string; + getChannel_asU8(): Uint8Array; + getChannel_asB64(): string; + setChannel(value: Uint8Array | string): GetinfoOur_features; + getInvoice(): Uint8Array | string; + getInvoice_asU8(): Uint8Array; + getInvoice_asB64(): string; + setInvoice(value: Uint8Array | string): GetinfoOur_features; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetinfoOur_features.AsObject; + static toObject( + includeInstance: boolean, + msg: GetinfoOur_features, + ): GetinfoOur_features.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetinfoOur_features, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetinfoOur_features; + static deserializeBinaryFromReader( + message: GetinfoOur_features, + reader: jspb.BinaryReader, + ): GetinfoOur_features; +} + +export namespace GetinfoOur_features { + export type AsObject = { + init: Uint8Array | string; + node: Uint8Array | string; + channel: Uint8Array | string; + invoice: Uint8Array | string; + }; +} + +export class GetinfoAddress extends jspb.Message { + getItemType(): GetinfoAddress.GetinfoAddressType; + setItemType(value: GetinfoAddress.GetinfoAddressType): GetinfoAddress; + getPort(): number; + setPort(value: number): GetinfoAddress; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): string | undefined; + setAddress(value: string): GetinfoAddress; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetinfoAddress.AsObject; + static toObject( + includeInstance: boolean, + msg: GetinfoAddress, + ): GetinfoAddress.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetinfoAddress, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetinfoAddress; + static deserializeBinaryFromReader( + message: GetinfoAddress, + reader: jspb.BinaryReader, + ): GetinfoAddress; +} + +export namespace GetinfoAddress { + export type AsObject = { + itemType: GetinfoAddress.GetinfoAddressType; + port: number; + address?: string; + }; + + export enum GetinfoAddressType { + DNS = 0, + IPV4 = 1, + IPV6 = 2, + TORV2 = 3, + TORV3 = 4, + WEBSOCKET = 5, + } +} + +export class GetinfoBinding extends jspb.Message { + getItemType(): GetinfoBinding.GetinfoBindingType; + setItemType(value: GetinfoBinding.GetinfoBindingType): GetinfoBinding; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): string | undefined; + setAddress(value: string): GetinfoBinding; + + hasPort(): boolean; + clearPort(): void; + getPort(): number | undefined; + setPort(value: number): GetinfoBinding; + + hasSocket(): boolean; + clearSocket(): void; + getSocket(): string | undefined; + setSocket(value: string): GetinfoBinding; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetinfoBinding.AsObject; + static toObject( + includeInstance: boolean, + msg: GetinfoBinding, + ): GetinfoBinding.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetinfoBinding, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetinfoBinding; + static deserializeBinaryFromReader( + message: GetinfoBinding, + reader: jspb.BinaryReader, + ): GetinfoBinding; +} + +export namespace GetinfoBinding { + export type AsObject = { + itemType: GetinfoBinding.GetinfoBindingType; + address?: string; + port?: number; + socket?: string; + }; + + export enum GetinfoBindingType { + LOCAL_SOCKET = 0, + IPV4 = 1, + IPV6 = 2, + TORV2 = 3, + TORV3 = 4, + } +} + +export class ListpeersRequest extends jspb.Message { + hasId(): boolean; + clearId(): void; + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): ListpeersRequest; + + hasLevel(): boolean; + clearLevel(): void; + getLevel(): string | undefined; + setLevel(value: string): ListpeersRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersRequest, + ): ListpeersRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersRequest; + static deserializeBinaryFromReader( + message: ListpeersRequest, + reader: jspb.BinaryReader, + ): ListpeersRequest; +} + +export namespace ListpeersRequest { + export type AsObject = { + id: Uint8Array | string; + level?: string; + }; +} + +export class ListpeersResponse extends jspb.Message { + clearPeersList(): void; + getPeersList(): Array; + setPeersList(value: Array): ListpeersResponse; + addPeers(value?: ListpeersPeers, index?: number): ListpeersPeers; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersResponse, + ): ListpeersResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersResponse; + static deserializeBinaryFromReader( + message: ListpeersResponse, + reader: jspb.BinaryReader, + ): ListpeersResponse; +} + +export namespace ListpeersResponse { + export type AsObject = { + peersList: Array; + }; +} + +export class ListpeersPeers extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): ListpeersPeers; + getConnected(): boolean; + setConnected(value: boolean): ListpeersPeers; + + hasNumChannels(): boolean; + clearNumChannels(): void; + getNumChannels(): number | undefined; + setNumChannels(value: number): ListpeersPeers; + clearLogList(): void; + getLogList(): Array; + setLogList(value: Array): ListpeersPeers; + addLog(value?: ListpeersPeersLog, index?: number): ListpeersPeersLog; + clearChannelsList(): void; + getChannelsList(): Array; + setChannelsList(value: Array): ListpeersPeers; + addChannels( + value?: ListpeersPeersChannels, + index?: number, + ): ListpeersPeersChannels; + clearNetaddrList(): void; + getNetaddrList(): Array; + setNetaddrList(value: Array): ListpeersPeers; + addNetaddr(value: string, index?: number): string; + + hasRemoteAddr(): boolean; + clearRemoteAddr(): void; + getRemoteAddr(): string | undefined; + setRemoteAddr(value: string): ListpeersPeers; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): Uint8Array | string; + getFeatures_asU8(): Uint8Array; + getFeatures_asB64(): string; + setFeatures(value: Uint8Array | string): ListpeersPeers; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeers.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeers, + ): ListpeersPeers.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeers, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeers; + static deserializeBinaryFromReader( + message: ListpeersPeers, + reader: jspb.BinaryReader, + ): ListpeersPeers; +} + +export namespace ListpeersPeers { + export type AsObject = { + id: Uint8Array | string; + connected: boolean; + numChannels?: number; + logList: Array; + channelsList: Array; + netaddrList: Array; + remoteAddr?: string; + features: Uint8Array | string; + }; +} + +export class ListpeersPeersLog extends jspb.Message { + getItemType(): ListpeersPeersLog.ListpeersPeersLogType; + setItemType( + value: ListpeersPeersLog.ListpeersPeersLogType, + ): ListpeersPeersLog; + + hasNumSkipped(): boolean; + clearNumSkipped(): void; + getNumSkipped(): number | undefined; + setNumSkipped(value: number): ListpeersPeersLog; + + hasTime(): boolean; + clearTime(): void; + getTime(): string | undefined; + setTime(value: string): ListpeersPeersLog; + + hasSource(): boolean; + clearSource(): void; + getSource(): string | undefined; + setSource(value: string): ListpeersPeersLog; + + hasLog(): boolean; + clearLog(): void; + getLog(): string | undefined; + setLog(value: string): ListpeersPeersLog; + + hasNodeId(): boolean; + clearNodeId(): void; + getNodeId(): Uint8Array | string; + getNodeId_asU8(): Uint8Array; + getNodeId_asB64(): string; + setNodeId(value: Uint8Array | string): ListpeersPeersLog; + + hasData(): boolean; + clearData(): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): ListpeersPeersLog; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersLog.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersLog, + ): ListpeersPeersLog.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersLog, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersLog; + static deserializeBinaryFromReader( + message: ListpeersPeersLog, + reader: jspb.BinaryReader, + ): ListpeersPeersLog; +} + +export namespace ListpeersPeersLog { + export type AsObject = { + itemType: ListpeersPeersLog.ListpeersPeersLogType; + numSkipped?: number; + time?: string; + source?: string; + log?: string; + nodeId: Uint8Array | string; + data: Uint8Array | string; + }; + + export enum ListpeersPeersLogType { + SKIPPED = 0, + BROKEN = 1, + UNUSUAL = 2, + INFO = 3, + DEBUG = 4, + IO_IN = 5, + IO_OUT = 6, + } +} + +export class ListpeersPeersChannels extends jspb.Message { + getState(): ListpeersPeersChannels.ListpeersPeersChannelsState; + setState( + value: ListpeersPeersChannels.ListpeersPeersChannelsState, + ): ListpeersPeersChannels; + + hasScratchTxid(): boolean; + clearScratchTxid(): void; + getScratchTxid(): Uint8Array | string; + getScratchTxid_asU8(): Uint8Array; + getScratchTxid_asB64(): string; + setScratchTxid(value: Uint8Array | string): ListpeersPeersChannels; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): ListpeersPeersChannelsFeerate | undefined; + setFeerate(value?: ListpeersPeersChannelsFeerate): ListpeersPeersChannels; + + hasOwner(): boolean; + clearOwner(): void; + getOwner(): string | undefined; + setOwner(value: string): ListpeersPeersChannels; + + hasShortChannelId(): boolean; + clearShortChannelId(): void; + getShortChannelId(): string | undefined; + setShortChannelId(value: string): ListpeersPeersChannels; + + hasChannelId(): boolean; + clearChannelId(): void; + getChannelId(): Uint8Array | string; + getChannelId_asU8(): Uint8Array; + getChannelId_asB64(): string; + setChannelId(value: Uint8Array | string): ListpeersPeersChannels; + + hasFundingTxid(): boolean; + clearFundingTxid(): void; + getFundingTxid(): Uint8Array | string; + getFundingTxid_asU8(): Uint8Array; + getFundingTxid_asB64(): string; + setFundingTxid(value: Uint8Array | string): ListpeersPeersChannels; + + hasFundingOutnum(): boolean; + clearFundingOutnum(): void; + getFundingOutnum(): number | undefined; + setFundingOutnum(value: number): ListpeersPeersChannels; + + hasInitialFeerate(): boolean; + clearInitialFeerate(): void; + getInitialFeerate(): string | undefined; + setInitialFeerate(value: string): ListpeersPeersChannels; + + hasLastFeerate(): boolean; + clearLastFeerate(): void; + getLastFeerate(): string | undefined; + setLastFeerate(value: string): ListpeersPeersChannels; + + hasNextFeerate(): boolean; + clearNextFeerate(): void; + getNextFeerate(): string | undefined; + setNextFeerate(value: string): ListpeersPeersChannels; + + hasNextFeeStep(): boolean; + clearNextFeeStep(): void; + getNextFeeStep(): number | undefined; + setNextFeeStep(value: number): ListpeersPeersChannels; + clearInflightList(): void; + getInflightList(): Array; + setInflightList( + value: Array, + ): ListpeersPeersChannels; + addInflight( + value?: ListpeersPeersChannelsInflight, + index?: number, + ): ListpeersPeersChannelsInflight; + + hasCloseTo(): boolean; + clearCloseTo(): void; + getCloseTo(): Uint8Array | string; + getCloseTo_asU8(): Uint8Array; + getCloseTo_asB64(): string; + setCloseTo(value: Uint8Array | string): ListpeersPeersChannels; + + hasPrivate(): boolean; + clearPrivate(): void; + getPrivate(): boolean | undefined; + setPrivate(value: boolean): ListpeersPeersChannels; + getOpener(): cln_primitives_pb.ChannelSide; + setOpener(value: cln_primitives_pb.ChannelSide): ListpeersPeersChannels; + + hasCloser(): boolean; + clearCloser(): void; + getCloser(): cln_primitives_pb.ChannelSide | undefined; + setCloser(value: cln_primitives_pb.ChannelSide): ListpeersPeersChannels; + clearFeaturesList(): void; + getFeaturesList(): Array; + setFeaturesList(value: Array): ListpeersPeersChannels; + addFeatures(value: string, index?: number): string; + + hasFunding(): boolean; + clearFunding(): void; + getFunding(): ListpeersPeersChannelsFunding | undefined; + setFunding(value?: ListpeersPeersChannelsFunding): ListpeersPeersChannels; + + hasToUsMsat(): boolean; + clearToUsMsat(): void; + getToUsMsat(): cln_primitives_pb.Amount | undefined; + setToUsMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasMinToUsMsat(): boolean; + clearMinToUsMsat(): void; + getMinToUsMsat(): cln_primitives_pb.Amount | undefined; + setMinToUsMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasMaxToUsMsat(): boolean; + clearMaxToUsMsat(): void; + getMaxToUsMsat(): cln_primitives_pb.Amount | undefined; + setMaxToUsMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasTotalMsat(): boolean; + clearTotalMsat(): void; + getTotalMsat(): cln_primitives_pb.Amount | undefined; + setTotalMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasFeeBaseMsat(): boolean; + clearFeeBaseMsat(): void; + getFeeBaseMsat(): cln_primitives_pb.Amount | undefined; + setFeeBaseMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasFeeProportionalMillionths(): boolean; + clearFeeProportionalMillionths(): void; + getFeeProportionalMillionths(): number | undefined; + setFeeProportionalMillionths(value: number): ListpeersPeersChannels; + + hasDustLimitMsat(): boolean; + clearDustLimitMsat(): void; + getDustLimitMsat(): cln_primitives_pb.Amount | undefined; + setDustLimitMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasMaxTotalHtlcInMsat(): boolean; + clearMaxTotalHtlcInMsat(): void; + getMaxTotalHtlcInMsat(): cln_primitives_pb.Amount | undefined; + setMaxTotalHtlcInMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannels; + + hasTheirReserveMsat(): boolean; + clearTheirReserveMsat(): void; + getTheirReserveMsat(): cln_primitives_pb.Amount | undefined; + setTheirReserveMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasOurReserveMsat(): boolean; + clearOurReserveMsat(): void; + getOurReserveMsat(): cln_primitives_pb.Amount | undefined; + setOurReserveMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasSpendableMsat(): boolean; + clearSpendableMsat(): void; + getSpendableMsat(): cln_primitives_pb.Amount | undefined; + setSpendableMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasReceivableMsat(): boolean; + clearReceivableMsat(): void; + getReceivableMsat(): cln_primitives_pb.Amount | undefined; + setReceivableMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasMinimumHtlcInMsat(): boolean; + clearMinimumHtlcInMsat(): void; + getMinimumHtlcInMsat(): cln_primitives_pb.Amount | undefined; + setMinimumHtlcInMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannels; + + hasMinimumHtlcOutMsat(): boolean; + clearMinimumHtlcOutMsat(): void; + getMinimumHtlcOutMsat(): cln_primitives_pb.Amount | undefined; + setMinimumHtlcOutMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannels; + + hasMaximumHtlcOutMsat(): boolean; + clearMaximumHtlcOutMsat(): void; + getMaximumHtlcOutMsat(): cln_primitives_pb.Amount | undefined; + setMaximumHtlcOutMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannels; + + hasTheirToSelfDelay(): boolean; + clearTheirToSelfDelay(): void; + getTheirToSelfDelay(): number | undefined; + setTheirToSelfDelay(value: number): ListpeersPeersChannels; + + hasOurToSelfDelay(): boolean; + clearOurToSelfDelay(): void; + getOurToSelfDelay(): number | undefined; + setOurToSelfDelay(value: number): ListpeersPeersChannels; + + hasMaxAcceptedHtlcs(): boolean; + clearMaxAcceptedHtlcs(): void; + getMaxAcceptedHtlcs(): number | undefined; + setMaxAcceptedHtlcs(value: number): ListpeersPeersChannels; + + hasAlias(): boolean; + clearAlias(): void; + getAlias(): ListpeersPeersChannelsAlias | undefined; + setAlias(value?: ListpeersPeersChannelsAlias): ListpeersPeersChannels; + clearStatusList(): void; + getStatusList(): Array; + setStatusList(value: Array): ListpeersPeersChannels; + addStatus(value: string, index?: number): string; + + hasInPaymentsOffered(): boolean; + clearInPaymentsOffered(): void; + getInPaymentsOffered(): number | undefined; + setInPaymentsOffered(value: number): ListpeersPeersChannels; + + hasInOfferedMsat(): boolean; + clearInOfferedMsat(): void; + getInOfferedMsat(): cln_primitives_pb.Amount | undefined; + setInOfferedMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasInPaymentsFulfilled(): boolean; + clearInPaymentsFulfilled(): void; + getInPaymentsFulfilled(): number | undefined; + setInPaymentsFulfilled(value: number): ListpeersPeersChannels; + + hasInFulfilledMsat(): boolean; + clearInFulfilledMsat(): void; + getInFulfilledMsat(): cln_primitives_pb.Amount | undefined; + setInFulfilledMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasOutPaymentsOffered(): boolean; + clearOutPaymentsOffered(): void; + getOutPaymentsOffered(): number | undefined; + setOutPaymentsOffered(value: number): ListpeersPeersChannels; + + hasOutOfferedMsat(): boolean; + clearOutOfferedMsat(): void; + getOutOfferedMsat(): cln_primitives_pb.Amount | undefined; + setOutOfferedMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + + hasOutPaymentsFulfilled(): boolean; + clearOutPaymentsFulfilled(): void; + getOutPaymentsFulfilled(): number | undefined; + setOutPaymentsFulfilled(value: number): ListpeersPeersChannels; + + hasOutFulfilledMsat(): boolean; + clearOutFulfilledMsat(): void; + getOutFulfilledMsat(): cln_primitives_pb.Amount | undefined; + setOutFulfilledMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannels; + clearHtlcsList(): void; + getHtlcsList(): Array; + setHtlcsList( + value: Array, + ): ListpeersPeersChannels; + addHtlcs( + value?: ListpeersPeersChannelsHtlcs, + index?: number, + ): ListpeersPeersChannelsHtlcs; + + hasCloseToAddr(): boolean; + clearCloseToAddr(): void; + getCloseToAddr(): string | undefined; + setCloseToAddr(value: string): ListpeersPeersChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersChannels.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersChannels, + ): ListpeersPeersChannels.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersChannels, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersChannels; + static deserializeBinaryFromReader( + message: ListpeersPeersChannels, + reader: jspb.BinaryReader, + ): ListpeersPeersChannels; +} + +export namespace ListpeersPeersChannels { + export type AsObject = { + state: ListpeersPeersChannels.ListpeersPeersChannelsState; + scratchTxid: Uint8Array | string; + feerate?: ListpeersPeersChannelsFeerate.AsObject; + owner?: string; + shortChannelId?: string; + channelId: Uint8Array | string; + fundingTxid: Uint8Array | string; + fundingOutnum?: number; + initialFeerate?: string; + lastFeerate?: string; + nextFeerate?: string; + nextFeeStep?: number; + inflightList: Array; + closeTo: Uint8Array | string; + pb_private?: boolean; + opener: cln_primitives_pb.ChannelSide; + closer?: cln_primitives_pb.ChannelSide; + featuresList: Array; + funding?: ListpeersPeersChannelsFunding.AsObject; + toUsMsat?: cln_primitives_pb.Amount.AsObject; + minToUsMsat?: cln_primitives_pb.Amount.AsObject; + maxToUsMsat?: cln_primitives_pb.Amount.AsObject; + totalMsat?: cln_primitives_pb.Amount.AsObject; + feeBaseMsat?: cln_primitives_pb.Amount.AsObject; + feeProportionalMillionths?: number; + dustLimitMsat?: cln_primitives_pb.Amount.AsObject; + maxTotalHtlcInMsat?: cln_primitives_pb.Amount.AsObject; + theirReserveMsat?: cln_primitives_pb.Amount.AsObject; + ourReserveMsat?: cln_primitives_pb.Amount.AsObject; + spendableMsat?: cln_primitives_pb.Amount.AsObject; + receivableMsat?: cln_primitives_pb.Amount.AsObject; + minimumHtlcInMsat?: cln_primitives_pb.Amount.AsObject; + minimumHtlcOutMsat?: cln_primitives_pb.Amount.AsObject; + maximumHtlcOutMsat?: cln_primitives_pb.Amount.AsObject; + theirToSelfDelay?: number; + ourToSelfDelay?: number; + maxAcceptedHtlcs?: number; + alias?: ListpeersPeersChannelsAlias.AsObject; + statusList: Array; + inPaymentsOffered?: number; + inOfferedMsat?: cln_primitives_pb.Amount.AsObject; + inPaymentsFulfilled?: number; + inFulfilledMsat?: cln_primitives_pb.Amount.AsObject; + outPaymentsOffered?: number; + outOfferedMsat?: cln_primitives_pb.Amount.AsObject; + outPaymentsFulfilled?: number; + outFulfilledMsat?: cln_primitives_pb.Amount.AsObject; + htlcsList: Array; + closeToAddr?: string; + }; + + export enum ListpeersPeersChannelsState { + OPENINGD = 0, + CHANNELD_AWAITING_LOCKIN = 1, + CHANNELD_NORMAL = 2, + CHANNELD_SHUTTING_DOWN = 3, + CLOSINGD_SIGEXCHANGE = 4, + CLOSINGD_COMPLETE = 5, + AWAITING_UNILATERAL = 6, + FUNDING_SPEND_SEEN = 7, + ONCHAIN = 8, + DUALOPEND_OPEN_INIT = 9, + DUALOPEND_AWAITING_LOCKIN = 10, + } +} + +export class ListpeersPeersChannelsFeerate extends jspb.Message { + getPerkw(): number; + setPerkw(value: number): ListpeersPeersChannelsFeerate; + getPerkb(): number; + setPerkb(value: number): ListpeersPeersChannelsFeerate; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersChannelsFeerate.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersChannelsFeerate, + ): ListpeersPeersChannelsFeerate.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersChannelsFeerate, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersChannelsFeerate; + static deserializeBinaryFromReader( + message: ListpeersPeersChannelsFeerate, + reader: jspb.BinaryReader, + ): ListpeersPeersChannelsFeerate; +} + +export namespace ListpeersPeersChannelsFeerate { + export type AsObject = { + perkw: number; + perkb: number; + }; +} + +export class ListpeersPeersChannelsInflight extends jspb.Message { + getFundingTxid(): Uint8Array | string; + getFundingTxid_asU8(): Uint8Array; + getFundingTxid_asB64(): string; + setFundingTxid(value: Uint8Array | string): ListpeersPeersChannelsInflight; + getFundingOutnum(): number; + setFundingOutnum(value: number): ListpeersPeersChannelsInflight; + getFeerate(): string; + setFeerate(value: string): ListpeersPeersChannelsInflight; + + hasTotalFundingMsat(): boolean; + clearTotalFundingMsat(): void; + getTotalFundingMsat(): cln_primitives_pb.Amount | undefined; + setTotalFundingMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsInflight; + + hasOurFundingMsat(): boolean; + clearOurFundingMsat(): void; + getOurFundingMsat(): cln_primitives_pb.Amount | undefined; + setOurFundingMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsInflight; + getScratchTxid(): Uint8Array | string; + getScratchTxid_asU8(): Uint8Array; + getScratchTxid_asB64(): string; + setScratchTxid(value: Uint8Array | string): ListpeersPeersChannelsInflight; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersChannelsInflight.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersChannelsInflight, + ): ListpeersPeersChannelsInflight.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersChannelsInflight, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersChannelsInflight; + static deserializeBinaryFromReader( + message: ListpeersPeersChannelsInflight, + reader: jspb.BinaryReader, + ): ListpeersPeersChannelsInflight; +} + +export namespace ListpeersPeersChannelsInflight { + export type AsObject = { + fundingTxid: Uint8Array | string; + fundingOutnum: number; + feerate: string; + totalFundingMsat?: cln_primitives_pb.Amount.AsObject; + ourFundingMsat?: cln_primitives_pb.Amount.AsObject; + scratchTxid: Uint8Array | string; + }; +} + +export class ListpeersPeersChannelsFunding extends jspb.Message { + hasPushedMsat(): boolean; + clearPushedMsat(): void; + getPushedMsat(): cln_primitives_pb.Amount | undefined; + setPushedMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsFunding; + + hasLocalFundsMsat(): boolean; + clearLocalFundsMsat(): void; + getLocalFundsMsat(): cln_primitives_pb.Amount | undefined; + setLocalFundsMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsFunding; + + hasRemoteFundsMsat(): boolean; + clearRemoteFundsMsat(): void; + getRemoteFundsMsat(): cln_primitives_pb.Amount | undefined; + setRemoteFundsMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsFunding; + + hasFeePaidMsat(): boolean; + clearFeePaidMsat(): void; + getFeePaidMsat(): cln_primitives_pb.Amount | undefined; + setFeePaidMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsFunding; + + hasFeeRcvdMsat(): boolean; + clearFeeRcvdMsat(): void; + getFeeRcvdMsat(): cln_primitives_pb.Amount | undefined; + setFeeRcvdMsat( + value?: cln_primitives_pb.Amount, + ): ListpeersPeersChannelsFunding; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersChannelsFunding.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersChannelsFunding, + ): ListpeersPeersChannelsFunding.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersChannelsFunding, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersChannelsFunding; + static deserializeBinaryFromReader( + message: ListpeersPeersChannelsFunding, + reader: jspb.BinaryReader, + ): ListpeersPeersChannelsFunding; +} + +export namespace ListpeersPeersChannelsFunding { + export type AsObject = { + pushedMsat?: cln_primitives_pb.Amount.AsObject; + localFundsMsat?: cln_primitives_pb.Amount.AsObject; + remoteFundsMsat?: cln_primitives_pb.Amount.AsObject; + feePaidMsat?: cln_primitives_pb.Amount.AsObject; + feeRcvdMsat?: cln_primitives_pb.Amount.AsObject; + }; +} + +export class ListpeersPeersChannelsAlias extends jspb.Message { + hasLocal(): boolean; + clearLocal(): void; + getLocal(): string | undefined; + setLocal(value: string): ListpeersPeersChannelsAlias; + + hasRemote(): boolean; + clearRemote(): void; + getRemote(): string | undefined; + setRemote(value: string): ListpeersPeersChannelsAlias; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersChannelsAlias.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersChannelsAlias, + ): ListpeersPeersChannelsAlias.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersChannelsAlias, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersChannelsAlias; + static deserializeBinaryFromReader( + message: ListpeersPeersChannelsAlias, + reader: jspb.BinaryReader, + ): ListpeersPeersChannelsAlias; +} + +export namespace ListpeersPeersChannelsAlias { + export type AsObject = { + local?: string; + remote?: string; + }; +} + +export class ListpeersPeersChannelsHtlcs extends jspb.Message { + getDirection(): ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection; + setDirection( + value: ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection, + ): ListpeersPeersChannelsHtlcs; + getId(): number; + setId(value: number): ListpeersPeersChannelsHtlcs; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): ListpeersPeersChannelsHtlcs; + getExpiry(): number; + setExpiry(value: number): ListpeersPeersChannelsHtlcs; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListpeersPeersChannelsHtlcs; + + hasLocalTrimmed(): boolean; + clearLocalTrimmed(): void; + getLocalTrimmed(): boolean | undefined; + setLocalTrimmed(value: boolean): ListpeersPeersChannelsHtlcs; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): string | undefined; + setStatus(value: string): ListpeersPeersChannelsHtlcs; + getState(): cln_primitives_pb.HtlcState; + setState(value: cln_primitives_pb.HtlcState): ListpeersPeersChannelsHtlcs; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeersPeersChannelsHtlcs.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeersPeersChannelsHtlcs, + ): ListpeersPeersChannelsHtlcs.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeersPeersChannelsHtlcs, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeersPeersChannelsHtlcs; + static deserializeBinaryFromReader( + message: ListpeersPeersChannelsHtlcs, + reader: jspb.BinaryReader, + ): ListpeersPeersChannelsHtlcs; +} + +export namespace ListpeersPeersChannelsHtlcs { + export type AsObject = { + direction: ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection; + id: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + expiry: number; + paymentHash: Uint8Array | string; + localTrimmed?: boolean; + status?: string; + state: cln_primitives_pb.HtlcState; + }; + + export enum ListpeersPeersChannelsHtlcsDirection { + IN = 0, + OUT = 1, + } +} + +export class ListfundsRequest extends jspb.Message { + hasSpent(): boolean; + clearSpent(): void; + getSpent(): boolean | undefined; + setSpent(value: boolean): ListfundsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListfundsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListfundsRequest, + ): ListfundsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListfundsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListfundsRequest; + static deserializeBinaryFromReader( + message: ListfundsRequest, + reader: jspb.BinaryReader, + ): ListfundsRequest; +} + +export namespace ListfundsRequest { + export type AsObject = { + spent?: boolean; + }; +} + +export class ListfundsResponse extends jspb.Message { + clearOutputsList(): void; + getOutputsList(): Array; + setOutputsList(value: Array): ListfundsResponse; + addOutputs(value?: ListfundsOutputs, index?: number): ListfundsOutputs; + clearChannelsList(): void; + getChannelsList(): Array; + setChannelsList(value: Array): ListfundsResponse; + addChannels(value?: ListfundsChannels, index?: number): ListfundsChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListfundsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListfundsResponse, + ): ListfundsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListfundsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListfundsResponse; + static deserializeBinaryFromReader( + message: ListfundsResponse, + reader: jspb.BinaryReader, + ): ListfundsResponse; +} + +export namespace ListfundsResponse { + export type AsObject = { + outputsList: Array; + channelsList: Array; + }; +} + +export class ListfundsOutputs extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): ListfundsOutputs; + getOutput(): number; + setOutput(value: number): ListfundsOutputs; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): ListfundsOutputs; + getScriptpubkey(): Uint8Array | string; + getScriptpubkey_asU8(): Uint8Array; + getScriptpubkey_asB64(): string; + setScriptpubkey(value: Uint8Array | string): ListfundsOutputs; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): string | undefined; + setAddress(value: string): ListfundsOutputs; + + hasRedeemscript(): boolean; + clearRedeemscript(): void; + getRedeemscript(): Uint8Array | string; + getRedeemscript_asU8(): Uint8Array; + getRedeemscript_asB64(): string; + setRedeemscript(value: Uint8Array | string): ListfundsOutputs; + getStatus(): ListfundsOutputs.ListfundsOutputsStatus; + setStatus(value: ListfundsOutputs.ListfundsOutputsStatus): ListfundsOutputs; + getReserved(): boolean; + setReserved(value: boolean): ListfundsOutputs; + + hasBlockheight(): boolean; + clearBlockheight(): void; + getBlockheight(): number | undefined; + setBlockheight(value: number): ListfundsOutputs; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListfundsOutputs.AsObject; + static toObject( + includeInstance: boolean, + msg: ListfundsOutputs, + ): ListfundsOutputs.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListfundsOutputs, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListfundsOutputs; + static deserializeBinaryFromReader( + message: ListfundsOutputs, + reader: jspb.BinaryReader, + ): ListfundsOutputs; +} + +export namespace ListfundsOutputs { + export type AsObject = { + txid: Uint8Array | string; + output: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + scriptpubkey: Uint8Array | string; + address?: string; + redeemscript: Uint8Array | string; + status: ListfundsOutputs.ListfundsOutputsStatus; + reserved: boolean; + blockheight?: number; + }; + + export enum ListfundsOutputsStatus { + UNCONFIRMED = 0, + CONFIRMED = 1, + SPENT = 2, + IMMATURE = 3, + } +} + +export class ListfundsChannels extends jspb.Message { + getPeerId(): Uint8Array | string; + getPeerId_asU8(): Uint8Array; + getPeerId_asB64(): string; + setPeerId(value: Uint8Array | string): ListfundsChannels; + + hasOurAmountMsat(): boolean; + clearOurAmountMsat(): void; + getOurAmountMsat(): cln_primitives_pb.Amount | undefined; + setOurAmountMsat(value?: cln_primitives_pb.Amount): ListfundsChannels; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): ListfundsChannels; + getFundingTxid(): Uint8Array | string; + getFundingTxid_asU8(): Uint8Array; + getFundingTxid_asB64(): string; + setFundingTxid(value: Uint8Array | string): ListfundsChannels; + getFundingOutput(): number; + setFundingOutput(value: number): ListfundsChannels; + getConnected(): boolean; + setConnected(value: boolean): ListfundsChannels; + getState(): cln_primitives_pb.ChannelState; + setState(value: cln_primitives_pb.ChannelState): ListfundsChannels; + + hasChannelId(): boolean; + clearChannelId(): void; + getChannelId(): Uint8Array | string; + getChannelId_asU8(): Uint8Array; + getChannelId_asB64(): string; + setChannelId(value: Uint8Array | string): ListfundsChannels; + + hasShortChannelId(): boolean; + clearShortChannelId(): void; + getShortChannelId(): string | undefined; + setShortChannelId(value: string): ListfundsChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListfundsChannels.AsObject; + static toObject( + includeInstance: boolean, + msg: ListfundsChannels, + ): ListfundsChannels.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListfundsChannels, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListfundsChannels; + static deserializeBinaryFromReader( + message: ListfundsChannels, + reader: jspb.BinaryReader, + ): ListfundsChannels; +} + +export namespace ListfundsChannels { + export type AsObject = { + peerId: Uint8Array | string; + ourAmountMsat?: cln_primitives_pb.Amount.AsObject; + amountMsat?: cln_primitives_pb.Amount.AsObject; + fundingTxid: Uint8Array | string; + fundingOutput: number; + connected: boolean; + state: cln_primitives_pb.ChannelState; + channelId: Uint8Array | string; + shortChannelId?: string; + }; +} + +export class SendpayRequest extends jspb.Message { + clearRouteList(): void; + getRouteList(): Array; + setRouteList(value: Array): SendpayRequest; + addRoute(value?: SendpayRoute, index?: number): SendpayRoute; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): SendpayRequest; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): SendpayRequest; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): SendpayRequest; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): SendpayRequest; + + hasPaymentSecret(): boolean; + clearPaymentSecret(): void; + getPaymentSecret(): Uint8Array | string; + getPaymentSecret_asU8(): Uint8Array; + getPaymentSecret_asB64(): string; + setPaymentSecret(value: Uint8Array | string): SendpayRequest; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): SendpayRequest; + + hasLocalinvreqid(): boolean; + clearLocalinvreqid(): void; + getLocalinvreqid(): Uint8Array | string; + getLocalinvreqid_asU8(): Uint8Array; + getLocalinvreqid_asB64(): string; + setLocalinvreqid(value: Uint8Array | string): SendpayRequest; + + hasGroupid(): boolean; + clearGroupid(): void; + getGroupid(): number | undefined; + setGroupid(value: number): SendpayRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendpayRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SendpayRequest, + ): SendpayRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendpayRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendpayRequest; + static deserializeBinaryFromReader( + message: SendpayRequest, + reader: jspb.BinaryReader, + ): SendpayRequest; +} + +export namespace SendpayRequest { + export type AsObject = { + routeList: Array; + paymentHash: Uint8Array | string; + label?: string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + bolt11?: string; + paymentSecret: Uint8Array | string; + partid?: number; + localinvreqid: Uint8Array | string; + groupid?: number; + }; +} + +export class SendpayResponse extends jspb.Message { + getId(): number; + setId(value: number): SendpayResponse; + + hasGroupid(): boolean; + clearGroupid(): void; + getGroupid(): number | undefined; + setGroupid(value: number): SendpayResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): SendpayResponse; + getStatus(): SendpayResponse.SendpayStatus; + setStatus(value: SendpayResponse.SendpayStatus): SendpayResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): SendpayResponse; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): SendpayResponse; + getCreatedAt(): number; + setCreatedAt(value: number): SendpayResponse; + + hasCompletedAt(): boolean; + clearCompletedAt(): void; + getCompletedAt(): number | undefined; + setCompletedAt(value: number): SendpayResponse; + + hasAmountSentMsat(): boolean; + clearAmountSentMsat(): void; + getAmountSentMsat(): cln_primitives_pb.Amount | undefined; + setAmountSentMsat(value?: cln_primitives_pb.Amount): SendpayResponse; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): SendpayResponse; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): SendpayResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): SendpayResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): SendpayResponse; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): SendpayResponse; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): string | undefined; + setMessage(value: string): SendpayResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendpayResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SendpayResponse, + ): SendpayResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendpayResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendpayResponse; + static deserializeBinaryFromReader( + message: SendpayResponse, + reader: jspb.BinaryReader, + ): SendpayResponse; +} + +export namespace SendpayResponse { + export type AsObject = { + id: number; + groupid?: number; + paymentHash: Uint8Array | string; + status: SendpayResponse.SendpayStatus; + amountMsat?: cln_primitives_pb.Amount.AsObject; + destination: Uint8Array | string; + createdAt: number; + completedAt?: number; + amountSentMsat?: cln_primitives_pb.Amount.AsObject; + label?: string; + partid?: number; + bolt11?: string; + bolt12?: string; + paymentPreimage: Uint8Array | string; + message?: string; + }; + + export enum SendpayStatus { + PENDING = 0, + COMPLETE = 1, + } +} + +export class SendpayRoute extends jspb.Message { + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): SendpayRoute; + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): SendpayRoute; + getDelay(): number; + setDelay(value: number): SendpayRoute; + getChannel(): string; + setChannel(value: string): SendpayRoute; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendpayRoute.AsObject; + static toObject( + includeInstance: boolean, + msg: SendpayRoute, + ): SendpayRoute.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendpayRoute, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendpayRoute; + static deserializeBinaryFromReader( + message: SendpayRoute, + reader: jspb.BinaryReader, + ): SendpayRoute; +} + +export namespace SendpayRoute { + export type AsObject = { + amountMsat?: cln_primitives_pb.Amount.AsObject; + id: Uint8Array | string; + delay: number; + channel: string; + }; +} + +export class ListchannelsRequest extends jspb.Message { + hasShortChannelId(): boolean; + clearShortChannelId(): void; + getShortChannelId(): string | undefined; + setShortChannelId(value: string): ListchannelsRequest; + + hasSource(): boolean; + clearSource(): void; + getSource(): Uint8Array | string; + getSource_asU8(): Uint8Array; + getSource_asB64(): string; + setSource(value: Uint8Array | string): ListchannelsRequest; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): ListchannelsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListchannelsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListchannelsRequest, + ): ListchannelsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListchannelsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListchannelsRequest; + static deserializeBinaryFromReader( + message: ListchannelsRequest, + reader: jspb.BinaryReader, + ): ListchannelsRequest; +} + +export namespace ListchannelsRequest { + export type AsObject = { + shortChannelId?: string; + source: Uint8Array | string; + destination: Uint8Array | string; + }; +} + +export class ListchannelsResponse extends jspb.Message { + clearChannelsList(): void; + getChannelsList(): Array; + setChannelsList(value: Array): ListchannelsResponse; + addChannels( + value?: ListchannelsChannels, + index?: number, + ): ListchannelsChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListchannelsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListchannelsResponse, + ): ListchannelsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListchannelsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListchannelsResponse; + static deserializeBinaryFromReader( + message: ListchannelsResponse, + reader: jspb.BinaryReader, + ): ListchannelsResponse; +} + +export namespace ListchannelsResponse { + export type AsObject = { + channelsList: Array; + }; +} + +export class ListchannelsChannels extends jspb.Message { + getSource(): Uint8Array | string; + getSource_asU8(): Uint8Array; + getSource_asB64(): string; + setSource(value: Uint8Array | string): ListchannelsChannels; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): ListchannelsChannels; + getShortChannelId(): string; + setShortChannelId(value: string): ListchannelsChannels; + getDirection(): number; + setDirection(value: number): ListchannelsChannels; + getPublic(): boolean; + setPublic(value: boolean): ListchannelsChannels; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): ListchannelsChannels; + getMessageFlags(): number; + setMessageFlags(value: number): ListchannelsChannels; + getChannelFlags(): number; + setChannelFlags(value: number): ListchannelsChannels; + getActive(): boolean; + setActive(value: boolean): ListchannelsChannels; + getLastUpdate(): number; + setLastUpdate(value: number): ListchannelsChannels; + getBaseFeeMillisatoshi(): number; + setBaseFeeMillisatoshi(value: number): ListchannelsChannels; + getFeePerMillionth(): number; + setFeePerMillionth(value: number): ListchannelsChannels; + getDelay(): number; + setDelay(value: number): ListchannelsChannels; + + hasHtlcMinimumMsat(): boolean; + clearHtlcMinimumMsat(): void; + getHtlcMinimumMsat(): cln_primitives_pb.Amount | undefined; + setHtlcMinimumMsat(value?: cln_primitives_pb.Amount): ListchannelsChannels; + + hasHtlcMaximumMsat(): boolean; + clearHtlcMaximumMsat(): void; + getHtlcMaximumMsat(): cln_primitives_pb.Amount | undefined; + setHtlcMaximumMsat(value?: cln_primitives_pb.Amount): ListchannelsChannels; + getFeatures(): Uint8Array | string; + getFeatures_asU8(): Uint8Array; + getFeatures_asB64(): string; + setFeatures(value: Uint8Array | string): ListchannelsChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListchannelsChannels.AsObject; + static toObject( + includeInstance: boolean, + msg: ListchannelsChannels, + ): ListchannelsChannels.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListchannelsChannels, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListchannelsChannels; + static deserializeBinaryFromReader( + message: ListchannelsChannels, + reader: jspb.BinaryReader, + ): ListchannelsChannels; +} + +export namespace ListchannelsChannels { + export type AsObject = { + source: Uint8Array | string; + destination: Uint8Array | string; + shortChannelId: string; + direction: number; + pb_public: boolean; + amountMsat?: cln_primitives_pb.Amount.AsObject; + messageFlags: number; + channelFlags: number; + active: boolean; + lastUpdate: number; + baseFeeMillisatoshi: number; + feePerMillionth: number; + delay: number; + htlcMinimumMsat?: cln_primitives_pb.Amount.AsObject; + htlcMaximumMsat?: cln_primitives_pb.Amount.AsObject; + features: Uint8Array | string; + }; +} + +export class AddgossipRequest extends jspb.Message { + getMessage(): Uint8Array | string; + getMessage_asU8(): Uint8Array; + getMessage_asB64(): string; + setMessage(value: Uint8Array | string): AddgossipRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddgossipRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: AddgossipRequest, + ): AddgossipRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: AddgossipRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): AddgossipRequest; + static deserializeBinaryFromReader( + message: AddgossipRequest, + reader: jspb.BinaryReader, + ): AddgossipRequest; +} + +export namespace AddgossipRequest { + export type AsObject = { + message: Uint8Array | string; + }; +} + +export class AddgossipResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddgossipResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: AddgossipResponse, + ): AddgossipResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: AddgossipResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): AddgossipResponse; + static deserializeBinaryFromReader( + message: AddgossipResponse, + reader: jspb.BinaryReader, + ): AddgossipResponse; +} + +export namespace AddgossipResponse { + export type AsObject = {}; +} + +export class AutocleaninvoiceRequest extends jspb.Message { + hasExpiredBy(): boolean; + clearExpiredBy(): void; + getExpiredBy(): number | undefined; + setExpiredBy(value: number): AutocleaninvoiceRequest; + + hasCycleSeconds(): boolean; + clearCycleSeconds(): void; + getCycleSeconds(): number | undefined; + setCycleSeconds(value: number): AutocleaninvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AutocleaninvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: AutocleaninvoiceRequest, + ): AutocleaninvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: AutocleaninvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): AutocleaninvoiceRequest; + static deserializeBinaryFromReader( + message: AutocleaninvoiceRequest, + reader: jspb.BinaryReader, + ): AutocleaninvoiceRequest; +} + +export namespace AutocleaninvoiceRequest { + export type AsObject = { + expiredBy?: number; + cycleSeconds?: number; + }; +} + +export class AutocleaninvoiceResponse extends jspb.Message { + getEnabled(): boolean; + setEnabled(value: boolean): AutocleaninvoiceResponse; + + hasExpiredBy(): boolean; + clearExpiredBy(): void; + getExpiredBy(): number | undefined; + setExpiredBy(value: number): AutocleaninvoiceResponse; + + hasCycleSeconds(): boolean; + clearCycleSeconds(): void; + getCycleSeconds(): number | undefined; + setCycleSeconds(value: number): AutocleaninvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AutocleaninvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: AutocleaninvoiceResponse, + ): AutocleaninvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: AutocleaninvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): AutocleaninvoiceResponse; + static deserializeBinaryFromReader( + message: AutocleaninvoiceResponse, + reader: jspb.BinaryReader, + ): AutocleaninvoiceResponse; +} + +export namespace AutocleaninvoiceResponse { + export type AsObject = { + enabled: boolean; + expiredBy?: number; + cycleSeconds?: number; + }; +} + +export class CheckmessageRequest extends jspb.Message { + getMessage(): string; + setMessage(value: string): CheckmessageRequest; + getZbase(): string; + setZbase(value: string): CheckmessageRequest; + + hasPubkey(): boolean; + clearPubkey(): void; + getPubkey(): Uint8Array | string; + getPubkey_asU8(): Uint8Array; + getPubkey_asB64(): string; + setPubkey(value: Uint8Array | string): CheckmessageRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckmessageRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckmessageRequest, + ): CheckmessageRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckmessageRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CheckmessageRequest; + static deserializeBinaryFromReader( + message: CheckmessageRequest, + reader: jspb.BinaryReader, + ): CheckmessageRequest; +} + +export namespace CheckmessageRequest { + export type AsObject = { + message: string; + zbase: string; + pubkey: Uint8Array | string; + }; +} + +export class CheckmessageResponse extends jspb.Message { + getVerified(): boolean; + setVerified(value: boolean): CheckmessageResponse; + getPubkey(): Uint8Array | string; + getPubkey_asU8(): Uint8Array; + getPubkey_asB64(): string; + setPubkey(value: Uint8Array | string): CheckmessageResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckmessageResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckmessageResponse, + ): CheckmessageResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckmessageResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CheckmessageResponse; + static deserializeBinaryFromReader( + message: CheckmessageResponse, + reader: jspb.BinaryReader, + ): CheckmessageResponse; +} + +export namespace CheckmessageResponse { + export type AsObject = { + verified: boolean; + pubkey: Uint8Array | string; + }; +} + +export class CloseRequest extends jspb.Message { + getId(): string; + setId(value: string): CloseRequest; + + hasUnilateraltimeout(): boolean; + clearUnilateraltimeout(): void; + getUnilateraltimeout(): number | undefined; + setUnilateraltimeout(value: number): CloseRequest; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): string | undefined; + setDestination(value: string): CloseRequest; + + hasFeeNegotiationStep(): boolean; + clearFeeNegotiationStep(): void; + getFeeNegotiationStep(): string | undefined; + setFeeNegotiationStep(value: string): CloseRequest; + + hasWrongFunding(): boolean; + clearWrongFunding(): void; + getWrongFunding(): cln_primitives_pb.Outpoint | undefined; + setWrongFunding(value?: cln_primitives_pb.Outpoint): CloseRequest; + + hasForceLeaseClosed(): boolean; + clearForceLeaseClosed(): void; + getForceLeaseClosed(): boolean | undefined; + setForceLeaseClosed(value: boolean): CloseRequest; + clearFeerangeList(): void; + getFeerangeList(): Array; + setFeerangeList(value: Array): CloseRequest; + addFeerange( + value?: cln_primitives_pb.Feerate, + index?: number, + ): cln_primitives_pb.Feerate; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CloseRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CloseRequest, + ): CloseRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CloseRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CloseRequest; + static deserializeBinaryFromReader( + message: CloseRequest, + reader: jspb.BinaryReader, + ): CloseRequest; +} + +export namespace CloseRequest { + export type AsObject = { + id: string; + unilateraltimeout?: number; + destination?: string; + feeNegotiationStep?: string; + wrongFunding?: cln_primitives_pb.Outpoint.AsObject; + forceLeaseClosed?: boolean; + feerangeList: Array; + }; +} + +export class CloseResponse extends jspb.Message { + getItemType(): CloseResponse.CloseType; + setItemType(value: CloseResponse.CloseType): CloseResponse; + + hasTx(): boolean; + clearTx(): void; + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): CloseResponse; + + hasTxid(): boolean; + clearTxid(): void; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): CloseResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CloseResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CloseResponse, + ): CloseResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CloseResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CloseResponse; + static deserializeBinaryFromReader( + message: CloseResponse, + reader: jspb.BinaryReader, + ): CloseResponse; +} + +export namespace CloseResponse { + export type AsObject = { + itemType: CloseResponse.CloseType; + tx: Uint8Array | string; + txid: Uint8Array | string; + }; + + export enum CloseType { + MUTUAL = 0, + UNILATERAL = 1, + UNOPENED = 2, + } +} + +export class ConnectRequest extends jspb.Message { + getId(): string; + setId(value: string): ConnectRequest; + + hasHost(): boolean; + clearHost(): void; + getHost(): string | undefined; + setHost(value: string): ConnectRequest; + + hasPort(): boolean; + clearPort(): void; + getPort(): number | undefined; + setPort(value: number): ConnectRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ConnectRequest, + ): ConnectRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ConnectRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ConnectRequest; + static deserializeBinaryFromReader( + message: ConnectRequest, + reader: jspb.BinaryReader, + ): ConnectRequest; +} + +export namespace ConnectRequest { + export type AsObject = { + id: string; + host?: string; + port?: number; + }; +} + +export class ConnectResponse extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): ConnectResponse; + getFeatures(): Uint8Array | string; + getFeatures_asU8(): Uint8Array; + getFeatures_asB64(): string; + setFeatures(value: Uint8Array | string): ConnectResponse; + getDirection(): ConnectResponse.ConnectDirection; + setDirection(value: ConnectResponse.ConnectDirection): ConnectResponse; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): ConnectAddress | undefined; + setAddress(value?: ConnectAddress): ConnectResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ConnectResponse, + ): ConnectResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ConnectResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ConnectResponse; + static deserializeBinaryFromReader( + message: ConnectResponse, + reader: jspb.BinaryReader, + ): ConnectResponse; +} + +export namespace ConnectResponse { + export type AsObject = { + id: Uint8Array | string; + features: Uint8Array | string; + direction: ConnectResponse.ConnectDirection; + address?: ConnectAddress.AsObject; + }; + + export enum ConnectDirection { + IN = 0, + OUT = 1, + } +} + +export class ConnectAddress extends jspb.Message { + getItemType(): ConnectAddress.ConnectAddressType; + setItemType(value: ConnectAddress.ConnectAddressType): ConnectAddress; + + hasSocket(): boolean; + clearSocket(): void; + getSocket(): string | undefined; + setSocket(value: string): ConnectAddress; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): string | undefined; + setAddress(value: string): ConnectAddress; + + hasPort(): boolean; + clearPort(): void; + getPort(): number | undefined; + setPort(value: number): ConnectAddress; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConnectAddress.AsObject; + static toObject( + includeInstance: boolean, + msg: ConnectAddress, + ): ConnectAddress.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ConnectAddress, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ConnectAddress; + static deserializeBinaryFromReader( + message: ConnectAddress, + reader: jspb.BinaryReader, + ): ConnectAddress; +} + +export namespace ConnectAddress { + export type AsObject = { + itemType: ConnectAddress.ConnectAddressType; + socket?: string; + address?: string; + port?: number; + }; + + export enum ConnectAddressType { + LOCAL_SOCKET = 0, + IPV4 = 1, + IPV6 = 2, + TORV2 = 3, + TORV3 = 4, + } +} + +export class CreateinvoiceRequest extends jspb.Message { + getInvstring(): string; + setInvstring(value: string): CreateinvoiceRequest; + getLabel(): string; + setLabel(value: string): CreateinvoiceRequest; + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): CreateinvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateinvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CreateinvoiceRequest, + ): CreateinvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CreateinvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CreateinvoiceRequest; + static deserializeBinaryFromReader( + message: CreateinvoiceRequest, + reader: jspb.BinaryReader, + ): CreateinvoiceRequest; +} + +export namespace CreateinvoiceRequest { + export type AsObject = { + invstring: string; + label: string; + preimage: Uint8Array | string; + }; +} + +export class CreateinvoiceResponse extends jspb.Message { + getLabel(): string; + setLabel(value: string): CreateinvoiceResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): CreateinvoiceResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): CreateinvoiceResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): CreateinvoiceResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): CreateinvoiceResponse; + getStatus(): CreateinvoiceResponse.CreateinvoiceStatus; + setStatus( + value: CreateinvoiceResponse.CreateinvoiceStatus, + ): CreateinvoiceResponse; + getDescription(): string; + setDescription(value: string): CreateinvoiceResponse; + getExpiresAt(): number; + setExpiresAt(value: number): CreateinvoiceResponse; + + hasPayIndex(): boolean; + clearPayIndex(): void; + getPayIndex(): number | undefined; + setPayIndex(value: number): CreateinvoiceResponse; + + hasAmountReceivedMsat(): boolean; + clearAmountReceivedMsat(): void; + getAmountReceivedMsat(): cln_primitives_pb.Amount | undefined; + setAmountReceivedMsat( + value?: cln_primitives_pb.Amount, + ): CreateinvoiceResponse; + + hasPaidAt(): boolean; + clearPaidAt(): void; + getPaidAt(): number | undefined; + setPaidAt(value: number): CreateinvoiceResponse; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): CreateinvoiceResponse; + + hasLocalOfferId(): boolean; + clearLocalOfferId(): void; + getLocalOfferId(): Uint8Array | string; + getLocalOfferId_asU8(): Uint8Array; + getLocalOfferId_asB64(): string; + setLocalOfferId(value: Uint8Array | string): CreateinvoiceResponse; + + hasInvreqPayerNote(): boolean; + clearInvreqPayerNote(): void; + getInvreqPayerNote(): string | undefined; + setInvreqPayerNote(value: string): CreateinvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateinvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CreateinvoiceResponse, + ): CreateinvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CreateinvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CreateinvoiceResponse; + static deserializeBinaryFromReader( + message: CreateinvoiceResponse, + reader: jspb.BinaryReader, + ): CreateinvoiceResponse; +} + +export namespace CreateinvoiceResponse { + export type AsObject = { + label: string; + bolt11?: string; + bolt12?: string; + paymentHash: Uint8Array | string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + status: CreateinvoiceResponse.CreateinvoiceStatus; + description: string; + expiresAt: number; + payIndex?: number; + amountReceivedMsat?: cln_primitives_pb.Amount.AsObject; + paidAt?: number; + paymentPreimage: Uint8Array | string; + localOfferId: Uint8Array | string; + invreqPayerNote?: string; + }; + + export enum CreateinvoiceStatus { + PAID = 0, + EXPIRED = 1, + UNPAID = 2, + } +} + +export class DatastoreRequest extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): DatastoreRequest; + addKey(value: string, index?: number): string; + + hasString(): boolean; + clearString(): void; + getString(): string | undefined; + setString(value: string): DatastoreRequest; + + hasHex(): boolean; + clearHex(): void; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): DatastoreRequest; + + hasMode(): boolean; + clearMode(): void; + getMode(): DatastoreRequest.DatastoreMode | undefined; + setMode(value: DatastoreRequest.DatastoreMode): DatastoreRequest; + + hasGeneration(): boolean; + clearGeneration(): void; + getGeneration(): number | undefined; + setGeneration(value: number): DatastoreRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DatastoreRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DatastoreRequest, + ): DatastoreRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DatastoreRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DatastoreRequest; + static deserializeBinaryFromReader( + message: DatastoreRequest, + reader: jspb.BinaryReader, + ): DatastoreRequest; +} + +export namespace DatastoreRequest { + export type AsObject = { + keyList: Array; + string?: string; + hex: Uint8Array | string; + mode?: DatastoreRequest.DatastoreMode; + generation?: number; + }; + + export enum DatastoreMode { + MUST_CREATE = 0, + MUST_REPLACE = 1, + CREATE_OR_REPLACE = 2, + MUST_APPEND = 3, + CREATE_OR_APPEND = 4, + } +} + +export class DatastoreResponse extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): DatastoreResponse; + addKey(value: string, index?: number): string; + + hasGeneration(): boolean; + clearGeneration(): void; + getGeneration(): number | undefined; + setGeneration(value: number): DatastoreResponse; + + hasHex(): boolean; + clearHex(): void; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): DatastoreResponse; + + hasString(): boolean; + clearString(): void; + getString(): string | undefined; + setString(value: string): DatastoreResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DatastoreResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DatastoreResponse, + ): DatastoreResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DatastoreResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DatastoreResponse; + static deserializeBinaryFromReader( + message: DatastoreResponse, + reader: jspb.BinaryReader, + ): DatastoreResponse; +} + +export namespace DatastoreResponse { + export type AsObject = { + keyList: Array; + generation?: number; + hex: Uint8Array | string; + string?: string; + }; +} + +export class CreateonionRequest extends jspb.Message { + clearHopsList(): void; + getHopsList(): Array; + setHopsList(value: Array): CreateonionRequest; + addHops(value?: CreateonionHops, index?: number): CreateonionHops; + getAssocdata(): Uint8Array | string; + getAssocdata_asU8(): Uint8Array; + getAssocdata_asB64(): string; + setAssocdata(value: Uint8Array | string): CreateonionRequest; + + hasSessionKey(): boolean; + clearSessionKey(): void; + getSessionKey(): Uint8Array | string; + getSessionKey_asU8(): Uint8Array; + getSessionKey_asB64(): string; + setSessionKey(value: Uint8Array | string): CreateonionRequest; + + hasOnionSize(): boolean; + clearOnionSize(): void; + getOnionSize(): number | undefined; + setOnionSize(value: number): CreateonionRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateonionRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CreateonionRequest, + ): CreateonionRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CreateonionRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CreateonionRequest; + static deserializeBinaryFromReader( + message: CreateonionRequest, + reader: jspb.BinaryReader, + ): CreateonionRequest; +} + +export namespace CreateonionRequest { + export type AsObject = { + hopsList: Array; + assocdata: Uint8Array | string; + sessionKey: Uint8Array | string; + onionSize?: number; + }; +} + +export class CreateonionResponse extends jspb.Message { + getOnion(): Uint8Array | string; + getOnion_asU8(): Uint8Array; + getOnion_asB64(): string; + setOnion(value: Uint8Array | string): CreateonionResponse; + clearSharedSecretsList(): void; + getSharedSecretsList(): Array; + getSharedSecretsList_asU8(): Array; + getSharedSecretsList_asB64(): Array; + setSharedSecretsList(value: Array): CreateonionResponse; + addSharedSecrets( + value: Uint8Array | string, + index?: number, + ): Uint8Array | string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateonionResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CreateonionResponse, + ): CreateonionResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CreateonionResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CreateonionResponse; + static deserializeBinaryFromReader( + message: CreateonionResponse, + reader: jspb.BinaryReader, + ): CreateonionResponse; +} + +export namespace CreateonionResponse { + export type AsObject = { + onion: Uint8Array | string; + sharedSecretsList: Array; + }; +} + +export class CreateonionHops extends jspb.Message { + getPubkey(): Uint8Array | string; + getPubkey_asU8(): Uint8Array; + getPubkey_asB64(): string; + setPubkey(value: Uint8Array | string): CreateonionHops; + getPayload(): Uint8Array | string; + getPayload_asU8(): Uint8Array; + getPayload_asB64(): string; + setPayload(value: Uint8Array | string): CreateonionHops; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateonionHops.AsObject; + static toObject( + includeInstance: boolean, + msg: CreateonionHops, + ): CreateonionHops.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CreateonionHops, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CreateonionHops; + static deserializeBinaryFromReader( + message: CreateonionHops, + reader: jspb.BinaryReader, + ): CreateonionHops; +} + +export namespace CreateonionHops { + export type AsObject = { + pubkey: Uint8Array | string; + payload: Uint8Array | string; + }; +} + +export class DeldatastoreRequest extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): DeldatastoreRequest; + addKey(value: string, index?: number): string; + + hasGeneration(): boolean; + clearGeneration(): void; + getGeneration(): number | undefined; + setGeneration(value: number): DeldatastoreRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeldatastoreRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DeldatastoreRequest, + ): DeldatastoreRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DeldatastoreRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DeldatastoreRequest; + static deserializeBinaryFromReader( + message: DeldatastoreRequest, + reader: jspb.BinaryReader, + ): DeldatastoreRequest; +} + +export namespace DeldatastoreRequest { + export type AsObject = { + keyList: Array; + generation?: number; + }; +} + +export class DeldatastoreResponse extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): DeldatastoreResponse; + addKey(value: string, index?: number): string; + + hasGeneration(): boolean; + clearGeneration(): void; + getGeneration(): number | undefined; + setGeneration(value: number): DeldatastoreResponse; + + hasHex(): boolean; + clearHex(): void; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): DeldatastoreResponse; + + hasString(): boolean; + clearString(): void; + getString(): string | undefined; + setString(value: string): DeldatastoreResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeldatastoreResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DeldatastoreResponse, + ): DeldatastoreResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DeldatastoreResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DeldatastoreResponse; + static deserializeBinaryFromReader( + message: DeldatastoreResponse, + reader: jspb.BinaryReader, + ): DeldatastoreResponse; +} + +export namespace DeldatastoreResponse { + export type AsObject = { + keyList: Array; + generation?: number; + hex: Uint8Array | string; + string?: string; + }; +} + +export class DelexpiredinvoiceRequest extends jspb.Message { + hasMaxexpirytime(): boolean; + clearMaxexpirytime(): void; + getMaxexpirytime(): number | undefined; + setMaxexpirytime(value: number): DelexpiredinvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DelexpiredinvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DelexpiredinvoiceRequest, + ): DelexpiredinvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DelexpiredinvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DelexpiredinvoiceRequest; + static deserializeBinaryFromReader( + message: DelexpiredinvoiceRequest, + reader: jspb.BinaryReader, + ): DelexpiredinvoiceRequest; +} + +export namespace DelexpiredinvoiceRequest { + export type AsObject = { + maxexpirytime?: number; + }; +} + +export class DelexpiredinvoiceResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DelexpiredinvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DelexpiredinvoiceResponse, + ): DelexpiredinvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DelexpiredinvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DelexpiredinvoiceResponse; + static deserializeBinaryFromReader( + message: DelexpiredinvoiceResponse, + reader: jspb.BinaryReader, + ): DelexpiredinvoiceResponse; +} + +export namespace DelexpiredinvoiceResponse { + export type AsObject = {}; +} + +export class DelinvoiceRequest extends jspb.Message { + getLabel(): string; + setLabel(value: string): DelinvoiceRequest; + getStatus(): DelinvoiceRequest.DelinvoiceStatus; + setStatus(value: DelinvoiceRequest.DelinvoiceStatus): DelinvoiceRequest; + + hasDesconly(): boolean; + clearDesconly(): void; + getDesconly(): boolean | undefined; + setDesconly(value: boolean): DelinvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DelinvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DelinvoiceRequest, + ): DelinvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DelinvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DelinvoiceRequest; + static deserializeBinaryFromReader( + message: DelinvoiceRequest, + reader: jspb.BinaryReader, + ): DelinvoiceRequest; +} + +export namespace DelinvoiceRequest { + export type AsObject = { + label: string; + status: DelinvoiceRequest.DelinvoiceStatus; + desconly?: boolean; + }; + + export enum DelinvoiceStatus { + PAID = 0, + EXPIRED = 1, + UNPAID = 2, + } +} + +export class DelinvoiceResponse extends jspb.Message { + getLabel(): string; + setLabel(value: string): DelinvoiceResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): DelinvoiceResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): DelinvoiceResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): DelinvoiceResponse; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): DelinvoiceResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): DelinvoiceResponse; + getStatus(): DelinvoiceResponse.DelinvoiceStatus; + setStatus(value: DelinvoiceResponse.DelinvoiceStatus): DelinvoiceResponse; + getExpiresAt(): number; + setExpiresAt(value: number): DelinvoiceResponse; + + hasLocalOfferId(): boolean; + clearLocalOfferId(): void; + getLocalOfferId(): Uint8Array | string; + getLocalOfferId_asU8(): Uint8Array; + getLocalOfferId_asB64(): string; + setLocalOfferId(value: Uint8Array | string): DelinvoiceResponse; + + hasInvreqPayerNote(): boolean; + clearInvreqPayerNote(): void; + getInvreqPayerNote(): string | undefined; + setInvreqPayerNote(value: string): DelinvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DelinvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DelinvoiceResponse, + ): DelinvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DelinvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DelinvoiceResponse; + static deserializeBinaryFromReader( + message: DelinvoiceResponse, + reader: jspb.BinaryReader, + ): DelinvoiceResponse; +} + +export namespace DelinvoiceResponse { + export type AsObject = { + label: string; + bolt11?: string; + bolt12?: string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + description?: string; + paymentHash: Uint8Array | string; + status: DelinvoiceResponse.DelinvoiceStatus; + expiresAt: number; + localOfferId: Uint8Array | string; + invreqPayerNote?: string; + }; + + export enum DelinvoiceStatus { + PAID = 0, + EXPIRED = 1, + UNPAID = 2, + } +} + +export class InvoiceRequest extends jspb.Message { + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.AmountOrAny | undefined; + setAmountMsat(value?: cln_primitives_pb.AmountOrAny): InvoiceRequest; + getDescription(): string; + setDescription(value: string): InvoiceRequest; + getLabel(): string; + setLabel(value: string): InvoiceRequest; + + hasExpiry(): boolean; + clearExpiry(): void; + getExpiry(): number | undefined; + setExpiry(value: number): InvoiceRequest; + clearFallbacksList(): void; + getFallbacksList(): Array; + setFallbacksList(value: Array): InvoiceRequest; + addFallbacks(value: string, index?: number): string; + + hasPreimage(): boolean; + clearPreimage(): void; + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): InvoiceRequest; + + hasCltv(): boolean; + clearCltv(): void; + getCltv(): number | undefined; + setCltv(value: number): InvoiceRequest; + + hasDeschashonly(): boolean; + clearDeschashonly(): void; + getDeschashonly(): boolean | undefined; + setDeschashonly(value: boolean): InvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: InvoiceRequest, + ): InvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: InvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): InvoiceRequest; + static deserializeBinaryFromReader( + message: InvoiceRequest, + reader: jspb.BinaryReader, + ): InvoiceRequest; +} + +export namespace InvoiceRequest { + export type AsObject = { + amountMsat?: cln_primitives_pb.AmountOrAny.AsObject; + description: string; + label: string; + expiry?: number; + fallbacksList: Array; + preimage: Uint8Array | string; + cltv?: number; + deschashonly?: boolean; + }; +} + +export class InvoiceResponse extends jspb.Message { + getBolt11(): string; + setBolt11(value: string): InvoiceResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): InvoiceResponse; + getPaymentSecret(): Uint8Array | string; + getPaymentSecret_asU8(): Uint8Array; + getPaymentSecret_asB64(): string; + setPaymentSecret(value: Uint8Array | string): InvoiceResponse; + getExpiresAt(): number; + setExpiresAt(value: number): InvoiceResponse; + + hasWarningCapacity(): boolean; + clearWarningCapacity(): void; + getWarningCapacity(): string | undefined; + setWarningCapacity(value: string): InvoiceResponse; + + hasWarningOffline(): boolean; + clearWarningOffline(): void; + getWarningOffline(): string | undefined; + setWarningOffline(value: string): InvoiceResponse; + + hasWarningDeadends(): boolean; + clearWarningDeadends(): void; + getWarningDeadends(): string | undefined; + setWarningDeadends(value: string): InvoiceResponse; + + hasWarningPrivateUnused(): boolean; + clearWarningPrivateUnused(): void; + getWarningPrivateUnused(): string | undefined; + setWarningPrivateUnused(value: string): InvoiceResponse; + + hasWarningMpp(): boolean; + clearWarningMpp(): void; + getWarningMpp(): string | undefined; + setWarningMpp(value: string): InvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: InvoiceResponse, + ): InvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: InvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): InvoiceResponse; + static deserializeBinaryFromReader( + message: InvoiceResponse, + reader: jspb.BinaryReader, + ): InvoiceResponse; +} + +export namespace InvoiceResponse { + export type AsObject = { + bolt11: string; + paymentHash: Uint8Array | string; + paymentSecret: Uint8Array | string; + expiresAt: number; + warningCapacity?: string; + warningOffline?: string; + warningDeadends?: string; + warningPrivateUnused?: string; + warningMpp?: string; + }; +} + +export class ListdatastoreRequest extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): ListdatastoreRequest; + addKey(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListdatastoreRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListdatastoreRequest, + ): ListdatastoreRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListdatastoreRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListdatastoreRequest; + static deserializeBinaryFromReader( + message: ListdatastoreRequest, + reader: jspb.BinaryReader, + ): ListdatastoreRequest; +} + +export namespace ListdatastoreRequest { + export type AsObject = { + keyList: Array; + }; +} + +export class ListdatastoreResponse extends jspb.Message { + clearDatastoreList(): void; + getDatastoreList(): Array; + setDatastoreList(value: Array): ListdatastoreResponse; + addDatastore( + value?: ListdatastoreDatastore, + index?: number, + ): ListdatastoreDatastore; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListdatastoreResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListdatastoreResponse, + ): ListdatastoreResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListdatastoreResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListdatastoreResponse; + static deserializeBinaryFromReader( + message: ListdatastoreResponse, + reader: jspb.BinaryReader, + ): ListdatastoreResponse; +} + +export namespace ListdatastoreResponse { + export type AsObject = { + datastoreList: Array; + }; +} + +export class ListdatastoreDatastore extends jspb.Message { + clearKeyList(): void; + getKeyList(): Array; + setKeyList(value: Array): ListdatastoreDatastore; + addKey(value: string, index?: number): string; + + hasGeneration(): boolean; + clearGeneration(): void; + getGeneration(): number | undefined; + setGeneration(value: number): ListdatastoreDatastore; + + hasHex(): boolean; + clearHex(): void; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): ListdatastoreDatastore; + + hasString(): boolean; + clearString(): void; + getString(): string | undefined; + setString(value: string): ListdatastoreDatastore; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListdatastoreDatastore.AsObject; + static toObject( + includeInstance: boolean, + msg: ListdatastoreDatastore, + ): ListdatastoreDatastore.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListdatastoreDatastore, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListdatastoreDatastore; + static deserializeBinaryFromReader( + message: ListdatastoreDatastore, + reader: jspb.BinaryReader, + ): ListdatastoreDatastore; +} + +export namespace ListdatastoreDatastore { + export type AsObject = { + keyList: Array; + generation?: number; + hex: Uint8Array | string; + string?: string; + }; +} + +export class ListinvoicesRequest extends jspb.Message { + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): ListinvoicesRequest; + + hasInvstring(): boolean; + clearInvstring(): void; + getInvstring(): string | undefined; + setInvstring(value: string): ListinvoicesRequest; + + hasPaymentHash(): boolean; + clearPaymentHash(): void; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListinvoicesRequest; + + hasOfferId(): boolean; + clearOfferId(): void; + getOfferId(): string | undefined; + setOfferId(value: string): ListinvoicesRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListinvoicesRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListinvoicesRequest, + ): ListinvoicesRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListinvoicesRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListinvoicesRequest; + static deserializeBinaryFromReader( + message: ListinvoicesRequest, + reader: jspb.BinaryReader, + ): ListinvoicesRequest; +} + +export namespace ListinvoicesRequest { + export type AsObject = { + label?: string; + invstring?: string; + paymentHash: Uint8Array | string; + offerId?: string; + }; +} + +export class ListinvoicesResponse extends jspb.Message { + clearInvoicesList(): void; + getInvoicesList(): Array; + setInvoicesList(value: Array): ListinvoicesResponse; + addInvoices( + value?: ListinvoicesInvoices, + index?: number, + ): ListinvoicesInvoices; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListinvoicesResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListinvoicesResponse, + ): ListinvoicesResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListinvoicesResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListinvoicesResponse; + static deserializeBinaryFromReader( + message: ListinvoicesResponse, + reader: jspb.BinaryReader, + ): ListinvoicesResponse; +} + +export namespace ListinvoicesResponse { + export type AsObject = { + invoicesList: Array; + }; +} + +export class ListinvoicesInvoices extends jspb.Message { + getLabel(): string; + setLabel(value: string): ListinvoicesInvoices; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): ListinvoicesInvoices; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListinvoicesInvoices; + getStatus(): ListinvoicesInvoices.ListinvoicesInvoicesStatus; + setStatus( + value: ListinvoicesInvoices.ListinvoicesInvoicesStatus, + ): ListinvoicesInvoices; + getExpiresAt(): number; + setExpiresAt(value: number): ListinvoicesInvoices; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): ListinvoicesInvoices; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): ListinvoicesInvoices; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): ListinvoicesInvoices; + + hasLocalOfferId(): boolean; + clearLocalOfferId(): void; + getLocalOfferId(): Uint8Array | string; + getLocalOfferId_asU8(): Uint8Array; + getLocalOfferId_asB64(): string; + setLocalOfferId(value: Uint8Array | string): ListinvoicesInvoices; + + hasInvreqPayerNote(): boolean; + clearInvreqPayerNote(): void; + getInvreqPayerNote(): string | undefined; + setInvreqPayerNote(value: string): ListinvoicesInvoices; + + hasPayIndex(): boolean; + clearPayIndex(): void; + getPayIndex(): number | undefined; + setPayIndex(value: number): ListinvoicesInvoices; + + hasAmountReceivedMsat(): boolean; + clearAmountReceivedMsat(): void; + getAmountReceivedMsat(): cln_primitives_pb.Amount | undefined; + setAmountReceivedMsat(value?: cln_primitives_pb.Amount): ListinvoicesInvoices; + + hasPaidAt(): boolean; + clearPaidAt(): void; + getPaidAt(): number | undefined; + setPaidAt(value: number): ListinvoicesInvoices; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): ListinvoicesInvoices; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListinvoicesInvoices.AsObject; + static toObject( + includeInstance: boolean, + msg: ListinvoicesInvoices, + ): ListinvoicesInvoices.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListinvoicesInvoices, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListinvoicesInvoices; + static deserializeBinaryFromReader( + message: ListinvoicesInvoices, + reader: jspb.BinaryReader, + ): ListinvoicesInvoices; +} + +export namespace ListinvoicesInvoices { + export type AsObject = { + label: string; + description?: string; + paymentHash: Uint8Array | string; + status: ListinvoicesInvoices.ListinvoicesInvoicesStatus; + expiresAt: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + bolt11?: string; + bolt12?: string; + localOfferId: Uint8Array | string; + invreqPayerNote?: string; + payIndex?: number; + amountReceivedMsat?: cln_primitives_pb.Amount.AsObject; + paidAt?: number; + paymentPreimage: Uint8Array | string; + }; + + export enum ListinvoicesInvoicesStatus { + UNPAID = 0, + PAID = 1, + EXPIRED = 2, + } +} + +export class SendonionRequest extends jspb.Message { + getOnion(): Uint8Array | string; + getOnion_asU8(): Uint8Array; + getOnion_asB64(): string; + setOnion(value: Uint8Array | string): SendonionRequest; + + hasFirstHop(): boolean; + clearFirstHop(): void; + getFirstHop(): SendonionFirst_hop | undefined; + setFirstHop(value?: SendonionFirst_hop): SendonionRequest; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): SendonionRequest; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): SendonionRequest; + clearSharedSecretsList(): void; + getSharedSecretsList(): Array; + getSharedSecretsList_asU8(): Array; + getSharedSecretsList_asB64(): Array; + setSharedSecretsList(value: Array): SendonionRequest; + addSharedSecrets( + value: Uint8Array | string, + index?: number, + ): Uint8Array | string; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): SendonionRequest; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): SendonionRequest; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): SendonionRequest; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): SendonionRequest; + + hasLocalinvreqid(): boolean; + clearLocalinvreqid(): void; + getLocalinvreqid(): Uint8Array | string; + getLocalinvreqid_asU8(): Uint8Array; + getLocalinvreqid_asB64(): string; + setLocalinvreqid(value: Uint8Array | string): SendonionRequest; + + hasGroupid(): boolean; + clearGroupid(): void; + getGroupid(): number | undefined; + setGroupid(value: number): SendonionRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendonionRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SendonionRequest, + ): SendonionRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendonionRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendonionRequest; + static deserializeBinaryFromReader( + message: SendonionRequest, + reader: jspb.BinaryReader, + ): SendonionRequest; +} + +export namespace SendonionRequest { + export type AsObject = { + onion: Uint8Array | string; + firstHop?: SendonionFirst_hop.AsObject; + paymentHash: Uint8Array | string; + label?: string; + sharedSecretsList: Array; + partid?: number; + bolt11?: string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + destination: Uint8Array | string; + localinvreqid: Uint8Array | string; + groupid?: number; + }; +} + +export class SendonionResponse extends jspb.Message { + getId(): number; + setId(value: number): SendonionResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): SendonionResponse; + getStatus(): SendonionResponse.SendonionStatus; + setStatus(value: SendonionResponse.SendonionStatus): SendonionResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): SendonionResponse; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): SendonionResponse; + getCreatedAt(): number; + setCreatedAt(value: number): SendonionResponse; + + hasAmountSentMsat(): boolean; + clearAmountSentMsat(): void; + getAmountSentMsat(): cln_primitives_pb.Amount | undefined; + setAmountSentMsat(value?: cln_primitives_pb.Amount): SendonionResponse; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): SendonionResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): SendonionResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): SendonionResponse; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): SendonionResponse; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): SendonionResponse; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): string | undefined; + setMessage(value: string): SendonionResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendonionResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SendonionResponse, + ): SendonionResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendonionResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendonionResponse; + static deserializeBinaryFromReader( + message: SendonionResponse, + reader: jspb.BinaryReader, + ): SendonionResponse; +} + +export namespace SendonionResponse { + export type AsObject = { + id: number; + paymentHash: Uint8Array | string; + status: SendonionResponse.SendonionStatus; + amountMsat?: cln_primitives_pb.Amount.AsObject; + destination: Uint8Array | string; + createdAt: number; + amountSentMsat?: cln_primitives_pb.Amount.AsObject; + label?: string; + bolt11?: string; + bolt12?: string; + partid?: number; + paymentPreimage: Uint8Array | string; + message?: string; + }; + + export enum SendonionStatus { + PENDING = 0, + COMPLETE = 1, + } +} + +export class SendonionFirst_hop extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): SendonionFirst_hop; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): SendonionFirst_hop; + getDelay(): number; + setDelay(value: number): SendonionFirst_hop; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendonionFirst_hop.AsObject; + static toObject( + includeInstance: boolean, + msg: SendonionFirst_hop, + ): SendonionFirst_hop.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendonionFirst_hop, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendonionFirst_hop; + static deserializeBinaryFromReader( + message: SendonionFirst_hop, + reader: jspb.BinaryReader, + ): SendonionFirst_hop; +} + +export namespace SendonionFirst_hop { + export type AsObject = { + id: Uint8Array | string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + delay: number; + }; +} + +export class ListsendpaysRequest extends jspb.Message { + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): ListsendpaysRequest; + + hasPaymentHash(): boolean; + clearPaymentHash(): void; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListsendpaysRequest; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): ListsendpaysRequest.ListsendpaysStatus | undefined; + setStatus(value: ListsendpaysRequest.ListsendpaysStatus): ListsendpaysRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListsendpaysRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListsendpaysRequest, + ): ListsendpaysRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListsendpaysRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListsendpaysRequest; + static deserializeBinaryFromReader( + message: ListsendpaysRequest, + reader: jspb.BinaryReader, + ): ListsendpaysRequest; +} + +export namespace ListsendpaysRequest { + export type AsObject = { + bolt11?: string; + paymentHash: Uint8Array | string; + status?: ListsendpaysRequest.ListsendpaysStatus; + }; + + export enum ListsendpaysStatus { + PENDING = 0, + COMPLETE = 1, + FAILED = 2, + } +} + +export class ListsendpaysResponse extends jspb.Message { + clearPaymentsList(): void; + getPaymentsList(): Array; + setPaymentsList(value: Array): ListsendpaysResponse; + addPayments( + value?: ListsendpaysPayments, + index?: number, + ): ListsendpaysPayments; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListsendpaysResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListsendpaysResponse, + ): ListsendpaysResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListsendpaysResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListsendpaysResponse; + static deserializeBinaryFromReader( + message: ListsendpaysResponse, + reader: jspb.BinaryReader, + ): ListsendpaysResponse; +} + +export namespace ListsendpaysResponse { + export type AsObject = { + paymentsList: Array; + }; +} + +export class ListsendpaysPayments extends jspb.Message { + getId(): number; + setId(value: number): ListsendpaysPayments; + getGroupid(): number; + setGroupid(value: number): ListsendpaysPayments; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): ListsendpaysPayments; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListsendpaysPayments; + getStatus(): ListsendpaysPayments.ListsendpaysPaymentsStatus; + setStatus( + value: ListsendpaysPayments.ListsendpaysPaymentsStatus, + ): ListsendpaysPayments; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): ListsendpaysPayments; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): ListsendpaysPayments; + getCreatedAt(): number; + setCreatedAt(value: number): ListsendpaysPayments; + + hasAmountSentMsat(): boolean; + clearAmountSentMsat(): void; + getAmountSentMsat(): cln_primitives_pb.Amount | undefined; + setAmountSentMsat(value?: cln_primitives_pb.Amount): ListsendpaysPayments; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): ListsendpaysPayments; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): ListsendpaysPayments; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): ListsendpaysPayments; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): ListsendpaysPayments; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): ListsendpaysPayments; + + hasErroronion(): boolean; + clearErroronion(): void; + getErroronion(): Uint8Array | string; + getErroronion_asU8(): Uint8Array; + getErroronion_asB64(): string; + setErroronion(value: Uint8Array | string): ListsendpaysPayments; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListsendpaysPayments.AsObject; + static toObject( + includeInstance: boolean, + msg: ListsendpaysPayments, + ): ListsendpaysPayments.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListsendpaysPayments, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListsendpaysPayments; + static deserializeBinaryFromReader( + message: ListsendpaysPayments, + reader: jspb.BinaryReader, + ): ListsendpaysPayments; +} + +export namespace ListsendpaysPayments { + export type AsObject = { + id: number; + groupid: number; + partid?: number; + paymentHash: Uint8Array | string; + status: ListsendpaysPayments.ListsendpaysPaymentsStatus; + amountMsat?: cln_primitives_pb.Amount.AsObject; + destination: Uint8Array | string; + createdAt: number; + amountSentMsat?: cln_primitives_pb.Amount.AsObject; + label?: string; + bolt11?: string; + description?: string; + bolt12?: string; + paymentPreimage: Uint8Array | string; + erroronion: Uint8Array | string; + }; + + export enum ListsendpaysPaymentsStatus { + PENDING = 0, + FAILED = 1, + COMPLETE = 2, + } +} + +export class ListtransactionsRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListtransactionsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListtransactionsRequest, + ): ListtransactionsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListtransactionsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListtransactionsRequest; + static deserializeBinaryFromReader( + message: ListtransactionsRequest, + reader: jspb.BinaryReader, + ): ListtransactionsRequest; +} + +export namespace ListtransactionsRequest { + export type AsObject = {}; +} + +export class ListtransactionsResponse extends jspb.Message { + clearTransactionsList(): void; + getTransactionsList(): Array; + setTransactionsList( + value: Array, + ): ListtransactionsResponse; + addTransactions( + value?: ListtransactionsTransactions, + index?: number, + ): ListtransactionsTransactions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListtransactionsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListtransactionsResponse, + ): ListtransactionsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListtransactionsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListtransactionsResponse; + static deserializeBinaryFromReader( + message: ListtransactionsResponse, + reader: jspb.BinaryReader, + ): ListtransactionsResponse; +} + +export namespace ListtransactionsResponse { + export type AsObject = { + transactionsList: Array; + }; +} + +export class ListtransactionsTransactions extends jspb.Message { + getHash(): Uint8Array | string; + getHash_asU8(): Uint8Array; + getHash_asB64(): string; + setHash(value: Uint8Array | string): ListtransactionsTransactions; + getRawtx(): Uint8Array | string; + getRawtx_asU8(): Uint8Array; + getRawtx_asB64(): string; + setRawtx(value: Uint8Array | string): ListtransactionsTransactions; + getBlockheight(): number; + setBlockheight(value: number): ListtransactionsTransactions; + getTxindex(): number; + setTxindex(value: number): ListtransactionsTransactions; + getLocktime(): number; + setLocktime(value: number): ListtransactionsTransactions; + getVersion(): number; + setVersion(value: number): ListtransactionsTransactions; + clearInputsList(): void; + getInputsList(): Array; + setInputsList( + value: Array, + ): ListtransactionsTransactions; + addInputs( + value?: ListtransactionsTransactionsInputs, + index?: number, + ): ListtransactionsTransactionsInputs; + clearOutputsList(): void; + getOutputsList(): Array; + setOutputsList( + value: Array, + ): ListtransactionsTransactions; + addOutputs( + value?: ListtransactionsTransactionsOutputs, + index?: number, + ): ListtransactionsTransactionsOutputs; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListtransactionsTransactions.AsObject; + static toObject( + includeInstance: boolean, + msg: ListtransactionsTransactions, + ): ListtransactionsTransactions.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListtransactionsTransactions, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListtransactionsTransactions; + static deserializeBinaryFromReader( + message: ListtransactionsTransactions, + reader: jspb.BinaryReader, + ): ListtransactionsTransactions; +} + +export namespace ListtransactionsTransactions { + export type AsObject = { + hash: Uint8Array | string; + rawtx: Uint8Array | string; + blockheight: number; + txindex: number; + locktime: number; + version: number; + inputsList: Array; + outputsList: Array; + }; +} + +export class ListtransactionsTransactionsInputs extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): ListtransactionsTransactionsInputs; + getIndex(): number; + setIndex(value: number): ListtransactionsTransactionsInputs; + getSequence(): number; + setSequence(value: number): ListtransactionsTransactionsInputs; + + hasItemType(): boolean; + clearItemType(): void; + getItemType(): + | ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType + | undefined; + setItemType( + value: ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType, + ): ListtransactionsTransactionsInputs; + + hasChannel(): boolean; + clearChannel(): void; + getChannel(): string | undefined; + setChannel(value: string): ListtransactionsTransactionsInputs; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean, + ): ListtransactionsTransactionsInputs.AsObject; + static toObject( + includeInstance: boolean, + msg: ListtransactionsTransactionsInputs, + ): ListtransactionsTransactionsInputs.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListtransactionsTransactionsInputs, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary( + bytes: Uint8Array, + ): ListtransactionsTransactionsInputs; + static deserializeBinaryFromReader( + message: ListtransactionsTransactionsInputs, + reader: jspb.BinaryReader, + ): ListtransactionsTransactionsInputs; +} + +export namespace ListtransactionsTransactionsInputs { + export type AsObject = { + txid: Uint8Array | string; + index: number; + sequence: number; + itemType?: ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType; + channel?: string; + }; + + export enum ListtransactionsTransactionsInputsType { + THEIRS = 0, + DEPOSIT = 1, + WITHDRAW = 2, + CHANNEL_FUNDING = 3, + CHANNEL_MUTUAL_CLOSE = 4, + CHANNEL_UNILATERAL_CLOSE = 5, + CHANNEL_SWEEP = 6, + CHANNEL_HTLC_SUCCESS = 7, + CHANNEL_HTLC_TIMEOUT = 8, + CHANNEL_PENALTY = 9, + CHANNEL_UNILATERAL_CHEAT = 10, + } +} + +export class ListtransactionsTransactionsOutputs extends jspb.Message { + getIndex(): number; + setIndex(value: number): ListtransactionsTransactionsOutputs; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat( + value?: cln_primitives_pb.Amount, + ): ListtransactionsTransactionsOutputs; + getScriptpubkey(): Uint8Array | string; + getScriptpubkey_asU8(): Uint8Array; + getScriptpubkey_asB64(): string; + setScriptpubkey( + value: Uint8Array | string, + ): ListtransactionsTransactionsOutputs; + + hasItemType(): boolean; + clearItemType(): void; + getItemType(): + | ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType + | undefined; + setItemType( + value: ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType, + ): ListtransactionsTransactionsOutputs; + + hasChannel(): boolean; + clearChannel(): void; + getChannel(): string | undefined; + setChannel(value: string): ListtransactionsTransactionsOutputs; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean, + ): ListtransactionsTransactionsOutputs.AsObject; + static toObject( + includeInstance: boolean, + msg: ListtransactionsTransactionsOutputs, + ): ListtransactionsTransactionsOutputs.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListtransactionsTransactionsOutputs, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary( + bytes: Uint8Array, + ): ListtransactionsTransactionsOutputs; + static deserializeBinaryFromReader( + message: ListtransactionsTransactionsOutputs, + reader: jspb.BinaryReader, + ): ListtransactionsTransactionsOutputs; +} + +export namespace ListtransactionsTransactionsOutputs { + export type AsObject = { + index: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + scriptpubkey: Uint8Array | string; + itemType?: ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType; + channel?: string; + }; + + export enum ListtransactionsTransactionsOutputsType { + THEIRS = 0, + DEPOSIT = 1, + WITHDRAW = 2, + CHANNEL_FUNDING = 3, + CHANNEL_MUTUAL_CLOSE = 4, + CHANNEL_UNILATERAL_CLOSE = 5, + CHANNEL_SWEEP = 6, + CHANNEL_HTLC_SUCCESS = 7, + CHANNEL_HTLC_TIMEOUT = 8, + CHANNEL_PENALTY = 9, + CHANNEL_UNILATERAL_CHEAT = 10, + } +} + +export class PayRequest extends jspb.Message { + getBolt11(): string; + setBolt11(value: string): PayRequest; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): PayRequest; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): PayRequest; + + hasRiskfactor(): boolean; + clearRiskfactor(): void; + getRiskfactor(): number | undefined; + setRiskfactor(value: number): PayRequest; + + hasMaxfeepercent(): boolean; + clearMaxfeepercent(): void; + getMaxfeepercent(): number | undefined; + setMaxfeepercent(value: number): PayRequest; + + hasRetryFor(): boolean; + clearRetryFor(): void; + getRetryFor(): number | undefined; + setRetryFor(value: number): PayRequest; + + hasMaxdelay(): boolean; + clearMaxdelay(): void; + getMaxdelay(): number | undefined; + setMaxdelay(value: number): PayRequest; + + hasExemptfee(): boolean; + clearExemptfee(): void; + getExemptfee(): cln_primitives_pb.Amount | undefined; + setExemptfee(value?: cln_primitives_pb.Amount): PayRequest; + + hasLocalinvreqid(): boolean; + clearLocalinvreqid(): void; + getLocalinvreqid(): Uint8Array | string; + getLocalinvreqid_asU8(): Uint8Array; + getLocalinvreqid_asB64(): string; + setLocalinvreqid(value: Uint8Array | string): PayRequest; + clearExcludeList(): void; + getExcludeList(): Array; + setExcludeList(value: Array): PayRequest; + addExclude(value: string, index?: number): string; + + hasMaxfee(): boolean; + clearMaxfee(): void; + getMaxfee(): cln_primitives_pb.Amount | undefined; + setMaxfee(value?: cln_primitives_pb.Amount): PayRequest; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): PayRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PayRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: PayRequest, + ): PayRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: PayRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): PayRequest; + static deserializeBinaryFromReader( + message: PayRequest, + reader: jspb.BinaryReader, + ): PayRequest; +} + +export namespace PayRequest { + export type AsObject = { + bolt11: string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + label?: string; + riskfactor?: number; + maxfeepercent?: number; + retryFor?: number; + maxdelay?: number; + exemptfee?: cln_primitives_pb.Amount.AsObject; + localinvreqid: Uint8Array | string; + excludeList: Array; + maxfee?: cln_primitives_pb.Amount.AsObject; + description?: string; + }; +} + +export class PayResponse extends jspb.Message { + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): PayResponse; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): PayResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): PayResponse; + getCreatedAt(): number; + setCreatedAt(value: number): PayResponse; + getParts(): number; + setParts(value: number): PayResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): PayResponse; + + hasAmountSentMsat(): boolean; + clearAmountSentMsat(): void; + getAmountSentMsat(): cln_primitives_pb.Amount | undefined; + setAmountSentMsat(value?: cln_primitives_pb.Amount): PayResponse; + + hasWarningPartialCompletion(): boolean; + clearWarningPartialCompletion(): void; + getWarningPartialCompletion(): string | undefined; + setWarningPartialCompletion(value: string): PayResponse; + getStatus(): PayResponse.PayStatus; + setStatus(value: PayResponse.PayStatus): PayResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PayResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: PayResponse, + ): PayResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: PayResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): PayResponse; + static deserializeBinaryFromReader( + message: PayResponse, + reader: jspb.BinaryReader, + ): PayResponse; +} + +export namespace PayResponse { + export type AsObject = { + paymentPreimage: Uint8Array | string; + destination: Uint8Array | string; + paymentHash: Uint8Array | string; + createdAt: number; + parts: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + amountSentMsat?: cln_primitives_pb.Amount.AsObject; + warningPartialCompletion?: string; + status: PayResponse.PayStatus; + }; + + export enum PayStatus { + COMPLETE = 0, + PENDING = 1, + FAILED = 2, + } +} + +export class ListnodesRequest extends jspb.Message { + hasId(): boolean; + clearId(): void; + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): ListnodesRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListnodesRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListnodesRequest, + ): ListnodesRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListnodesRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListnodesRequest; + static deserializeBinaryFromReader( + message: ListnodesRequest, + reader: jspb.BinaryReader, + ): ListnodesRequest; +} + +export namespace ListnodesRequest { + export type AsObject = { + id: Uint8Array | string; + }; +} + +export class ListnodesResponse extends jspb.Message { + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): ListnodesResponse; + addNodes(value?: ListnodesNodes, index?: number): ListnodesNodes; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListnodesResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListnodesResponse, + ): ListnodesResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListnodesResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListnodesResponse; + static deserializeBinaryFromReader( + message: ListnodesResponse, + reader: jspb.BinaryReader, + ): ListnodesResponse; +} + +export namespace ListnodesResponse { + export type AsObject = { + nodesList: Array; + }; +} + +export class ListnodesNodes extends jspb.Message { + getNodeid(): Uint8Array | string; + getNodeid_asU8(): Uint8Array; + getNodeid_asB64(): string; + setNodeid(value: Uint8Array | string): ListnodesNodes; + + hasLastTimestamp(): boolean; + clearLastTimestamp(): void; + getLastTimestamp(): number | undefined; + setLastTimestamp(value: number): ListnodesNodes; + + hasAlias(): boolean; + clearAlias(): void; + getAlias(): string | undefined; + setAlias(value: string): ListnodesNodes; + + hasColor(): boolean; + clearColor(): void; + getColor(): Uint8Array | string; + getColor_asU8(): Uint8Array; + getColor_asB64(): string; + setColor(value: Uint8Array | string): ListnodesNodes; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): Uint8Array | string; + getFeatures_asU8(): Uint8Array; + getFeatures_asB64(): string; + setFeatures(value: Uint8Array | string): ListnodesNodes; + clearAddressesList(): void; + getAddressesList(): Array; + setAddressesList(value: Array): ListnodesNodes; + addAddresses( + value?: ListnodesNodesAddresses, + index?: number, + ): ListnodesNodesAddresses; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListnodesNodes.AsObject; + static toObject( + includeInstance: boolean, + msg: ListnodesNodes, + ): ListnodesNodes.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListnodesNodes, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListnodesNodes; + static deserializeBinaryFromReader( + message: ListnodesNodes, + reader: jspb.BinaryReader, + ): ListnodesNodes; +} + +export namespace ListnodesNodes { + export type AsObject = { + nodeid: Uint8Array | string; + lastTimestamp?: number; + alias?: string; + color: Uint8Array | string; + features: Uint8Array | string; + addressesList: Array; + }; +} + +export class ListnodesNodesAddresses extends jspb.Message { + getItemType(): ListnodesNodesAddresses.ListnodesNodesAddressesType; + setItemType( + value: ListnodesNodesAddresses.ListnodesNodesAddressesType, + ): ListnodesNodesAddresses; + getPort(): number; + setPort(value: number): ListnodesNodesAddresses; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): string | undefined; + setAddress(value: string): ListnodesNodesAddresses; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListnodesNodesAddresses.AsObject; + static toObject( + includeInstance: boolean, + msg: ListnodesNodesAddresses, + ): ListnodesNodesAddresses.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListnodesNodesAddresses, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListnodesNodesAddresses; + static deserializeBinaryFromReader( + message: ListnodesNodesAddresses, + reader: jspb.BinaryReader, + ): ListnodesNodesAddresses; +} + +export namespace ListnodesNodesAddresses { + export type AsObject = { + itemType: ListnodesNodesAddresses.ListnodesNodesAddressesType; + port: number; + address?: string; + }; + + export enum ListnodesNodesAddressesType { + DNS = 0, + IPV4 = 1, + IPV6 = 2, + TORV2 = 3, + TORV3 = 4, + WEBSOCKET = 5, + } +} + +export class WaitanyinvoiceRequest extends jspb.Message { + hasLastpayIndex(): boolean; + clearLastpayIndex(): void; + getLastpayIndex(): number | undefined; + setLastpayIndex(value: number): WaitanyinvoiceRequest; + + hasTimeout(): boolean; + clearTimeout(): void; + getTimeout(): number | undefined; + setTimeout(value: number): WaitanyinvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitanyinvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: WaitanyinvoiceRequest, + ): WaitanyinvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WaitanyinvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WaitanyinvoiceRequest; + static deserializeBinaryFromReader( + message: WaitanyinvoiceRequest, + reader: jspb.BinaryReader, + ): WaitanyinvoiceRequest; +} + +export namespace WaitanyinvoiceRequest { + export type AsObject = { + lastpayIndex?: number; + timeout?: number; + }; +} + +export class WaitanyinvoiceResponse extends jspb.Message { + getLabel(): string; + setLabel(value: string): WaitanyinvoiceResponse; + getDescription(): string; + setDescription(value: string): WaitanyinvoiceResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): WaitanyinvoiceResponse; + getStatus(): WaitanyinvoiceResponse.WaitanyinvoiceStatus; + setStatus( + value: WaitanyinvoiceResponse.WaitanyinvoiceStatus, + ): WaitanyinvoiceResponse; + getExpiresAt(): number; + setExpiresAt(value: number): WaitanyinvoiceResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): WaitanyinvoiceResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): WaitanyinvoiceResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): WaitanyinvoiceResponse; + + hasPayIndex(): boolean; + clearPayIndex(): void; + getPayIndex(): number | undefined; + setPayIndex(value: number): WaitanyinvoiceResponse; + + hasAmountReceivedMsat(): boolean; + clearAmountReceivedMsat(): void; + getAmountReceivedMsat(): cln_primitives_pb.Amount | undefined; + setAmountReceivedMsat( + value?: cln_primitives_pb.Amount, + ): WaitanyinvoiceResponse; + + hasPaidAt(): boolean; + clearPaidAt(): void; + getPaidAt(): number | undefined; + setPaidAt(value: number): WaitanyinvoiceResponse; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): WaitanyinvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitanyinvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: WaitanyinvoiceResponse, + ): WaitanyinvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WaitanyinvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WaitanyinvoiceResponse; + static deserializeBinaryFromReader( + message: WaitanyinvoiceResponse, + reader: jspb.BinaryReader, + ): WaitanyinvoiceResponse; +} + +export namespace WaitanyinvoiceResponse { + export type AsObject = { + label: string; + description: string; + paymentHash: Uint8Array | string; + status: WaitanyinvoiceResponse.WaitanyinvoiceStatus; + expiresAt: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + bolt11?: string; + bolt12?: string; + payIndex?: number; + amountReceivedMsat?: cln_primitives_pb.Amount.AsObject; + paidAt?: number; + paymentPreimage: Uint8Array | string; + }; + + export enum WaitanyinvoiceStatus { + PAID = 0, + EXPIRED = 1, + } +} + +export class WaitinvoiceRequest extends jspb.Message { + getLabel(): string; + setLabel(value: string): WaitinvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitinvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: WaitinvoiceRequest, + ): WaitinvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WaitinvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WaitinvoiceRequest; + static deserializeBinaryFromReader( + message: WaitinvoiceRequest, + reader: jspb.BinaryReader, + ): WaitinvoiceRequest; +} + +export namespace WaitinvoiceRequest { + export type AsObject = { + label: string; + }; +} + +export class WaitinvoiceResponse extends jspb.Message { + getLabel(): string; + setLabel(value: string): WaitinvoiceResponse; + getDescription(): string; + setDescription(value: string): WaitinvoiceResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): WaitinvoiceResponse; + getStatus(): WaitinvoiceResponse.WaitinvoiceStatus; + setStatus(value: WaitinvoiceResponse.WaitinvoiceStatus): WaitinvoiceResponse; + getExpiresAt(): number; + setExpiresAt(value: number): WaitinvoiceResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): WaitinvoiceResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): WaitinvoiceResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): WaitinvoiceResponse; + + hasPayIndex(): boolean; + clearPayIndex(): void; + getPayIndex(): number | undefined; + setPayIndex(value: number): WaitinvoiceResponse; + + hasAmountReceivedMsat(): boolean; + clearAmountReceivedMsat(): void; + getAmountReceivedMsat(): cln_primitives_pb.Amount | undefined; + setAmountReceivedMsat(value?: cln_primitives_pb.Amount): WaitinvoiceResponse; + + hasPaidAt(): boolean; + clearPaidAt(): void; + getPaidAt(): number | undefined; + setPaidAt(value: number): WaitinvoiceResponse; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): WaitinvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitinvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: WaitinvoiceResponse, + ): WaitinvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WaitinvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WaitinvoiceResponse; + static deserializeBinaryFromReader( + message: WaitinvoiceResponse, + reader: jspb.BinaryReader, + ): WaitinvoiceResponse; +} + +export namespace WaitinvoiceResponse { + export type AsObject = { + label: string; + description: string; + paymentHash: Uint8Array | string; + status: WaitinvoiceResponse.WaitinvoiceStatus; + expiresAt: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + bolt11?: string; + bolt12?: string; + payIndex?: number; + amountReceivedMsat?: cln_primitives_pb.Amount.AsObject; + paidAt?: number; + paymentPreimage: Uint8Array | string; + }; + + export enum WaitinvoiceStatus { + PAID = 0, + EXPIRED = 1, + } +} + +export class WaitsendpayRequest extends jspb.Message { + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): WaitsendpayRequest; + + hasTimeout(): boolean; + clearTimeout(): void; + getTimeout(): number | undefined; + setTimeout(value: number): WaitsendpayRequest; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): WaitsendpayRequest; + + hasGroupid(): boolean; + clearGroupid(): void; + getGroupid(): number | undefined; + setGroupid(value: number): WaitsendpayRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitsendpayRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: WaitsendpayRequest, + ): WaitsendpayRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WaitsendpayRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WaitsendpayRequest; + static deserializeBinaryFromReader( + message: WaitsendpayRequest, + reader: jspb.BinaryReader, + ): WaitsendpayRequest; +} + +export namespace WaitsendpayRequest { + export type AsObject = { + paymentHash: Uint8Array | string; + timeout?: number; + partid?: number; + groupid?: number; + }; +} + +export class WaitsendpayResponse extends jspb.Message { + getId(): number; + setId(value: number): WaitsendpayResponse; + + hasGroupid(): boolean; + clearGroupid(): void; + getGroupid(): number | undefined; + setGroupid(value: number): WaitsendpayResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): WaitsendpayResponse; + getStatus(): WaitsendpayResponse.WaitsendpayStatus; + setStatus(value: WaitsendpayResponse.WaitsendpayStatus): WaitsendpayResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): WaitsendpayResponse; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): WaitsendpayResponse; + getCreatedAt(): number; + setCreatedAt(value: number): WaitsendpayResponse; + + hasCompletedAt(): boolean; + clearCompletedAt(): void; + getCompletedAt(): number | undefined; + setCompletedAt(value: number): WaitsendpayResponse; + + hasAmountSentMsat(): boolean; + clearAmountSentMsat(): void; + getAmountSentMsat(): cln_primitives_pb.Amount | undefined; + setAmountSentMsat(value?: cln_primitives_pb.Amount): WaitsendpayResponse; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): WaitsendpayResponse; + + hasPartid(): boolean; + clearPartid(): void; + getPartid(): number | undefined; + setPartid(value: number): WaitsendpayResponse; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): WaitsendpayResponse; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): WaitsendpayResponse; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): WaitsendpayResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WaitsendpayResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: WaitsendpayResponse, + ): WaitsendpayResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WaitsendpayResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WaitsendpayResponse; + static deserializeBinaryFromReader( + message: WaitsendpayResponse, + reader: jspb.BinaryReader, + ): WaitsendpayResponse; +} + +export namespace WaitsendpayResponse { + export type AsObject = { + id: number; + groupid?: number; + paymentHash: Uint8Array | string; + status: WaitsendpayResponse.WaitsendpayStatus; + amountMsat?: cln_primitives_pb.Amount.AsObject; + destination: Uint8Array | string; + createdAt: number; + completedAt?: number; + amountSentMsat?: cln_primitives_pb.Amount.AsObject; + label?: string; + partid?: number; + bolt11?: string; + bolt12?: string; + paymentPreimage: Uint8Array | string; + }; + + export enum WaitsendpayStatus { + COMPLETE = 0, + } +} + +export class NewaddrRequest extends jspb.Message { + hasAddresstype(): boolean; + clearAddresstype(): void; + getAddresstype(): NewaddrRequest.NewaddrAddresstype | undefined; + setAddresstype(value: NewaddrRequest.NewaddrAddresstype): NewaddrRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewaddrRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: NewaddrRequest, + ): NewaddrRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: NewaddrRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): NewaddrRequest; + static deserializeBinaryFromReader( + message: NewaddrRequest, + reader: jspb.BinaryReader, + ): NewaddrRequest; +} + +export namespace NewaddrRequest { + export type AsObject = { + addresstype?: NewaddrRequest.NewaddrAddresstype; + }; + + export enum NewaddrAddresstype { + BECH32 = 0, + ALL = 2, + } +} + +export class NewaddrResponse extends jspb.Message { + hasBech32(): boolean; + clearBech32(): void; + getBech32(): string | undefined; + setBech32(value: string): NewaddrResponse; + + hasP2shSegwit(): boolean; + clearP2shSegwit(): void; + getP2shSegwit(): string | undefined; + setP2shSegwit(value: string): NewaddrResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NewaddrResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: NewaddrResponse, + ): NewaddrResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: NewaddrResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): NewaddrResponse; + static deserializeBinaryFromReader( + message: NewaddrResponse, + reader: jspb.BinaryReader, + ): NewaddrResponse; +} + +export namespace NewaddrResponse { + export type AsObject = { + bech32?: string; + p2shSegwit?: string; + }; +} + +export class WithdrawRequest extends jspb.Message { + getDestination(): string; + setDestination(value: string): WithdrawRequest; + + hasSatoshi(): boolean; + clearSatoshi(): void; + getSatoshi(): cln_primitives_pb.AmountOrAll | undefined; + setSatoshi(value?: cln_primitives_pb.AmountOrAll): WithdrawRequest; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): cln_primitives_pb.Feerate | undefined; + setFeerate(value?: cln_primitives_pb.Feerate): WithdrawRequest; + + hasMinconf(): boolean; + clearMinconf(): void; + getMinconf(): number | undefined; + setMinconf(value: number): WithdrawRequest; + clearUtxosList(): void; + getUtxosList(): Array; + setUtxosList(value: Array): WithdrawRequest; + addUtxos( + value?: cln_primitives_pb.Outpoint, + index?: number, + ): cln_primitives_pb.Outpoint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WithdrawRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: WithdrawRequest, + ): WithdrawRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WithdrawRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WithdrawRequest; + static deserializeBinaryFromReader( + message: WithdrawRequest, + reader: jspb.BinaryReader, + ): WithdrawRequest; +} + +export namespace WithdrawRequest { + export type AsObject = { + destination: string; + satoshi?: cln_primitives_pb.AmountOrAll.AsObject; + feerate?: cln_primitives_pb.Feerate.AsObject; + minconf?: number; + utxosList: Array; + }; +} + +export class WithdrawResponse extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): WithdrawResponse; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): WithdrawResponse; + getPsbt(): string; + setPsbt(value: string): WithdrawResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WithdrawResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: WithdrawResponse, + ): WithdrawResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: WithdrawResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): WithdrawResponse; + static deserializeBinaryFromReader( + message: WithdrawResponse, + reader: jspb.BinaryReader, + ): WithdrawResponse; +} + +export namespace WithdrawResponse { + export type AsObject = { + tx: Uint8Array | string; + txid: Uint8Array | string; + psbt: string; + }; +} + +export class KeysendRequest extends jspb.Message { + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): KeysendRequest; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): KeysendRequest; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): KeysendRequest; + + hasMaxfeepercent(): boolean; + clearMaxfeepercent(): void; + getMaxfeepercent(): number | undefined; + setMaxfeepercent(value: number): KeysendRequest; + + hasRetryFor(): boolean; + clearRetryFor(): void; + getRetryFor(): number | undefined; + setRetryFor(value: number): KeysendRequest; + + hasMaxdelay(): boolean; + clearMaxdelay(): void; + getMaxdelay(): number | undefined; + setMaxdelay(value: number): KeysendRequest; + + hasExemptfee(): boolean; + clearExemptfee(): void; + getExemptfee(): cln_primitives_pb.Amount | undefined; + setExemptfee(value?: cln_primitives_pb.Amount): KeysendRequest; + + hasRoutehints(): boolean; + clearRoutehints(): void; + getRoutehints(): cln_primitives_pb.RoutehintList | undefined; + setRoutehints(value?: cln_primitives_pb.RoutehintList): KeysendRequest; + + hasExtratlvs(): boolean; + clearExtratlvs(): void; + getExtratlvs(): cln_primitives_pb.TlvStream | undefined; + setExtratlvs(value?: cln_primitives_pb.TlvStream): KeysendRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeysendRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: KeysendRequest, + ): KeysendRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: KeysendRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): KeysendRequest; + static deserializeBinaryFromReader( + message: KeysendRequest, + reader: jspb.BinaryReader, + ): KeysendRequest; +} + +export namespace KeysendRequest { + export type AsObject = { + destination: Uint8Array | string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + label?: string; + maxfeepercent?: number; + retryFor?: number; + maxdelay?: number; + exemptfee?: cln_primitives_pb.Amount.AsObject; + routehints?: cln_primitives_pb.RoutehintList.AsObject; + extratlvs?: cln_primitives_pb.TlvStream.AsObject; + }; +} + +export class KeysendResponse extends jspb.Message { + getPaymentPreimage(): Uint8Array | string; + getPaymentPreimage_asU8(): Uint8Array; + getPaymentPreimage_asB64(): string; + setPaymentPreimage(value: Uint8Array | string): KeysendResponse; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): KeysendResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): KeysendResponse; + getCreatedAt(): number; + setCreatedAt(value: number): KeysendResponse; + getParts(): number; + setParts(value: number): KeysendResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): KeysendResponse; + + hasAmountSentMsat(): boolean; + clearAmountSentMsat(): void; + getAmountSentMsat(): cln_primitives_pb.Amount | undefined; + setAmountSentMsat(value?: cln_primitives_pb.Amount): KeysendResponse; + + hasWarningPartialCompletion(): boolean; + clearWarningPartialCompletion(): void; + getWarningPartialCompletion(): string | undefined; + setWarningPartialCompletion(value: string): KeysendResponse; + getStatus(): KeysendResponse.KeysendStatus; + setStatus(value: KeysendResponse.KeysendStatus): KeysendResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeysendResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: KeysendResponse, + ): KeysendResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: KeysendResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): KeysendResponse; + static deserializeBinaryFromReader( + message: KeysendResponse, + reader: jspb.BinaryReader, + ): KeysendResponse; +} + +export namespace KeysendResponse { + export type AsObject = { + paymentPreimage: Uint8Array | string; + destination: Uint8Array | string; + paymentHash: Uint8Array | string; + createdAt: number; + parts: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + amountSentMsat?: cln_primitives_pb.Amount.AsObject; + warningPartialCompletion?: string; + status: KeysendResponse.KeysendStatus; + }; + + export enum KeysendStatus { + COMPLETE = 0, + } +} + +export class FundpsbtRequest extends jspb.Message { + hasSatoshi(): boolean; + clearSatoshi(): void; + getSatoshi(): cln_primitives_pb.AmountOrAll | undefined; + setSatoshi(value?: cln_primitives_pb.AmountOrAll): FundpsbtRequest; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): cln_primitives_pb.Feerate | undefined; + setFeerate(value?: cln_primitives_pb.Feerate): FundpsbtRequest; + getStartweight(): number; + setStartweight(value: number): FundpsbtRequest; + + hasMinconf(): boolean; + clearMinconf(): void; + getMinconf(): number | undefined; + setMinconf(value: number): FundpsbtRequest; + + hasReserve(): boolean; + clearReserve(): void; + getReserve(): number | undefined; + setReserve(value: number): FundpsbtRequest; + + hasLocktime(): boolean; + clearLocktime(): void; + getLocktime(): number | undefined; + setLocktime(value: number): FundpsbtRequest; + + hasMinWitnessWeight(): boolean; + clearMinWitnessWeight(): void; + getMinWitnessWeight(): number | undefined; + setMinWitnessWeight(value: number): FundpsbtRequest; + + hasExcessAsChange(): boolean; + clearExcessAsChange(): void; + getExcessAsChange(): boolean | undefined; + setExcessAsChange(value: boolean): FundpsbtRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundpsbtRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: FundpsbtRequest, + ): FundpsbtRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FundpsbtRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FundpsbtRequest; + static deserializeBinaryFromReader( + message: FundpsbtRequest, + reader: jspb.BinaryReader, + ): FundpsbtRequest; +} + +export namespace FundpsbtRequest { + export type AsObject = { + satoshi?: cln_primitives_pb.AmountOrAll.AsObject; + feerate?: cln_primitives_pb.Feerate.AsObject; + startweight: number; + minconf?: number; + reserve?: number; + locktime?: number; + minWitnessWeight?: number; + excessAsChange?: boolean; + }; +} + +export class FundpsbtResponse extends jspb.Message { + getPsbt(): string; + setPsbt(value: string): FundpsbtResponse; + getFeeratePerKw(): number; + setFeeratePerKw(value: number): FundpsbtResponse; + getEstimatedFinalWeight(): number; + setEstimatedFinalWeight(value: number): FundpsbtResponse; + + hasExcessMsat(): boolean; + clearExcessMsat(): void; + getExcessMsat(): cln_primitives_pb.Amount | undefined; + setExcessMsat(value?: cln_primitives_pb.Amount): FundpsbtResponse; + + hasChangeOutnum(): boolean; + clearChangeOutnum(): void; + getChangeOutnum(): number | undefined; + setChangeOutnum(value: number): FundpsbtResponse; + clearReservationsList(): void; + getReservationsList(): Array; + setReservationsList(value: Array): FundpsbtResponse; + addReservations( + value?: FundpsbtReservations, + index?: number, + ): FundpsbtReservations; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundpsbtResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: FundpsbtResponse, + ): FundpsbtResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FundpsbtResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FundpsbtResponse; + static deserializeBinaryFromReader( + message: FundpsbtResponse, + reader: jspb.BinaryReader, + ): FundpsbtResponse; +} + +export namespace FundpsbtResponse { + export type AsObject = { + psbt: string; + feeratePerKw: number; + estimatedFinalWeight: number; + excessMsat?: cln_primitives_pb.Amount.AsObject; + changeOutnum?: number; + reservationsList: Array; + }; +} + +export class FundpsbtReservations extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): FundpsbtReservations; + getVout(): number; + setVout(value: number): FundpsbtReservations; + getWasReserved(): boolean; + setWasReserved(value: boolean): FundpsbtReservations; + getReserved(): boolean; + setReserved(value: boolean): FundpsbtReservations; + getReservedToBlock(): number; + setReservedToBlock(value: number): FundpsbtReservations; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundpsbtReservations.AsObject; + static toObject( + includeInstance: boolean, + msg: FundpsbtReservations, + ): FundpsbtReservations.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FundpsbtReservations, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FundpsbtReservations; + static deserializeBinaryFromReader( + message: FundpsbtReservations, + reader: jspb.BinaryReader, + ): FundpsbtReservations; +} + +export namespace FundpsbtReservations { + export type AsObject = { + txid: Uint8Array | string; + vout: number; + wasReserved: boolean; + reserved: boolean; + reservedToBlock: number; + }; +} + +export class SendpsbtRequest extends jspb.Message { + getPsbt(): string; + setPsbt(value: string): SendpsbtRequest; + + hasReserve(): boolean; + clearReserve(): void; + getReserve(): boolean | undefined; + setReserve(value: boolean): SendpsbtRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendpsbtRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SendpsbtRequest, + ): SendpsbtRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendpsbtRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendpsbtRequest; + static deserializeBinaryFromReader( + message: SendpsbtRequest, + reader: jspb.BinaryReader, + ): SendpsbtRequest; +} + +export namespace SendpsbtRequest { + export type AsObject = { + psbt: string; + reserve?: boolean; + }; +} + +export class SendpsbtResponse extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): SendpsbtResponse; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): SendpsbtResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendpsbtResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SendpsbtResponse, + ): SendpsbtResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendpsbtResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendpsbtResponse; + static deserializeBinaryFromReader( + message: SendpsbtResponse, + reader: jspb.BinaryReader, + ): SendpsbtResponse; +} + +export namespace SendpsbtResponse { + export type AsObject = { + tx: Uint8Array | string; + txid: Uint8Array | string; + }; +} + +export class SignpsbtRequest extends jspb.Message { + getPsbt(): string; + setPsbt(value: string): SignpsbtRequest; + clearSignonlyList(): void; + getSignonlyList(): Array; + setSignonlyList(value: Array): SignpsbtRequest; + addSignonly(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignpsbtRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SignpsbtRequest, + ): SignpsbtRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SignpsbtRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SignpsbtRequest; + static deserializeBinaryFromReader( + message: SignpsbtRequest, + reader: jspb.BinaryReader, + ): SignpsbtRequest; +} + +export namespace SignpsbtRequest { + export type AsObject = { + psbt: string; + signonlyList: Array; + }; +} + +export class SignpsbtResponse extends jspb.Message { + getSignedPsbt(): string; + setSignedPsbt(value: string): SignpsbtResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignpsbtResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SignpsbtResponse, + ): SignpsbtResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SignpsbtResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SignpsbtResponse; + static deserializeBinaryFromReader( + message: SignpsbtResponse, + reader: jspb.BinaryReader, + ): SignpsbtResponse; +} + +export namespace SignpsbtResponse { + export type AsObject = { + signedPsbt: string; + }; +} + +export class UtxopsbtRequest extends jspb.Message { + hasSatoshi(): boolean; + clearSatoshi(): void; + getSatoshi(): cln_primitives_pb.Amount | undefined; + setSatoshi(value?: cln_primitives_pb.Amount): UtxopsbtRequest; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): cln_primitives_pb.Feerate | undefined; + setFeerate(value?: cln_primitives_pb.Feerate): UtxopsbtRequest; + getStartweight(): number; + setStartweight(value: number): UtxopsbtRequest; + clearUtxosList(): void; + getUtxosList(): Array; + setUtxosList(value: Array): UtxopsbtRequest; + addUtxos( + value?: cln_primitives_pb.Outpoint, + index?: number, + ): cln_primitives_pb.Outpoint; + + hasReserve(): boolean; + clearReserve(): void; + getReserve(): number | undefined; + setReserve(value: number): UtxopsbtRequest; + + hasReservedok(): boolean; + clearReservedok(): void; + getReservedok(): boolean | undefined; + setReservedok(value: boolean): UtxopsbtRequest; + + hasLocktime(): boolean; + clearLocktime(): void; + getLocktime(): number | undefined; + setLocktime(value: number): UtxopsbtRequest; + + hasMinWitnessWeight(): boolean; + clearMinWitnessWeight(): void; + getMinWitnessWeight(): number | undefined; + setMinWitnessWeight(value: number): UtxopsbtRequest; + + hasExcessAsChange(): boolean; + clearExcessAsChange(): void; + getExcessAsChange(): boolean | undefined; + setExcessAsChange(value: boolean): UtxopsbtRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UtxopsbtRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: UtxopsbtRequest, + ): UtxopsbtRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: UtxopsbtRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): UtxopsbtRequest; + static deserializeBinaryFromReader( + message: UtxopsbtRequest, + reader: jspb.BinaryReader, + ): UtxopsbtRequest; +} + +export namespace UtxopsbtRequest { + export type AsObject = { + satoshi?: cln_primitives_pb.Amount.AsObject; + feerate?: cln_primitives_pb.Feerate.AsObject; + startweight: number; + utxosList: Array; + reserve?: number; + reservedok?: boolean; + locktime?: number; + minWitnessWeight?: number; + excessAsChange?: boolean; + }; +} + +export class UtxopsbtResponse extends jspb.Message { + getPsbt(): string; + setPsbt(value: string): UtxopsbtResponse; + getFeeratePerKw(): number; + setFeeratePerKw(value: number): UtxopsbtResponse; + getEstimatedFinalWeight(): number; + setEstimatedFinalWeight(value: number): UtxopsbtResponse; + + hasExcessMsat(): boolean; + clearExcessMsat(): void; + getExcessMsat(): cln_primitives_pb.Amount | undefined; + setExcessMsat(value?: cln_primitives_pb.Amount): UtxopsbtResponse; + + hasChangeOutnum(): boolean; + clearChangeOutnum(): void; + getChangeOutnum(): number | undefined; + setChangeOutnum(value: number): UtxopsbtResponse; + clearReservationsList(): void; + getReservationsList(): Array; + setReservationsList(value: Array): UtxopsbtResponse; + addReservations( + value?: UtxopsbtReservations, + index?: number, + ): UtxopsbtReservations; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UtxopsbtResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: UtxopsbtResponse, + ): UtxopsbtResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: UtxopsbtResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): UtxopsbtResponse; + static deserializeBinaryFromReader( + message: UtxopsbtResponse, + reader: jspb.BinaryReader, + ): UtxopsbtResponse; +} + +export namespace UtxopsbtResponse { + export type AsObject = { + psbt: string; + feeratePerKw: number; + estimatedFinalWeight: number; + excessMsat?: cln_primitives_pb.Amount.AsObject; + changeOutnum?: number; + reservationsList: Array; + }; +} + +export class UtxopsbtReservations extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): UtxopsbtReservations; + getVout(): number; + setVout(value: number): UtxopsbtReservations; + getWasReserved(): boolean; + setWasReserved(value: boolean): UtxopsbtReservations; + getReserved(): boolean; + setReserved(value: boolean): UtxopsbtReservations; + getReservedToBlock(): number; + setReservedToBlock(value: number): UtxopsbtReservations; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UtxopsbtReservations.AsObject; + static toObject( + includeInstance: boolean, + msg: UtxopsbtReservations, + ): UtxopsbtReservations.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: UtxopsbtReservations, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): UtxopsbtReservations; + static deserializeBinaryFromReader( + message: UtxopsbtReservations, + reader: jspb.BinaryReader, + ): UtxopsbtReservations; +} + +export namespace UtxopsbtReservations { + export type AsObject = { + txid: Uint8Array | string; + vout: number; + wasReserved: boolean; + reserved: boolean; + reservedToBlock: number; + }; +} + +export class TxdiscardRequest extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): TxdiscardRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxdiscardRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: TxdiscardRequest, + ): TxdiscardRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TxdiscardRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TxdiscardRequest; + static deserializeBinaryFromReader( + message: TxdiscardRequest, + reader: jspb.BinaryReader, + ): TxdiscardRequest; +} + +export namespace TxdiscardRequest { + export type AsObject = { + txid: Uint8Array | string; + }; +} + +export class TxdiscardResponse extends jspb.Message { + getUnsignedTx(): Uint8Array | string; + getUnsignedTx_asU8(): Uint8Array; + getUnsignedTx_asB64(): string; + setUnsignedTx(value: Uint8Array | string): TxdiscardResponse; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): TxdiscardResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxdiscardResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: TxdiscardResponse, + ): TxdiscardResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TxdiscardResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TxdiscardResponse; + static deserializeBinaryFromReader( + message: TxdiscardResponse, + reader: jspb.BinaryReader, + ): TxdiscardResponse; +} + +export namespace TxdiscardResponse { + export type AsObject = { + unsignedTx: Uint8Array | string; + txid: Uint8Array | string; + }; +} + +export class TxprepareRequest extends jspb.Message { + clearOutputsList(): void; + getOutputsList(): Array; + setOutputsList(value: Array): TxprepareRequest; + addOutputs( + value?: cln_primitives_pb.OutputDesc, + index?: number, + ): cln_primitives_pb.OutputDesc; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): cln_primitives_pb.Feerate | undefined; + setFeerate(value?: cln_primitives_pb.Feerate): TxprepareRequest; + + hasMinconf(): boolean; + clearMinconf(): void; + getMinconf(): number | undefined; + setMinconf(value: number): TxprepareRequest; + clearUtxosList(): void; + getUtxosList(): Array; + setUtxosList(value: Array): TxprepareRequest; + addUtxos( + value?: cln_primitives_pb.Outpoint, + index?: number, + ): cln_primitives_pb.Outpoint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxprepareRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: TxprepareRequest, + ): TxprepareRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TxprepareRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TxprepareRequest; + static deserializeBinaryFromReader( + message: TxprepareRequest, + reader: jspb.BinaryReader, + ): TxprepareRequest; +} + +export namespace TxprepareRequest { + export type AsObject = { + outputsList: Array; + feerate?: cln_primitives_pb.Feerate.AsObject; + minconf?: number; + utxosList: Array; + }; +} + +export class TxprepareResponse extends jspb.Message { + getPsbt(): string; + setPsbt(value: string): TxprepareResponse; + getUnsignedTx(): Uint8Array | string; + getUnsignedTx_asU8(): Uint8Array; + getUnsignedTx_asB64(): string; + setUnsignedTx(value: Uint8Array | string): TxprepareResponse; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): TxprepareResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxprepareResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: TxprepareResponse, + ): TxprepareResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TxprepareResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TxprepareResponse; + static deserializeBinaryFromReader( + message: TxprepareResponse, + reader: jspb.BinaryReader, + ): TxprepareResponse; +} + +export namespace TxprepareResponse { + export type AsObject = { + psbt: string; + unsignedTx: Uint8Array | string; + txid: Uint8Array | string; + }; +} + +export class TxsendRequest extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): TxsendRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxsendRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: TxsendRequest, + ): TxsendRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TxsendRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TxsendRequest; + static deserializeBinaryFromReader( + message: TxsendRequest, + reader: jspb.BinaryReader, + ): TxsendRequest; +} + +export namespace TxsendRequest { + export type AsObject = { + txid: Uint8Array | string; + }; +} + +export class TxsendResponse extends jspb.Message { + getPsbt(): string; + setPsbt(value: string): TxsendResponse; + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): TxsendResponse; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): TxsendResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TxsendResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: TxsendResponse, + ): TxsendResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TxsendResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TxsendResponse; + static deserializeBinaryFromReader( + message: TxsendResponse, + reader: jspb.BinaryReader, + ): TxsendResponse; +} + +export namespace TxsendResponse { + export type AsObject = { + psbt: string; + tx: Uint8Array | string; + txid: Uint8Array | string; + }; +} + +export class ListpeerchannelsRequest extends jspb.Message { + hasId(): boolean; + clearId(): void; + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): ListpeerchannelsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsRequest, + ): ListpeerchannelsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsRequest; + static deserializeBinaryFromReader( + message: ListpeerchannelsRequest, + reader: jspb.BinaryReader, + ): ListpeerchannelsRequest; +} + +export namespace ListpeerchannelsRequest { + export type AsObject = { + id: Uint8Array | string; + }; +} + +export class ListpeerchannelsResponse extends jspb.Message { + clearChannelsList(): void; + getChannelsList(): Array; + setChannelsList( + value: Array, + ): ListpeerchannelsResponse; + addChannels( + value?: ListpeerchannelsChannels, + index?: number, + ): ListpeerchannelsChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsResponse, + ): ListpeerchannelsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsResponse; + static deserializeBinaryFromReader( + message: ListpeerchannelsResponse, + reader: jspb.BinaryReader, + ): ListpeerchannelsResponse; +} + +export namespace ListpeerchannelsResponse { + export type AsObject = { + channelsList: Array; + }; +} + +export class ListpeerchannelsChannels extends jspb.Message { + hasPeerId(): boolean; + clearPeerId(): void; + getPeerId(): Uint8Array | string; + getPeerId_asU8(): Uint8Array; + getPeerId_asB64(): string; + setPeerId(value: Uint8Array | string): ListpeerchannelsChannels; + + hasPeerConnected(): boolean; + clearPeerConnected(): void; + getPeerConnected(): boolean | undefined; + setPeerConnected(value: boolean): ListpeerchannelsChannels; + + hasState(): boolean; + clearState(): void; + getState(): + | ListpeerchannelsChannels.ListpeerchannelsChannelsState + | undefined; + setState( + value: ListpeerchannelsChannels.ListpeerchannelsChannelsState, + ): ListpeerchannelsChannels; + + hasScratchTxid(): boolean; + clearScratchTxid(): void; + getScratchTxid(): Uint8Array | string; + getScratchTxid_asU8(): Uint8Array; + getScratchTxid_asB64(): string; + setScratchTxid(value: Uint8Array | string): ListpeerchannelsChannels; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): ListpeerchannelsChannelsFeerate | undefined; + setFeerate(value?: ListpeerchannelsChannelsFeerate): ListpeerchannelsChannels; + + hasOwner(): boolean; + clearOwner(): void; + getOwner(): string | undefined; + setOwner(value: string): ListpeerchannelsChannels; + + hasShortChannelId(): boolean; + clearShortChannelId(): void; + getShortChannelId(): string | undefined; + setShortChannelId(value: string): ListpeerchannelsChannels; + + hasChannelId(): boolean; + clearChannelId(): void; + getChannelId(): Uint8Array | string; + getChannelId_asU8(): Uint8Array; + getChannelId_asB64(): string; + setChannelId(value: Uint8Array | string): ListpeerchannelsChannels; + + hasFundingTxid(): boolean; + clearFundingTxid(): void; + getFundingTxid(): Uint8Array | string; + getFundingTxid_asU8(): Uint8Array; + getFundingTxid_asB64(): string; + setFundingTxid(value: Uint8Array | string): ListpeerchannelsChannels; + + hasFundingOutnum(): boolean; + clearFundingOutnum(): void; + getFundingOutnum(): number | undefined; + setFundingOutnum(value: number): ListpeerchannelsChannels; + + hasInitialFeerate(): boolean; + clearInitialFeerate(): void; + getInitialFeerate(): string | undefined; + setInitialFeerate(value: string): ListpeerchannelsChannels; + + hasLastFeerate(): boolean; + clearLastFeerate(): void; + getLastFeerate(): string | undefined; + setLastFeerate(value: string): ListpeerchannelsChannels; + + hasNextFeerate(): boolean; + clearNextFeerate(): void; + getNextFeerate(): string | undefined; + setNextFeerate(value: string): ListpeerchannelsChannels; + + hasNextFeeStep(): boolean; + clearNextFeeStep(): void; + getNextFeeStep(): number | undefined; + setNextFeeStep(value: number): ListpeerchannelsChannels; + clearInflightList(): void; + getInflightList(): Array; + setInflightList( + value: Array, + ): ListpeerchannelsChannels; + addInflight( + value?: ListpeerchannelsChannelsInflight, + index?: number, + ): ListpeerchannelsChannelsInflight; + + hasCloseTo(): boolean; + clearCloseTo(): void; + getCloseTo(): Uint8Array | string; + getCloseTo_asU8(): Uint8Array; + getCloseTo_asB64(): string; + setCloseTo(value: Uint8Array | string): ListpeerchannelsChannels; + + hasPrivate(): boolean; + clearPrivate(): void; + getPrivate(): boolean | undefined; + setPrivate(value: boolean): ListpeerchannelsChannels; + + hasOpener(): boolean; + clearOpener(): void; + getOpener(): cln_primitives_pb.ChannelSide | undefined; + setOpener(value: cln_primitives_pb.ChannelSide): ListpeerchannelsChannels; + + hasCloser(): boolean; + clearCloser(): void; + getCloser(): cln_primitives_pb.ChannelSide | undefined; + setCloser(value: cln_primitives_pb.ChannelSide): ListpeerchannelsChannels; + + hasFunding(): boolean; + clearFunding(): void; + getFunding(): ListpeerchannelsChannelsFunding | undefined; + setFunding(value?: ListpeerchannelsChannelsFunding): ListpeerchannelsChannels; + + hasToUsMsat(): boolean; + clearToUsMsat(): void; + getToUsMsat(): cln_primitives_pb.Amount | undefined; + setToUsMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasMinToUsMsat(): boolean; + clearMinToUsMsat(): void; + getMinToUsMsat(): cln_primitives_pb.Amount | undefined; + setMinToUsMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasMaxToUsMsat(): boolean; + clearMaxToUsMsat(): void; + getMaxToUsMsat(): cln_primitives_pb.Amount | undefined; + setMaxToUsMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasTotalMsat(): boolean; + clearTotalMsat(): void; + getTotalMsat(): cln_primitives_pb.Amount | undefined; + setTotalMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasFeeBaseMsat(): boolean; + clearFeeBaseMsat(): void; + getFeeBaseMsat(): cln_primitives_pb.Amount | undefined; + setFeeBaseMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasFeeProportionalMillionths(): boolean; + clearFeeProportionalMillionths(): void; + getFeeProportionalMillionths(): number | undefined; + setFeeProportionalMillionths(value: number): ListpeerchannelsChannels; + + hasDustLimitMsat(): boolean; + clearDustLimitMsat(): void; + getDustLimitMsat(): cln_primitives_pb.Amount | undefined; + setDustLimitMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasMaxTotalHtlcInMsat(): boolean; + clearMaxTotalHtlcInMsat(): void; + getMaxTotalHtlcInMsat(): cln_primitives_pb.Amount | undefined; + setMaxTotalHtlcInMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + + hasTheirReserveMsat(): boolean; + clearTheirReserveMsat(): void; + getTheirReserveMsat(): cln_primitives_pb.Amount | undefined; + setTheirReserveMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + + hasOurReserveMsat(): boolean; + clearOurReserveMsat(): void; + getOurReserveMsat(): cln_primitives_pb.Amount | undefined; + setOurReserveMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasSpendableMsat(): boolean; + clearSpendableMsat(): void; + getSpendableMsat(): cln_primitives_pb.Amount | undefined; + setSpendableMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasReceivableMsat(): boolean; + clearReceivableMsat(): void; + getReceivableMsat(): cln_primitives_pb.Amount | undefined; + setReceivableMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasMinimumHtlcInMsat(): boolean; + clearMinimumHtlcInMsat(): void; + getMinimumHtlcInMsat(): cln_primitives_pb.Amount | undefined; + setMinimumHtlcInMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + + hasMinimumHtlcOutMsat(): boolean; + clearMinimumHtlcOutMsat(): void; + getMinimumHtlcOutMsat(): cln_primitives_pb.Amount | undefined; + setMinimumHtlcOutMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + + hasMaximumHtlcOutMsat(): boolean; + clearMaximumHtlcOutMsat(): void; + getMaximumHtlcOutMsat(): cln_primitives_pb.Amount | undefined; + setMaximumHtlcOutMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + + hasTheirToSelfDelay(): boolean; + clearTheirToSelfDelay(): void; + getTheirToSelfDelay(): number | undefined; + setTheirToSelfDelay(value: number): ListpeerchannelsChannels; + + hasOurToSelfDelay(): boolean; + clearOurToSelfDelay(): void; + getOurToSelfDelay(): number | undefined; + setOurToSelfDelay(value: number): ListpeerchannelsChannels; + + hasMaxAcceptedHtlcs(): boolean; + clearMaxAcceptedHtlcs(): void; + getMaxAcceptedHtlcs(): number | undefined; + setMaxAcceptedHtlcs(value: number): ListpeerchannelsChannels; + + hasAlias(): boolean; + clearAlias(): void; + getAlias(): ListpeerchannelsChannelsAlias | undefined; + setAlias(value?: ListpeerchannelsChannelsAlias): ListpeerchannelsChannels; + clearStatusList(): void; + getStatusList(): Array; + setStatusList(value: Array): ListpeerchannelsChannels; + addStatus(value: string, index?: number): string; + + hasInPaymentsOffered(): boolean; + clearInPaymentsOffered(): void; + getInPaymentsOffered(): number | undefined; + setInPaymentsOffered(value: number): ListpeerchannelsChannels; + + hasInOfferedMsat(): boolean; + clearInOfferedMsat(): void; + getInOfferedMsat(): cln_primitives_pb.Amount | undefined; + setInOfferedMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasInPaymentsFulfilled(): boolean; + clearInPaymentsFulfilled(): void; + getInPaymentsFulfilled(): number | undefined; + setInPaymentsFulfilled(value: number): ListpeerchannelsChannels; + + hasInFulfilledMsat(): boolean; + clearInFulfilledMsat(): void; + getInFulfilledMsat(): cln_primitives_pb.Amount | undefined; + setInFulfilledMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + + hasOutPaymentsOffered(): boolean; + clearOutPaymentsOffered(): void; + getOutPaymentsOffered(): number | undefined; + setOutPaymentsOffered(value: number): ListpeerchannelsChannels; + + hasOutOfferedMsat(): boolean; + clearOutOfferedMsat(): void; + getOutOfferedMsat(): cln_primitives_pb.Amount | undefined; + setOutOfferedMsat(value?: cln_primitives_pb.Amount): ListpeerchannelsChannels; + + hasOutPaymentsFulfilled(): boolean; + clearOutPaymentsFulfilled(): void; + getOutPaymentsFulfilled(): number | undefined; + setOutPaymentsFulfilled(value: number): ListpeerchannelsChannels; + + hasOutFulfilledMsat(): boolean; + clearOutFulfilledMsat(): void; + getOutFulfilledMsat(): cln_primitives_pb.Amount | undefined; + setOutFulfilledMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannels; + clearHtlcsList(): void; + getHtlcsList(): Array; + setHtlcsList( + value: Array, + ): ListpeerchannelsChannels; + addHtlcs( + value?: ListpeerchannelsChannelsHtlcs, + index?: number, + ): ListpeerchannelsChannelsHtlcs; + + hasCloseToAddr(): boolean; + clearCloseToAddr(): void; + getCloseToAddr(): string | undefined; + setCloseToAddr(value: string): ListpeerchannelsChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsChannels.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsChannels, + ): ListpeerchannelsChannels.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsChannels, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsChannels; + static deserializeBinaryFromReader( + message: ListpeerchannelsChannels, + reader: jspb.BinaryReader, + ): ListpeerchannelsChannels; +} + +export namespace ListpeerchannelsChannels { + export type AsObject = { + peerId: Uint8Array | string; + peerConnected?: boolean; + state?: ListpeerchannelsChannels.ListpeerchannelsChannelsState; + scratchTxid: Uint8Array | string; + feerate?: ListpeerchannelsChannelsFeerate.AsObject; + owner?: string; + shortChannelId?: string; + channelId: Uint8Array | string; + fundingTxid: Uint8Array | string; + fundingOutnum?: number; + initialFeerate?: string; + lastFeerate?: string; + nextFeerate?: string; + nextFeeStep?: number; + inflightList: Array; + closeTo: Uint8Array | string; + pb_private?: boolean; + opener?: cln_primitives_pb.ChannelSide; + closer?: cln_primitives_pb.ChannelSide; + funding?: ListpeerchannelsChannelsFunding.AsObject; + toUsMsat?: cln_primitives_pb.Amount.AsObject; + minToUsMsat?: cln_primitives_pb.Amount.AsObject; + maxToUsMsat?: cln_primitives_pb.Amount.AsObject; + totalMsat?: cln_primitives_pb.Amount.AsObject; + feeBaseMsat?: cln_primitives_pb.Amount.AsObject; + feeProportionalMillionths?: number; + dustLimitMsat?: cln_primitives_pb.Amount.AsObject; + maxTotalHtlcInMsat?: cln_primitives_pb.Amount.AsObject; + theirReserveMsat?: cln_primitives_pb.Amount.AsObject; + ourReserveMsat?: cln_primitives_pb.Amount.AsObject; + spendableMsat?: cln_primitives_pb.Amount.AsObject; + receivableMsat?: cln_primitives_pb.Amount.AsObject; + minimumHtlcInMsat?: cln_primitives_pb.Amount.AsObject; + minimumHtlcOutMsat?: cln_primitives_pb.Amount.AsObject; + maximumHtlcOutMsat?: cln_primitives_pb.Amount.AsObject; + theirToSelfDelay?: number; + ourToSelfDelay?: number; + maxAcceptedHtlcs?: number; + alias?: ListpeerchannelsChannelsAlias.AsObject; + statusList: Array; + inPaymentsOffered?: number; + inOfferedMsat?: cln_primitives_pb.Amount.AsObject; + inPaymentsFulfilled?: number; + inFulfilledMsat?: cln_primitives_pb.Amount.AsObject; + outPaymentsOffered?: number; + outOfferedMsat?: cln_primitives_pb.Amount.AsObject; + outPaymentsFulfilled?: number; + outFulfilledMsat?: cln_primitives_pb.Amount.AsObject; + htlcsList: Array; + closeToAddr?: string; + }; + + export enum ListpeerchannelsChannelsState { + OPENINGD = 0, + CHANNELD_AWAITING_LOCKIN = 1, + CHANNELD_NORMAL = 2, + CHANNELD_SHUTTING_DOWN = 3, + CLOSINGD_SIGEXCHANGE = 4, + CLOSINGD_COMPLETE = 5, + AWAITING_UNILATERAL = 6, + FUNDING_SPEND_SEEN = 7, + ONCHAIN = 8, + DUALOPEND_OPEN_INIT = 9, + DUALOPEND_AWAITING_LOCKIN = 10, + } +} + +export class ListpeerchannelsChannelsFeerate extends jspb.Message { + hasPerkw(): boolean; + clearPerkw(): void; + getPerkw(): number | undefined; + setPerkw(value: number): ListpeerchannelsChannelsFeerate; + + hasPerkb(): boolean; + clearPerkb(): void; + getPerkb(): number | undefined; + setPerkb(value: number): ListpeerchannelsChannelsFeerate; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsChannelsFeerate.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsChannelsFeerate, + ): ListpeerchannelsChannelsFeerate.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsChannelsFeerate, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsChannelsFeerate; + static deserializeBinaryFromReader( + message: ListpeerchannelsChannelsFeerate, + reader: jspb.BinaryReader, + ): ListpeerchannelsChannelsFeerate; +} + +export namespace ListpeerchannelsChannelsFeerate { + export type AsObject = { + perkw?: number; + perkb?: number; + }; +} + +export class ListpeerchannelsChannelsInflight extends jspb.Message { + hasFundingTxid(): boolean; + clearFundingTxid(): void; + getFundingTxid(): Uint8Array | string; + getFundingTxid_asU8(): Uint8Array; + getFundingTxid_asB64(): string; + setFundingTxid(value: Uint8Array | string): ListpeerchannelsChannelsInflight; + + hasFundingOutnum(): boolean; + clearFundingOutnum(): void; + getFundingOutnum(): number | undefined; + setFundingOutnum(value: number): ListpeerchannelsChannelsInflight; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): string | undefined; + setFeerate(value: string): ListpeerchannelsChannelsInflight; + + hasTotalFundingMsat(): boolean; + clearTotalFundingMsat(): void; + getTotalFundingMsat(): cln_primitives_pb.Amount | undefined; + setTotalFundingMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsInflight; + + hasOurFundingMsat(): boolean; + clearOurFundingMsat(): void; + getOurFundingMsat(): cln_primitives_pb.Amount | undefined; + setOurFundingMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsInflight; + + hasScratchTxid(): boolean; + clearScratchTxid(): void; + getScratchTxid(): Uint8Array | string; + getScratchTxid_asU8(): Uint8Array; + getScratchTxid_asB64(): string; + setScratchTxid(value: Uint8Array | string): ListpeerchannelsChannelsInflight; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean, + ): ListpeerchannelsChannelsInflight.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsChannelsInflight, + ): ListpeerchannelsChannelsInflight.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsChannelsInflight, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsChannelsInflight; + static deserializeBinaryFromReader( + message: ListpeerchannelsChannelsInflight, + reader: jspb.BinaryReader, + ): ListpeerchannelsChannelsInflight; +} + +export namespace ListpeerchannelsChannelsInflight { + export type AsObject = { + fundingTxid: Uint8Array | string; + fundingOutnum?: number; + feerate?: string; + totalFundingMsat?: cln_primitives_pb.Amount.AsObject; + ourFundingMsat?: cln_primitives_pb.Amount.AsObject; + scratchTxid: Uint8Array | string; + }; +} + +export class ListpeerchannelsChannelsFunding extends jspb.Message { + hasPushedMsat(): boolean; + clearPushedMsat(): void; + getPushedMsat(): cln_primitives_pb.Amount | undefined; + setPushedMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsFunding; + + hasLocalFundsMsat(): boolean; + clearLocalFundsMsat(): void; + getLocalFundsMsat(): cln_primitives_pb.Amount | undefined; + setLocalFundsMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsFunding; + + hasRemoteFundsMsat(): boolean; + clearRemoteFundsMsat(): void; + getRemoteFundsMsat(): cln_primitives_pb.Amount | undefined; + setRemoteFundsMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsFunding; + + hasFeePaidMsat(): boolean; + clearFeePaidMsat(): void; + getFeePaidMsat(): cln_primitives_pb.Amount | undefined; + setFeePaidMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsFunding; + + hasFeeRcvdMsat(): boolean; + clearFeeRcvdMsat(): void; + getFeeRcvdMsat(): cln_primitives_pb.Amount | undefined; + setFeeRcvdMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsFunding; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsChannelsFunding.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsChannelsFunding, + ): ListpeerchannelsChannelsFunding.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsChannelsFunding, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsChannelsFunding; + static deserializeBinaryFromReader( + message: ListpeerchannelsChannelsFunding, + reader: jspb.BinaryReader, + ): ListpeerchannelsChannelsFunding; +} + +export namespace ListpeerchannelsChannelsFunding { + export type AsObject = { + pushedMsat?: cln_primitives_pb.Amount.AsObject; + localFundsMsat?: cln_primitives_pb.Amount.AsObject; + remoteFundsMsat?: cln_primitives_pb.Amount.AsObject; + feePaidMsat?: cln_primitives_pb.Amount.AsObject; + feeRcvdMsat?: cln_primitives_pb.Amount.AsObject; + }; +} + +export class ListpeerchannelsChannelsAlias extends jspb.Message { + hasLocal(): boolean; + clearLocal(): void; + getLocal(): string | undefined; + setLocal(value: string): ListpeerchannelsChannelsAlias; + + hasRemote(): boolean; + clearRemote(): void; + getRemote(): string | undefined; + setRemote(value: string): ListpeerchannelsChannelsAlias; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsChannelsAlias.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsChannelsAlias, + ): ListpeerchannelsChannelsAlias.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsChannelsAlias, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsChannelsAlias; + static deserializeBinaryFromReader( + message: ListpeerchannelsChannelsAlias, + reader: jspb.BinaryReader, + ): ListpeerchannelsChannelsAlias; +} + +export namespace ListpeerchannelsChannelsAlias { + export type AsObject = { + local?: string; + remote?: string; + }; +} + +export class ListpeerchannelsChannelsHtlcs extends jspb.Message { + hasDirection(): boolean; + clearDirection(): void; + getDirection(): + | ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection + | undefined; + setDirection( + value: ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection, + ): ListpeerchannelsChannelsHtlcs; + + hasId(): boolean; + clearId(): void; + getId(): number | undefined; + setId(value: number): ListpeerchannelsChannelsHtlcs; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat( + value?: cln_primitives_pb.Amount, + ): ListpeerchannelsChannelsHtlcs; + + hasExpiry(): boolean; + clearExpiry(): void; + getExpiry(): number | undefined; + setExpiry(value: number): ListpeerchannelsChannelsHtlcs; + + hasPaymentHash(): boolean; + clearPaymentHash(): void; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListpeerchannelsChannelsHtlcs; + + hasLocalTrimmed(): boolean; + clearLocalTrimmed(): void; + getLocalTrimmed(): boolean | undefined; + setLocalTrimmed(value: boolean): ListpeerchannelsChannelsHtlcs; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): string | undefined; + setStatus(value: string): ListpeerchannelsChannelsHtlcs; + + hasState(): boolean; + clearState(): void; + getState(): cln_primitives_pb.HtlcState | undefined; + setState(value: cln_primitives_pb.HtlcState): ListpeerchannelsChannelsHtlcs; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpeerchannelsChannelsHtlcs.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpeerchannelsChannelsHtlcs, + ): ListpeerchannelsChannelsHtlcs.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpeerchannelsChannelsHtlcs, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpeerchannelsChannelsHtlcs; + static deserializeBinaryFromReader( + message: ListpeerchannelsChannelsHtlcs, + reader: jspb.BinaryReader, + ): ListpeerchannelsChannelsHtlcs; +} + +export namespace ListpeerchannelsChannelsHtlcs { + export type AsObject = { + direction?: ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection; + id?: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + expiry?: number; + paymentHash: Uint8Array | string; + localTrimmed?: boolean; + status?: string; + state?: cln_primitives_pb.HtlcState; + }; + + export enum ListpeerchannelsChannelsHtlcsDirection { + IN = 0, + OUT = 1, + } +} + +export class ListclosedchannelsRequest extends jspb.Message { + hasId(): boolean; + clearId(): void; + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): ListclosedchannelsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListclosedchannelsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListclosedchannelsRequest, + ): ListclosedchannelsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListclosedchannelsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListclosedchannelsRequest; + static deserializeBinaryFromReader( + message: ListclosedchannelsRequest, + reader: jspb.BinaryReader, + ): ListclosedchannelsRequest; +} + +export namespace ListclosedchannelsRequest { + export type AsObject = { + id: Uint8Array | string; + }; +} + +export class ListclosedchannelsResponse extends jspb.Message { + clearClosedchannelsList(): void; + getClosedchannelsList(): Array; + setClosedchannelsList( + value: Array, + ): ListclosedchannelsResponse; + addClosedchannels( + value?: ListclosedchannelsClosedchannels, + index?: number, + ): ListclosedchannelsClosedchannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListclosedchannelsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListclosedchannelsResponse, + ): ListclosedchannelsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListclosedchannelsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListclosedchannelsResponse; + static deserializeBinaryFromReader( + message: ListclosedchannelsResponse, + reader: jspb.BinaryReader, + ): ListclosedchannelsResponse; +} + +export namespace ListclosedchannelsResponse { + export type AsObject = { + closedchannelsList: Array; + }; +} + +export class ListclosedchannelsClosedchannels extends jspb.Message { + hasPeerId(): boolean; + clearPeerId(): void; + getPeerId(): Uint8Array | string; + getPeerId_asU8(): Uint8Array; + getPeerId_asB64(): string; + setPeerId(value: Uint8Array | string): ListclosedchannelsClosedchannels; + getChannelId(): Uint8Array | string; + getChannelId_asU8(): Uint8Array; + getChannelId_asB64(): string; + setChannelId(value: Uint8Array | string): ListclosedchannelsClosedchannels; + + hasShortChannelId(): boolean; + clearShortChannelId(): void; + getShortChannelId(): string | undefined; + setShortChannelId(value: string): ListclosedchannelsClosedchannels; + + hasAlias(): boolean; + clearAlias(): void; + getAlias(): ListclosedchannelsClosedchannelsAlias | undefined; + setAlias( + value?: ListclosedchannelsClosedchannelsAlias, + ): ListclosedchannelsClosedchannels; + getOpener(): cln_primitives_pb.ChannelSide; + setOpener( + value: cln_primitives_pb.ChannelSide, + ): ListclosedchannelsClosedchannels; + + hasCloser(): boolean; + clearCloser(): void; + getCloser(): cln_primitives_pb.ChannelSide | undefined; + setCloser( + value: cln_primitives_pb.ChannelSide, + ): ListclosedchannelsClosedchannels; + getPrivate(): boolean; + setPrivate(value: boolean): ListclosedchannelsClosedchannels; + getTotalLocalCommitments(): number; + setTotalLocalCommitments(value: number): ListclosedchannelsClosedchannels; + getTotalRemoteCommitments(): number; + setTotalRemoteCommitments(value: number): ListclosedchannelsClosedchannels; + getTotalHtlcsSent(): number; + setTotalHtlcsSent(value: number): ListclosedchannelsClosedchannels; + getFundingTxid(): Uint8Array | string; + getFundingTxid_asU8(): Uint8Array; + getFundingTxid_asB64(): string; + setFundingTxid(value: Uint8Array | string): ListclosedchannelsClosedchannels; + getFundingOutnum(): number; + setFundingOutnum(value: number): ListclosedchannelsClosedchannels; + getLeased(): boolean; + setLeased(value: boolean): ListclosedchannelsClosedchannels; + + hasFundingFeePaidMsat(): boolean; + clearFundingFeePaidMsat(): void; + getFundingFeePaidMsat(): cln_primitives_pb.Amount | undefined; + setFundingFeePaidMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasFundingFeeRcvdMsat(): boolean; + clearFundingFeeRcvdMsat(): void; + getFundingFeeRcvdMsat(): cln_primitives_pb.Amount | undefined; + setFundingFeeRcvdMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasFundingPushedMsat(): boolean; + clearFundingPushedMsat(): void; + getFundingPushedMsat(): cln_primitives_pb.Amount | undefined; + setFundingPushedMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasTotalMsat(): boolean; + clearTotalMsat(): void; + getTotalMsat(): cln_primitives_pb.Amount | undefined; + setTotalMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasFinalToUsMsat(): boolean; + clearFinalToUsMsat(): void; + getFinalToUsMsat(): cln_primitives_pb.Amount | undefined; + setFinalToUsMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasMinToUsMsat(): boolean; + clearMinToUsMsat(): void; + getMinToUsMsat(): cln_primitives_pb.Amount | undefined; + setMinToUsMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasMaxToUsMsat(): boolean; + clearMaxToUsMsat(): void; + getMaxToUsMsat(): cln_primitives_pb.Amount | undefined; + setMaxToUsMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + + hasLastCommitmentTxid(): boolean; + clearLastCommitmentTxid(): void; + getLastCommitmentTxid(): Uint8Array | string; + getLastCommitmentTxid_asU8(): Uint8Array; + getLastCommitmentTxid_asB64(): string; + setLastCommitmentTxid( + value: Uint8Array | string, + ): ListclosedchannelsClosedchannels; + + hasLastCommitmentFeeMsat(): boolean; + clearLastCommitmentFeeMsat(): void; + getLastCommitmentFeeMsat(): cln_primitives_pb.Amount | undefined; + setLastCommitmentFeeMsat( + value?: cln_primitives_pb.Amount, + ): ListclosedchannelsClosedchannels; + getCloseCause(): ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause; + setCloseCause( + value: ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause, + ): ListclosedchannelsClosedchannels; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean, + ): ListclosedchannelsClosedchannels.AsObject; + static toObject( + includeInstance: boolean, + msg: ListclosedchannelsClosedchannels, + ): ListclosedchannelsClosedchannels.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListclosedchannelsClosedchannels, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListclosedchannelsClosedchannels; + static deserializeBinaryFromReader( + message: ListclosedchannelsClosedchannels, + reader: jspb.BinaryReader, + ): ListclosedchannelsClosedchannels; +} + +export namespace ListclosedchannelsClosedchannels { + export type AsObject = { + peerId: Uint8Array | string; + channelId: Uint8Array | string; + shortChannelId?: string; + alias?: ListclosedchannelsClosedchannelsAlias.AsObject; + opener: cln_primitives_pb.ChannelSide; + closer?: cln_primitives_pb.ChannelSide; + pb_private: boolean; + totalLocalCommitments: number; + totalRemoteCommitments: number; + totalHtlcsSent: number; + fundingTxid: Uint8Array | string; + fundingOutnum: number; + leased: boolean; + fundingFeePaidMsat?: cln_primitives_pb.Amount.AsObject; + fundingFeeRcvdMsat?: cln_primitives_pb.Amount.AsObject; + fundingPushedMsat?: cln_primitives_pb.Amount.AsObject; + totalMsat?: cln_primitives_pb.Amount.AsObject; + finalToUsMsat?: cln_primitives_pb.Amount.AsObject; + minToUsMsat?: cln_primitives_pb.Amount.AsObject; + maxToUsMsat?: cln_primitives_pb.Amount.AsObject; + lastCommitmentTxid: Uint8Array | string; + lastCommitmentFeeMsat?: cln_primitives_pb.Amount.AsObject; + closeCause: ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause; + }; + + export enum ListclosedchannelsClosedchannelsClose_cause { + UNKNOWN = 0, + LOCAL = 1, + USER = 2, + REMOTE = 3, + PROTOCOL = 4, + ONCHAIN = 5, + } +} + +export class ListclosedchannelsClosedchannelsAlias extends jspb.Message { + hasLocal(): boolean; + clearLocal(): void; + getLocal(): string | undefined; + setLocal(value: string): ListclosedchannelsClosedchannelsAlias; + + hasRemote(): boolean; + clearRemote(): void; + getRemote(): string | undefined; + setRemote(value: string): ListclosedchannelsClosedchannelsAlias; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean, + ): ListclosedchannelsClosedchannelsAlias.AsObject; + static toObject( + includeInstance: boolean, + msg: ListclosedchannelsClosedchannelsAlias, + ): ListclosedchannelsClosedchannelsAlias.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListclosedchannelsClosedchannelsAlias, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary( + bytes: Uint8Array, + ): ListclosedchannelsClosedchannelsAlias; + static deserializeBinaryFromReader( + message: ListclosedchannelsClosedchannelsAlias, + reader: jspb.BinaryReader, + ): ListclosedchannelsClosedchannelsAlias; +} + +export namespace ListclosedchannelsClosedchannelsAlias { + export type AsObject = { + local?: string; + remote?: string; + }; +} + +export class DecodepayRequest extends jspb.Message { + getBolt11(): string; + setBolt11(value: string): DecodepayRequest; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): DecodepayRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodepayRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodepayRequest, + ): DecodepayRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodepayRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodepayRequest; + static deserializeBinaryFromReader( + message: DecodepayRequest, + reader: jspb.BinaryReader, + ): DecodepayRequest; +} + +export namespace DecodepayRequest { + export type AsObject = { + bolt11: string; + description?: string; + }; +} + +export class DecodepayResponse extends jspb.Message { + getCurrency(): string; + setCurrency(value: string): DecodepayResponse; + getCreatedAt(): number; + setCreatedAt(value: number): DecodepayResponse; + getExpiry(): number; + setExpiry(value: number): DecodepayResponse; + getPayee(): Uint8Array | string; + getPayee_asU8(): Uint8Array; + getPayee_asB64(): string; + setPayee(value: Uint8Array | string): DecodepayResponse; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): DecodepayResponse; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): DecodepayResponse; + getSignature(): string; + setSignature(value: string): DecodepayResponse; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): DecodepayResponse; + + hasDescriptionHash(): boolean; + clearDescriptionHash(): void; + getDescriptionHash(): Uint8Array | string; + getDescriptionHash_asU8(): Uint8Array; + getDescriptionHash_asB64(): string; + setDescriptionHash(value: Uint8Array | string): DecodepayResponse; + getMinFinalCltvExpiry(): number; + setMinFinalCltvExpiry(value: number): DecodepayResponse; + + hasPaymentSecret(): boolean; + clearPaymentSecret(): void; + getPaymentSecret(): Uint8Array | string; + getPaymentSecret_asU8(): Uint8Array; + getPaymentSecret_asB64(): string; + setPaymentSecret(value: Uint8Array | string): DecodepayResponse; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): Uint8Array | string; + getFeatures_asU8(): Uint8Array; + getFeatures_asB64(): string; + setFeatures(value: Uint8Array | string): DecodepayResponse; + + hasPaymentMetadata(): boolean; + clearPaymentMetadata(): void; + getPaymentMetadata(): Uint8Array | string; + getPaymentMetadata_asU8(): Uint8Array; + getPaymentMetadata_asB64(): string; + setPaymentMetadata(value: Uint8Array | string): DecodepayResponse; + clearFallbacksList(): void; + getFallbacksList(): Array; + setFallbacksList(value: Array): DecodepayResponse; + addFallbacks(value?: DecodepayFallbacks, index?: number): DecodepayFallbacks; + clearExtraList(): void; + getExtraList(): Array; + setExtraList(value: Array): DecodepayResponse; + addExtra(value?: DecodepayExtra, index?: number): DecodepayExtra; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodepayResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodepayResponse, + ): DecodepayResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodepayResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodepayResponse; + static deserializeBinaryFromReader( + message: DecodepayResponse, + reader: jspb.BinaryReader, + ): DecodepayResponse; +} + +export namespace DecodepayResponse { + export type AsObject = { + currency: string; + createdAt: number; + expiry: number; + payee: Uint8Array | string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + paymentHash: Uint8Array | string; + signature: string; + description?: string; + descriptionHash: Uint8Array | string; + minFinalCltvExpiry: number; + paymentSecret: Uint8Array | string; + features: Uint8Array | string; + paymentMetadata: Uint8Array | string; + fallbacksList: Array; + extraList: Array; + }; +} + +export class DecodepayFallbacks extends jspb.Message { + getItemType(): DecodepayFallbacks.DecodepayFallbacksType; + setItemType( + value: DecodepayFallbacks.DecodepayFallbacksType, + ): DecodepayFallbacks; + + hasAddr(): boolean; + clearAddr(): void; + getAddr(): string | undefined; + setAddr(value: string): DecodepayFallbacks; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): DecodepayFallbacks; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodepayFallbacks.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodepayFallbacks, + ): DecodepayFallbacks.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodepayFallbacks, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodepayFallbacks; + static deserializeBinaryFromReader( + message: DecodepayFallbacks, + reader: jspb.BinaryReader, + ): DecodepayFallbacks; +} + +export namespace DecodepayFallbacks { + export type AsObject = { + itemType: DecodepayFallbacks.DecodepayFallbacksType; + addr?: string; + hex: Uint8Array | string; + }; + + export enum DecodepayFallbacksType { + P2PKH = 0, + P2SH = 1, + P2WPKH = 2, + P2WSH = 3, + } +} + +export class DecodepayExtra extends jspb.Message { + getTag(): string; + setTag(value: string): DecodepayExtra; + getData(): string; + setData(value: string): DecodepayExtra; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodepayExtra.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodepayExtra, + ): DecodepayExtra.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodepayExtra, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodepayExtra; + static deserializeBinaryFromReader( + message: DecodepayExtra, + reader: jspb.BinaryReader, + ): DecodepayExtra; +} + +export namespace DecodepayExtra { + export type AsObject = { + tag: string; + data: string; + }; +} + +export class DecodeRequest extends jspb.Message { + getString(): string; + setString(value: string): DecodeRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeRequest, + ): DecodeRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeRequest; + static deserializeBinaryFromReader( + message: DecodeRequest, + reader: jspb.BinaryReader, + ): DecodeRequest; +} + +export namespace DecodeRequest { + export type AsObject = { + string: string; + }; +} + +export class DecodeResponse extends jspb.Message { + getItemType(): DecodeResponse.DecodeType; + setItemType(value: DecodeResponse.DecodeType): DecodeResponse; + getValid(): boolean; + setValid(value: boolean): DecodeResponse; + + hasOfferId(): boolean; + clearOfferId(): void; + getOfferId(): Uint8Array | string; + getOfferId_asU8(): Uint8Array; + getOfferId_asB64(): string; + setOfferId(value: Uint8Array | string): DecodeResponse; + clearOfferChainsList(): void; + getOfferChainsList(): Array; + getOfferChainsList_asU8(): Array; + getOfferChainsList_asB64(): Array; + setOfferChainsList(value: Array): DecodeResponse; + addOfferChains( + value: Uint8Array | string, + index?: number, + ): Uint8Array | string; + + hasOfferMetadata(): boolean; + clearOfferMetadata(): void; + getOfferMetadata(): Uint8Array | string; + getOfferMetadata_asU8(): Uint8Array; + getOfferMetadata_asB64(): string; + setOfferMetadata(value: Uint8Array | string): DecodeResponse; + + hasOfferCurrency(): boolean; + clearOfferCurrency(): void; + getOfferCurrency(): string | undefined; + setOfferCurrency(value: string): DecodeResponse; + + hasWarningUnknownOfferCurrency(): boolean; + clearWarningUnknownOfferCurrency(): void; + getWarningUnknownOfferCurrency(): string | undefined; + setWarningUnknownOfferCurrency(value: string): DecodeResponse; + + hasCurrencyMinorUnit(): boolean; + clearCurrencyMinorUnit(): void; + getCurrencyMinorUnit(): number | undefined; + setCurrencyMinorUnit(value: number): DecodeResponse; + + hasOfferAmount(): boolean; + clearOfferAmount(): void; + getOfferAmount(): number | undefined; + setOfferAmount(value: number): DecodeResponse; + + hasOfferAmountMsat(): boolean; + clearOfferAmountMsat(): void; + getOfferAmountMsat(): cln_primitives_pb.Amount | undefined; + setOfferAmountMsat(value?: cln_primitives_pb.Amount): DecodeResponse; + + hasOfferDescription(): boolean; + clearOfferDescription(): void; + getOfferDescription(): string | undefined; + setOfferDescription(value: string): DecodeResponse; + + hasOfferIssuer(): boolean; + clearOfferIssuer(): void; + getOfferIssuer(): string | undefined; + setOfferIssuer(value: string): DecodeResponse; + + hasOfferFeatures(): boolean; + clearOfferFeatures(): void; + getOfferFeatures(): Uint8Array | string; + getOfferFeatures_asU8(): Uint8Array; + getOfferFeatures_asB64(): string; + setOfferFeatures(value: Uint8Array | string): DecodeResponse; + + hasOfferAbsoluteExpiry(): boolean; + clearOfferAbsoluteExpiry(): void; + getOfferAbsoluteExpiry(): number | undefined; + setOfferAbsoluteExpiry(value: number): DecodeResponse; + + hasOfferQuantityMax(): boolean; + clearOfferQuantityMax(): void; + getOfferQuantityMax(): number | undefined; + setOfferQuantityMax(value: number): DecodeResponse; + clearOfferPathsList(): void; + getOfferPathsList(): Array; + setOfferPathsList(value: Array): DecodeResponse; + addOfferPaths(value?: DecodeOffer_paths, index?: number): DecodeOffer_paths; + + hasOfferNodeId(): boolean; + clearOfferNodeId(): void; + getOfferNodeId(): Uint8Array | string; + getOfferNodeId_asU8(): Uint8Array; + getOfferNodeId_asB64(): string; + setOfferNodeId(value: Uint8Array | string): DecodeResponse; + + hasWarningMissingOfferNodeId(): boolean; + clearWarningMissingOfferNodeId(): void; + getWarningMissingOfferNodeId(): string | undefined; + setWarningMissingOfferNodeId(value: string): DecodeResponse; + + hasWarningInvalidOfferDescription(): boolean; + clearWarningInvalidOfferDescription(): void; + getWarningInvalidOfferDescription(): string | undefined; + setWarningInvalidOfferDescription(value: string): DecodeResponse; + + hasWarningMissingOfferDescription(): boolean; + clearWarningMissingOfferDescription(): void; + getWarningMissingOfferDescription(): string | undefined; + setWarningMissingOfferDescription(value: string): DecodeResponse; + + hasWarningInvalidOfferCurrency(): boolean; + clearWarningInvalidOfferCurrency(): void; + getWarningInvalidOfferCurrency(): string | undefined; + setWarningInvalidOfferCurrency(value: string): DecodeResponse; + + hasWarningInvalidOfferIssuer(): boolean; + clearWarningInvalidOfferIssuer(): void; + getWarningInvalidOfferIssuer(): string | undefined; + setWarningInvalidOfferIssuer(value: string): DecodeResponse; + + hasInvreqMetadata(): boolean; + clearInvreqMetadata(): void; + getInvreqMetadata(): Uint8Array | string; + getInvreqMetadata_asU8(): Uint8Array; + getInvreqMetadata_asB64(): string; + setInvreqMetadata(value: Uint8Array | string): DecodeResponse; + + hasInvreqPayerId(): boolean; + clearInvreqPayerId(): void; + getInvreqPayerId(): Uint8Array | string; + getInvreqPayerId_asU8(): Uint8Array; + getInvreqPayerId_asB64(): string; + setInvreqPayerId(value: Uint8Array | string): DecodeResponse; + + hasInvreqChain(): boolean; + clearInvreqChain(): void; + getInvreqChain(): Uint8Array | string; + getInvreqChain_asU8(): Uint8Array; + getInvreqChain_asB64(): string; + setInvreqChain(value: Uint8Array | string): DecodeResponse; + + hasInvreqAmountMsat(): boolean; + clearInvreqAmountMsat(): void; + getInvreqAmountMsat(): cln_primitives_pb.Amount | undefined; + setInvreqAmountMsat(value?: cln_primitives_pb.Amount): DecodeResponse; + + hasInvreqFeatures(): boolean; + clearInvreqFeatures(): void; + getInvreqFeatures(): Uint8Array | string; + getInvreqFeatures_asU8(): Uint8Array; + getInvreqFeatures_asB64(): string; + setInvreqFeatures(value: Uint8Array | string): DecodeResponse; + + hasInvreqQuantity(): boolean; + clearInvreqQuantity(): void; + getInvreqQuantity(): number | undefined; + setInvreqQuantity(value: number): DecodeResponse; + + hasInvreqPayerNote(): boolean; + clearInvreqPayerNote(): void; + getInvreqPayerNote(): string | undefined; + setInvreqPayerNote(value: string): DecodeResponse; + + hasInvreqRecurrenceCounter(): boolean; + clearInvreqRecurrenceCounter(): void; + getInvreqRecurrenceCounter(): number | undefined; + setInvreqRecurrenceCounter(value: number): DecodeResponse; + + hasInvreqRecurrenceStart(): boolean; + clearInvreqRecurrenceStart(): void; + getInvreqRecurrenceStart(): number | undefined; + setInvreqRecurrenceStart(value: number): DecodeResponse; + + hasWarningMissingInvreqMetadata(): boolean; + clearWarningMissingInvreqMetadata(): void; + getWarningMissingInvreqMetadata(): string | undefined; + setWarningMissingInvreqMetadata(value: string): DecodeResponse; + + hasWarningMissingInvreqPayerId(): boolean; + clearWarningMissingInvreqPayerId(): void; + getWarningMissingInvreqPayerId(): string | undefined; + setWarningMissingInvreqPayerId(value: string): DecodeResponse; + + hasWarningInvalidInvreqPayerNote(): boolean; + clearWarningInvalidInvreqPayerNote(): void; + getWarningInvalidInvreqPayerNote(): string | undefined; + setWarningInvalidInvreqPayerNote(value: string): DecodeResponse; + + hasWarningMissingInvoiceRequestSignature(): boolean; + clearWarningMissingInvoiceRequestSignature(): void; + getWarningMissingInvoiceRequestSignature(): string | undefined; + setWarningMissingInvoiceRequestSignature(value: string): DecodeResponse; + + hasWarningInvalidInvoiceRequestSignature(): boolean; + clearWarningInvalidInvoiceRequestSignature(): void; + getWarningInvalidInvoiceRequestSignature(): string | undefined; + setWarningInvalidInvoiceRequestSignature(value: string): DecodeResponse; + + hasInvoiceCreatedAt(): boolean; + clearInvoiceCreatedAt(): void; + getInvoiceCreatedAt(): number | undefined; + setInvoiceCreatedAt(value: number): DecodeResponse; + + hasInvoiceRelativeExpiry(): boolean; + clearInvoiceRelativeExpiry(): void; + getInvoiceRelativeExpiry(): number | undefined; + setInvoiceRelativeExpiry(value: number): DecodeResponse; + + hasInvoicePaymentHash(): boolean; + clearInvoicePaymentHash(): void; + getInvoicePaymentHash(): Uint8Array | string; + getInvoicePaymentHash_asU8(): Uint8Array; + getInvoicePaymentHash_asB64(): string; + setInvoicePaymentHash(value: Uint8Array | string): DecodeResponse; + + hasInvoiceAmountMsat(): boolean; + clearInvoiceAmountMsat(): void; + getInvoiceAmountMsat(): cln_primitives_pb.Amount | undefined; + setInvoiceAmountMsat(value?: cln_primitives_pb.Amount): DecodeResponse; + clearInvoiceFallbacksList(): void; + getInvoiceFallbacksList(): Array; + setInvoiceFallbacksList( + value: Array, + ): DecodeResponse; + addInvoiceFallbacks( + value?: DecodeInvoice_fallbacks, + index?: number, + ): DecodeInvoice_fallbacks; + + hasInvoiceFeatures(): boolean; + clearInvoiceFeatures(): void; + getInvoiceFeatures(): Uint8Array | string; + getInvoiceFeatures_asU8(): Uint8Array; + getInvoiceFeatures_asB64(): string; + setInvoiceFeatures(value: Uint8Array | string): DecodeResponse; + + hasInvoiceNodeId(): boolean; + clearInvoiceNodeId(): void; + getInvoiceNodeId(): Uint8Array | string; + getInvoiceNodeId_asU8(): Uint8Array; + getInvoiceNodeId_asB64(): string; + setInvoiceNodeId(value: Uint8Array | string): DecodeResponse; + + hasInvoiceRecurrenceBasetime(): boolean; + clearInvoiceRecurrenceBasetime(): void; + getInvoiceRecurrenceBasetime(): number | undefined; + setInvoiceRecurrenceBasetime(value: number): DecodeResponse; + + hasWarningMissingInvoicePaths(): boolean; + clearWarningMissingInvoicePaths(): void; + getWarningMissingInvoicePaths(): string | undefined; + setWarningMissingInvoicePaths(value: string): DecodeResponse; + + hasWarningMissingInvoiceBlindedpay(): boolean; + clearWarningMissingInvoiceBlindedpay(): void; + getWarningMissingInvoiceBlindedpay(): string | undefined; + setWarningMissingInvoiceBlindedpay(value: string): DecodeResponse; + + hasWarningMissingInvoiceCreatedAt(): boolean; + clearWarningMissingInvoiceCreatedAt(): void; + getWarningMissingInvoiceCreatedAt(): string | undefined; + setWarningMissingInvoiceCreatedAt(value: string): DecodeResponse; + + hasWarningMissingInvoicePaymentHash(): boolean; + clearWarningMissingInvoicePaymentHash(): void; + getWarningMissingInvoicePaymentHash(): string | undefined; + setWarningMissingInvoicePaymentHash(value: string): DecodeResponse; + + hasWarningMissingInvoiceAmount(): boolean; + clearWarningMissingInvoiceAmount(): void; + getWarningMissingInvoiceAmount(): string | undefined; + setWarningMissingInvoiceAmount(value: string): DecodeResponse; + + hasWarningMissingInvoiceRecurrenceBasetime(): boolean; + clearWarningMissingInvoiceRecurrenceBasetime(): void; + getWarningMissingInvoiceRecurrenceBasetime(): string | undefined; + setWarningMissingInvoiceRecurrenceBasetime(value: string): DecodeResponse; + + hasWarningMissingInvoiceNodeId(): boolean; + clearWarningMissingInvoiceNodeId(): void; + getWarningMissingInvoiceNodeId(): string | undefined; + setWarningMissingInvoiceNodeId(value: string): DecodeResponse; + + hasWarningMissingInvoiceSignature(): boolean; + clearWarningMissingInvoiceSignature(): void; + getWarningMissingInvoiceSignature(): string | undefined; + setWarningMissingInvoiceSignature(value: string): DecodeResponse; + + hasWarningInvalidInvoiceSignature(): boolean; + clearWarningInvalidInvoiceSignature(): void; + getWarningInvalidInvoiceSignature(): string | undefined; + setWarningInvalidInvoiceSignature(value: string): DecodeResponse; + clearFallbacksList(): void; + getFallbacksList(): Array; + setFallbacksList(value: Array): DecodeResponse; + addFallbacks(value?: DecodeFallbacks, index?: number): DecodeFallbacks; + + hasCreatedAt(): boolean; + clearCreatedAt(): void; + getCreatedAt(): number | undefined; + setCreatedAt(value: number): DecodeResponse; + + hasExpiry(): boolean; + clearExpiry(): void; + getExpiry(): number | undefined; + setExpiry(value: number): DecodeResponse; + + hasPayee(): boolean; + clearPayee(): void; + getPayee(): Uint8Array | string; + getPayee_asU8(): Uint8Array; + getPayee_asB64(): string; + setPayee(value: Uint8Array | string): DecodeResponse; + + hasPaymentHash(): boolean; + clearPaymentHash(): void; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): DecodeResponse; + + hasDescriptionHash(): boolean; + clearDescriptionHash(): void; + getDescriptionHash(): Uint8Array | string; + getDescriptionHash_asU8(): Uint8Array; + getDescriptionHash_asB64(): string; + setDescriptionHash(value: Uint8Array | string): DecodeResponse; + + hasMinFinalCltvExpiry(): boolean; + clearMinFinalCltvExpiry(): void; + getMinFinalCltvExpiry(): number | undefined; + setMinFinalCltvExpiry(value: number): DecodeResponse; + + hasPaymentSecret(): boolean; + clearPaymentSecret(): void; + getPaymentSecret(): Uint8Array | string; + getPaymentSecret_asU8(): Uint8Array; + getPaymentSecret_asB64(): string; + setPaymentSecret(value: Uint8Array | string): DecodeResponse; + + hasPaymentMetadata(): boolean; + clearPaymentMetadata(): void; + getPaymentMetadata(): Uint8Array | string; + getPaymentMetadata_asU8(): Uint8Array; + getPaymentMetadata_asB64(): string; + setPaymentMetadata(value: Uint8Array | string): DecodeResponse; + clearExtraList(): void; + getExtraList(): Array; + setExtraList(value: Array): DecodeResponse; + addExtra(value?: DecodeExtra, index?: number): DecodeExtra; + + hasUniqueId(): boolean; + clearUniqueId(): void; + getUniqueId(): string | undefined; + setUniqueId(value: string): DecodeResponse; + + hasVersion(): boolean; + clearVersion(): void; + getVersion(): string | undefined; + setVersion(value: string): DecodeResponse; + + hasString(): boolean; + clearString(): void; + getString(): string | undefined; + setString(value: string): DecodeResponse; + clearRestrictionsList(): void; + getRestrictionsList(): Array; + setRestrictionsList(value: Array): DecodeResponse; + addRestrictions( + value?: DecodeRestrictions, + index?: number, + ): DecodeRestrictions; + + hasWarningRuneInvalidUtf8(): boolean; + clearWarningRuneInvalidUtf8(): void; + getWarningRuneInvalidUtf8(): string | undefined; + setWarningRuneInvalidUtf8(value: string): DecodeResponse; + + hasHex(): boolean; + clearHex(): void; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): DecodeResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeResponse, + ): DecodeResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeResponse; + static deserializeBinaryFromReader( + message: DecodeResponse, + reader: jspb.BinaryReader, + ): DecodeResponse; +} + +export namespace DecodeResponse { + export type AsObject = { + itemType: DecodeResponse.DecodeType; + valid: boolean; + offerId: Uint8Array | string; + offerChainsList: Array; + offerMetadata: Uint8Array | string; + offerCurrency?: string; + warningUnknownOfferCurrency?: string; + currencyMinorUnit?: number; + offerAmount?: number; + offerAmountMsat?: cln_primitives_pb.Amount.AsObject; + offerDescription?: string; + offerIssuer?: string; + offerFeatures: Uint8Array | string; + offerAbsoluteExpiry?: number; + offerQuantityMax?: number; + offerPathsList: Array; + offerNodeId: Uint8Array | string; + warningMissingOfferNodeId?: string; + warningInvalidOfferDescription?: string; + warningMissingOfferDescription?: string; + warningInvalidOfferCurrency?: string; + warningInvalidOfferIssuer?: string; + invreqMetadata: Uint8Array | string; + invreqPayerId: Uint8Array | string; + invreqChain: Uint8Array | string; + invreqAmountMsat?: cln_primitives_pb.Amount.AsObject; + invreqFeatures: Uint8Array | string; + invreqQuantity?: number; + invreqPayerNote?: string; + invreqRecurrenceCounter?: number; + invreqRecurrenceStart?: number; + warningMissingInvreqMetadata?: string; + warningMissingInvreqPayerId?: string; + warningInvalidInvreqPayerNote?: string; + warningMissingInvoiceRequestSignature?: string; + warningInvalidInvoiceRequestSignature?: string; + invoiceCreatedAt?: number; + invoiceRelativeExpiry?: number; + invoicePaymentHash: Uint8Array | string; + invoiceAmountMsat?: cln_primitives_pb.Amount.AsObject; + invoiceFallbacksList: Array; + invoiceFeatures: Uint8Array | string; + invoiceNodeId: Uint8Array | string; + invoiceRecurrenceBasetime?: number; + warningMissingInvoicePaths?: string; + warningMissingInvoiceBlindedpay?: string; + warningMissingInvoiceCreatedAt?: string; + warningMissingInvoicePaymentHash?: string; + warningMissingInvoiceAmount?: string; + warningMissingInvoiceRecurrenceBasetime?: string; + warningMissingInvoiceNodeId?: string; + warningMissingInvoiceSignature?: string; + warningInvalidInvoiceSignature?: string; + fallbacksList: Array; + createdAt?: number; + expiry?: number; + payee: Uint8Array | string; + paymentHash: Uint8Array | string; + descriptionHash: Uint8Array | string; + minFinalCltvExpiry?: number; + paymentSecret: Uint8Array | string; + paymentMetadata: Uint8Array | string; + extraList: Array; + uniqueId?: string; + version?: string; + string?: string; + restrictionsList: Array; + warningRuneInvalidUtf8?: string; + hex: Uint8Array | string; + }; + + export enum DecodeType { + BOLT12_OFFER = 0, + BOLT12_INVOICE = 1, + BOLT12_INVOICE_REQUEST = 2, + BOLT11_INVOICE = 3, + RUNE = 4, + } +} + +export class DecodeOffer_paths extends jspb.Message { + getFirstNodeId(): Uint8Array | string; + getFirstNodeId_asU8(): Uint8Array; + getFirstNodeId_asB64(): string; + setFirstNodeId(value: Uint8Array | string): DecodeOffer_paths; + getBlinding(): Uint8Array | string; + getBlinding_asU8(): Uint8Array; + getBlinding_asB64(): string; + setBlinding(value: Uint8Array | string): DecodeOffer_paths; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeOffer_paths.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeOffer_paths, + ): DecodeOffer_paths.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeOffer_paths, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeOffer_paths; + static deserializeBinaryFromReader( + message: DecodeOffer_paths, + reader: jspb.BinaryReader, + ): DecodeOffer_paths; +} + +export namespace DecodeOffer_paths { + export type AsObject = { + firstNodeId: Uint8Array | string; + blinding: Uint8Array | string; + }; +} + +export class DecodeOffer_recurrencePaywindow extends jspb.Message { + getSecondsBefore(): number; + setSecondsBefore(value: number): DecodeOffer_recurrencePaywindow; + getSecondsAfter(): number; + setSecondsAfter(value: number): DecodeOffer_recurrencePaywindow; + + hasProportionalAmount(): boolean; + clearProportionalAmount(): void; + getProportionalAmount(): boolean | undefined; + setProportionalAmount(value: boolean): DecodeOffer_recurrencePaywindow; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeOffer_recurrencePaywindow.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeOffer_recurrencePaywindow, + ): DecodeOffer_recurrencePaywindow.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeOffer_recurrencePaywindow, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeOffer_recurrencePaywindow; + static deserializeBinaryFromReader( + message: DecodeOffer_recurrencePaywindow, + reader: jspb.BinaryReader, + ): DecodeOffer_recurrencePaywindow; +} + +export namespace DecodeOffer_recurrencePaywindow { + export type AsObject = { + secondsBefore: number; + secondsAfter: number; + proportionalAmount?: boolean; + }; +} + +export class DecodeInvoice_pathsPath extends jspb.Message { + getBlindedNodeId(): Uint8Array | string; + getBlindedNodeId_asU8(): Uint8Array; + getBlindedNodeId_asB64(): string; + setBlindedNodeId(value: Uint8Array | string): DecodeInvoice_pathsPath; + getEncryptedRecipientData(): Uint8Array | string; + getEncryptedRecipientData_asU8(): Uint8Array; + getEncryptedRecipientData_asB64(): string; + setEncryptedRecipientData( + value: Uint8Array | string, + ): DecodeInvoice_pathsPath; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeInvoice_pathsPath.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeInvoice_pathsPath, + ): DecodeInvoice_pathsPath.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeInvoice_pathsPath, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeInvoice_pathsPath; + static deserializeBinaryFromReader( + message: DecodeInvoice_pathsPath, + reader: jspb.BinaryReader, + ): DecodeInvoice_pathsPath; +} + +export namespace DecodeInvoice_pathsPath { + export type AsObject = { + blindedNodeId: Uint8Array | string; + encryptedRecipientData: Uint8Array | string; + }; +} + +export class DecodeInvoice_fallbacks extends jspb.Message { + getVersion(): number; + setVersion(value: number): DecodeInvoice_fallbacks; + getHex(): Uint8Array | string; + getHex_asU8(): Uint8Array; + getHex_asB64(): string; + setHex(value: Uint8Array | string): DecodeInvoice_fallbacks; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): string | undefined; + setAddress(value: string): DecodeInvoice_fallbacks; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeInvoice_fallbacks.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeInvoice_fallbacks, + ): DecodeInvoice_fallbacks.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeInvoice_fallbacks, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeInvoice_fallbacks; + static deserializeBinaryFromReader( + message: DecodeInvoice_fallbacks, + reader: jspb.BinaryReader, + ): DecodeInvoice_fallbacks; +} + +export namespace DecodeInvoice_fallbacks { + export type AsObject = { + version: number; + hex: Uint8Array | string; + address?: string; + }; +} + +export class DecodeFallbacks extends jspb.Message { + hasWarningInvoiceFallbacksVersionInvalid(): boolean; + clearWarningInvoiceFallbacksVersionInvalid(): void; + getWarningInvoiceFallbacksVersionInvalid(): string | undefined; + setWarningInvoiceFallbacksVersionInvalid(value: string): DecodeFallbacks; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeFallbacks.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeFallbacks, + ): DecodeFallbacks.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeFallbacks, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeFallbacks; + static deserializeBinaryFromReader( + message: DecodeFallbacks, + reader: jspb.BinaryReader, + ): DecodeFallbacks; +} + +export namespace DecodeFallbacks { + export type AsObject = { + warningInvoiceFallbacksVersionInvalid?: string; + }; +} + +export class DecodeExtra extends jspb.Message { + getTag(): string; + setTag(value: string): DecodeExtra; + getData(): string; + setData(value: string): DecodeExtra; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeExtra.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeExtra, + ): DecodeExtra.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeExtra, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeExtra; + static deserializeBinaryFromReader( + message: DecodeExtra, + reader: jspb.BinaryReader, + ): DecodeExtra; +} + +export namespace DecodeExtra { + export type AsObject = { + tag: string; + data: string; + }; +} + +export class DecodeRestrictions extends jspb.Message { + clearAlternativesList(): void; + getAlternativesList(): Array; + setAlternativesList(value: Array): DecodeRestrictions; + addAlternatives(value: string, index?: number): string; + getSummary(): string; + setSummary(value: string): DecodeRestrictions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DecodeRestrictions.AsObject; + static toObject( + includeInstance: boolean, + msg: DecodeRestrictions, + ): DecodeRestrictions.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DecodeRestrictions, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DecodeRestrictions; + static deserializeBinaryFromReader( + message: DecodeRestrictions, + reader: jspb.BinaryReader, + ): DecodeRestrictions; +} + +export namespace DecodeRestrictions { + export type AsObject = { + alternativesList: Array; + summary: string; + }; +} + +export class DisconnectRequest extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): DisconnectRequest; + + hasForce(): boolean; + clearForce(): void; + getForce(): boolean | undefined; + setForce(value: boolean): DisconnectRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DisconnectRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: DisconnectRequest, + ): DisconnectRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DisconnectRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DisconnectRequest; + static deserializeBinaryFromReader( + message: DisconnectRequest, + reader: jspb.BinaryReader, + ): DisconnectRequest; +} + +export namespace DisconnectRequest { + export type AsObject = { + id: Uint8Array | string; + force?: boolean; + }; +} + +export class DisconnectResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DisconnectResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: DisconnectResponse, + ): DisconnectResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: DisconnectResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): DisconnectResponse; + static deserializeBinaryFromReader( + message: DisconnectResponse, + reader: jspb.BinaryReader, + ): DisconnectResponse; +} + +export namespace DisconnectResponse { + export type AsObject = {}; +} + +export class FeeratesRequest extends jspb.Message { + getStyle(): FeeratesRequest.FeeratesStyle; + setStyle(value: FeeratesRequest.FeeratesStyle): FeeratesRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesRequest, + ): FeeratesRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesRequest; + static deserializeBinaryFromReader( + message: FeeratesRequest, + reader: jspb.BinaryReader, + ): FeeratesRequest; +} + +export namespace FeeratesRequest { + export type AsObject = { + style: FeeratesRequest.FeeratesStyle; + }; + + export enum FeeratesStyle { + PERKB = 0, + PERKW = 1, + } +} + +export class FeeratesResponse extends jspb.Message { + hasWarningMissingFeerates(): boolean; + clearWarningMissingFeerates(): void; + getWarningMissingFeerates(): string | undefined; + setWarningMissingFeerates(value: string): FeeratesResponse; + + hasPerkb(): boolean; + clearPerkb(): void; + getPerkb(): FeeratesPerkb | undefined; + setPerkb(value?: FeeratesPerkb): FeeratesResponse; + + hasPerkw(): boolean; + clearPerkw(): void; + getPerkw(): FeeratesPerkw | undefined; + setPerkw(value?: FeeratesPerkw): FeeratesResponse; + + hasOnchainFeeEstimates(): boolean; + clearOnchainFeeEstimates(): void; + getOnchainFeeEstimates(): FeeratesOnchain_fee_estimates | undefined; + setOnchainFeeEstimates( + value?: FeeratesOnchain_fee_estimates, + ): FeeratesResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesResponse, + ): FeeratesResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesResponse; + static deserializeBinaryFromReader( + message: FeeratesResponse, + reader: jspb.BinaryReader, + ): FeeratesResponse; +} + +export namespace FeeratesResponse { + export type AsObject = { + warningMissingFeerates?: string; + perkb?: FeeratesPerkb.AsObject; + perkw?: FeeratesPerkw.AsObject; + onchainFeeEstimates?: FeeratesOnchain_fee_estimates.AsObject; + }; +} + +export class FeeratesPerkb extends jspb.Message { + getMinAcceptable(): number; + setMinAcceptable(value: number): FeeratesPerkb; + getMaxAcceptable(): number; + setMaxAcceptable(value: number): FeeratesPerkb; + + hasFloor(): boolean; + clearFloor(): void; + getFloor(): number | undefined; + setFloor(value: number): FeeratesPerkb; + clearEstimatesList(): void; + getEstimatesList(): Array; + setEstimatesList(value: Array): FeeratesPerkb; + addEstimates( + value?: FeeratesPerkbEstimates, + index?: number, + ): FeeratesPerkbEstimates; + + hasOpening(): boolean; + clearOpening(): void; + getOpening(): number | undefined; + setOpening(value: number): FeeratesPerkb; + + hasMutualClose(): boolean; + clearMutualClose(): void; + getMutualClose(): number | undefined; + setMutualClose(value: number): FeeratesPerkb; + + hasUnilateralClose(): boolean; + clearUnilateralClose(): void; + getUnilateralClose(): number | undefined; + setUnilateralClose(value: number): FeeratesPerkb; + + hasDelayedToUs(): boolean; + clearDelayedToUs(): void; + getDelayedToUs(): number | undefined; + setDelayedToUs(value: number): FeeratesPerkb; + + hasHtlcResolution(): boolean; + clearHtlcResolution(): void; + getHtlcResolution(): number | undefined; + setHtlcResolution(value: number): FeeratesPerkb; + + hasPenalty(): boolean; + clearPenalty(): void; + getPenalty(): number | undefined; + setPenalty(value: number): FeeratesPerkb; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesPerkb.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesPerkb, + ): FeeratesPerkb.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesPerkb, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesPerkb; + static deserializeBinaryFromReader( + message: FeeratesPerkb, + reader: jspb.BinaryReader, + ): FeeratesPerkb; +} + +export namespace FeeratesPerkb { + export type AsObject = { + minAcceptable: number; + maxAcceptable: number; + floor?: number; + estimatesList: Array; + opening?: number; + mutualClose?: number; + unilateralClose?: number; + delayedToUs?: number; + htlcResolution?: number; + penalty?: number; + }; +} + +export class FeeratesPerkbEstimates extends jspb.Message { + hasBlockcount(): boolean; + clearBlockcount(): void; + getBlockcount(): number | undefined; + setBlockcount(value: number): FeeratesPerkbEstimates; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): number | undefined; + setFeerate(value: number): FeeratesPerkbEstimates; + + hasSmoothedFeerate(): boolean; + clearSmoothedFeerate(): void; + getSmoothedFeerate(): number | undefined; + setSmoothedFeerate(value: number): FeeratesPerkbEstimates; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesPerkbEstimates.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesPerkbEstimates, + ): FeeratesPerkbEstimates.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesPerkbEstimates, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesPerkbEstimates; + static deserializeBinaryFromReader( + message: FeeratesPerkbEstimates, + reader: jspb.BinaryReader, + ): FeeratesPerkbEstimates; +} + +export namespace FeeratesPerkbEstimates { + export type AsObject = { + blockcount?: number; + feerate?: number; + smoothedFeerate?: number; + }; +} + +export class FeeratesPerkw extends jspb.Message { + getMinAcceptable(): number; + setMinAcceptable(value: number): FeeratesPerkw; + getMaxAcceptable(): number; + setMaxAcceptable(value: number): FeeratesPerkw; + + hasFloor(): boolean; + clearFloor(): void; + getFloor(): number | undefined; + setFloor(value: number): FeeratesPerkw; + clearEstimatesList(): void; + getEstimatesList(): Array; + setEstimatesList(value: Array): FeeratesPerkw; + addEstimates( + value?: FeeratesPerkwEstimates, + index?: number, + ): FeeratesPerkwEstimates; + + hasOpening(): boolean; + clearOpening(): void; + getOpening(): number | undefined; + setOpening(value: number): FeeratesPerkw; + + hasMutualClose(): boolean; + clearMutualClose(): void; + getMutualClose(): number | undefined; + setMutualClose(value: number): FeeratesPerkw; + + hasUnilateralClose(): boolean; + clearUnilateralClose(): void; + getUnilateralClose(): number | undefined; + setUnilateralClose(value: number): FeeratesPerkw; + + hasDelayedToUs(): boolean; + clearDelayedToUs(): void; + getDelayedToUs(): number | undefined; + setDelayedToUs(value: number): FeeratesPerkw; + + hasHtlcResolution(): boolean; + clearHtlcResolution(): void; + getHtlcResolution(): number | undefined; + setHtlcResolution(value: number): FeeratesPerkw; + + hasPenalty(): boolean; + clearPenalty(): void; + getPenalty(): number | undefined; + setPenalty(value: number): FeeratesPerkw; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesPerkw.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesPerkw, + ): FeeratesPerkw.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesPerkw, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesPerkw; + static deserializeBinaryFromReader( + message: FeeratesPerkw, + reader: jspb.BinaryReader, + ): FeeratesPerkw; +} + +export namespace FeeratesPerkw { + export type AsObject = { + minAcceptable: number; + maxAcceptable: number; + floor?: number; + estimatesList: Array; + opening?: number; + mutualClose?: number; + unilateralClose?: number; + delayedToUs?: number; + htlcResolution?: number; + penalty?: number; + }; +} + +export class FeeratesPerkwEstimates extends jspb.Message { + hasBlockcount(): boolean; + clearBlockcount(): void; + getBlockcount(): number | undefined; + setBlockcount(value: number): FeeratesPerkwEstimates; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): number | undefined; + setFeerate(value: number): FeeratesPerkwEstimates; + + hasSmoothedFeerate(): boolean; + clearSmoothedFeerate(): void; + getSmoothedFeerate(): number | undefined; + setSmoothedFeerate(value: number): FeeratesPerkwEstimates; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesPerkwEstimates.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesPerkwEstimates, + ): FeeratesPerkwEstimates.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesPerkwEstimates, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesPerkwEstimates; + static deserializeBinaryFromReader( + message: FeeratesPerkwEstimates, + reader: jspb.BinaryReader, + ): FeeratesPerkwEstimates; +} + +export namespace FeeratesPerkwEstimates { + export type AsObject = { + blockcount?: number; + feerate?: number; + smoothedFeerate?: number; + }; +} + +export class FeeratesOnchain_fee_estimates extends jspb.Message { + getOpeningChannelSatoshis(): number; + setOpeningChannelSatoshis(value: number): FeeratesOnchain_fee_estimates; + getMutualCloseSatoshis(): number; + setMutualCloseSatoshis(value: number): FeeratesOnchain_fee_estimates; + getUnilateralCloseSatoshis(): number; + setUnilateralCloseSatoshis(value: number): FeeratesOnchain_fee_estimates; + getHtlcTimeoutSatoshis(): number; + setHtlcTimeoutSatoshis(value: number): FeeratesOnchain_fee_estimates; + getHtlcSuccessSatoshis(): number; + setHtlcSuccessSatoshis(value: number): FeeratesOnchain_fee_estimates; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeeratesOnchain_fee_estimates.AsObject; + static toObject( + includeInstance: boolean, + msg: FeeratesOnchain_fee_estimates, + ): FeeratesOnchain_fee_estimates.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FeeratesOnchain_fee_estimates, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FeeratesOnchain_fee_estimates; + static deserializeBinaryFromReader( + message: FeeratesOnchain_fee_estimates, + reader: jspb.BinaryReader, + ): FeeratesOnchain_fee_estimates; +} + +export namespace FeeratesOnchain_fee_estimates { + export type AsObject = { + openingChannelSatoshis: number; + mutualCloseSatoshis: number; + unilateralCloseSatoshis: number; + htlcTimeoutSatoshis: number; + htlcSuccessSatoshis: number; + }; +} + +export class FundchannelRequest extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): FundchannelRequest; + + hasAmount(): boolean; + clearAmount(): void; + getAmount(): cln_primitives_pb.AmountOrAll | undefined; + setAmount(value?: cln_primitives_pb.AmountOrAll): FundchannelRequest; + + hasFeerate(): boolean; + clearFeerate(): void; + getFeerate(): cln_primitives_pb.Feerate | undefined; + setFeerate(value?: cln_primitives_pb.Feerate): FundchannelRequest; + + hasAnnounce(): boolean; + clearAnnounce(): void; + getAnnounce(): boolean | undefined; + setAnnounce(value: boolean): FundchannelRequest; + + hasMinconf(): boolean; + clearMinconf(): void; + getMinconf(): number | undefined; + setMinconf(value: number): FundchannelRequest; + + hasPushMsat(): boolean; + clearPushMsat(): void; + getPushMsat(): cln_primitives_pb.Amount | undefined; + setPushMsat(value?: cln_primitives_pb.Amount): FundchannelRequest; + + hasCloseTo(): boolean; + clearCloseTo(): void; + getCloseTo(): string | undefined; + setCloseTo(value: string): FundchannelRequest; + + hasRequestAmt(): boolean; + clearRequestAmt(): void; + getRequestAmt(): cln_primitives_pb.Amount | undefined; + setRequestAmt(value?: cln_primitives_pb.Amount): FundchannelRequest; + + hasCompactLease(): boolean; + clearCompactLease(): void; + getCompactLease(): string | undefined; + setCompactLease(value: string): FundchannelRequest; + clearUtxosList(): void; + getUtxosList(): Array; + setUtxosList(value: Array): FundchannelRequest; + addUtxos( + value?: cln_primitives_pb.Outpoint, + index?: number, + ): cln_primitives_pb.Outpoint; + + hasMindepth(): boolean; + clearMindepth(): void; + getMindepth(): number | undefined; + setMindepth(value: number): FundchannelRequest; + + hasReserve(): boolean; + clearReserve(): void; + getReserve(): cln_primitives_pb.Amount | undefined; + setReserve(value?: cln_primitives_pb.Amount): FundchannelRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundchannelRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: FundchannelRequest, + ): FundchannelRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FundchannelRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FundchannelRequest; + static deserializeBinaryFromReader( + message: FundchannelRequest, + reader: jspb.BinaryReader, + ): FundchannelRequest; +} + +export namespace FundchannelRequest { + export type AsObject = { + id: Uint8Array | string; + amount?: cln_primitives_pb.AmountOrAll.AsObject; + feerate?: cln_primitives_pb.Feerate.AsObject; + announce?: boolean; + minconf?: number; + pushMsat?: cln_primitives_pb.Amount.AsObject; + closeTo?: string; + requestAmt?: cln_primitives_pb.Amount.AsObject; + compactLease?: string; + utxosList: Array; + mindepth?: number; + reserve?: cln_primitives_pb.Amount.AsObject; + }; +} + +export class FundchannelResponse extends jspb.Message { + getTx(): Uint8Array | string; + getTx_asU8(): Uint8Array; + getTx_asB64(): string; + setTx(value: Uint8Array | string): FundchannelResponse; + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): FundchannelResponse; + getOutnum(): number; + setOutnum(value: number): FundchannelResponse; + getChannelId(): Uint8Array | string; + getChannelId_asU8(): Uint8Array; + getChannelId_asB64(): string; + setChannelId(value: Uint8Array | string): FundchannelResponse; + + hasCloseTo(): boolean; + clearCloseTo(): void; + getCloseTo(): Uint8Array | string; + getCloseTo_asU8(): Uint8Array; + getCloseTo_asB64(): string; + setCloseTo(value: Uint8Array | string): FundchannelResponse; + + hasMindepth(): boolean; + clearMindepth(): void; + getMindepth(): number | undefined; + setMindepth(value: number): FundchannelResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FundchannelResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: FundchannelResponse, + ): FundchannelResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: FundchannelResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): FundchannelResponse; + static deserializeBinaryFromReader( + message: FundchannelResponse, + reader: jspb.BinaryReader, + ): FundchannelResponse; +} + +export namespace FundchannelResponse { + export type AsObject = { + tx: Uint8Array | string; + txid: Uint8Array | string; + outnum: number; + channelId: Uint8Array | string; + closeTo: Uint8Array | string; + mindepth?: number; + }; +} + +export class GetrouteRequest extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): GetrouteRequest; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): GetrouteRequest; + getRiskfactor(): number; + setRiskfactor(value: number): GetrouteRequest; + + hasCltv(): boolean; + clearCltv(): void; + getCltv(): number | undefined; + setCltv(value: number): GetrouteRequest; + + hasFromid(): boolean; + clearFromid(): void; + getFromid(): Uint8Array | string; + getFromid_asU8(): Uint8Array; + getFromid_asB64(): string; + setFromid(value: Uint8Array | string): GetrouteRequest; + + hasFuzzpercent(): boolean; + clearFuzzpercent(): void; + getFuzzpercent(): number | undefined; + setFuzzpercent(value: number): GetrouteRequest; + clearExcludeList(): void; + getExcludeList(): Array; + setExcludeList(value: Array): GetrouteRequest; + addExclude(value: string, index?: number): string; + + hasMaxhops(): boolean; + clearMaxhops(): void; + getMaxhops(): number | undefined; + setMaxhops(value: number): GetrouteRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetrouteRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: GetrouteRequest, + ): GetrouteRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetrouteRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetrouteRequest; + static deserializeBinaryFromReader( + message: GetrouteRequest, + reader: jspb.BinaryReader, + ): GetrouteRequest; +} + +export namespace GetrouteRequest { + export type AsObject = { + id: Uint8Array | string; + amountMsat?: cln_primitives_pb.Amount.AsObject; + riskfactor: number; + cltv?: number; + fromid: Uint8Array | string; + fuzzpercent?: number; + excludeList: Array; + maxhops?: number; + }; +} + +export class GetrouteResponse extends jspb.Message { + clearRouteList(): void; + getRouteList(): Array; + setRouteList(value: Array): GetrouteResponse; + addRoute(value?: GetrouteRoute, index?: number): GetrouteRoute; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetrouteResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: GetrouteResponse, + ): GetrouteResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetrouteResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetrouteResponse; + static deserializeBinaryFromReader( + message: GetrouteResponse, + reader: jspb.BinaryReader, + ): GetrouteResponse; +} + +export namespace GetrouteResponse { + export type AsObject = { + routeList: Array; + }; +} + +export class GetrouteRoute extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): GetrouteRoute; + getChannel(): string; + setChannel(value: string): GetrouteRoute; + getDirection(): number; + setDirection(value: number): GetrouteRoute; + + hasAmountMsat(): boolean; + clearAmountMsat(): void; + getAmountMsat(): cln_primitives_pb.Amount | undefined; + setAmountMsat(value?: cln_primitives_pb.Amount): GetrouteRoute; + getDelay(): number; + setDelay(value: number): GetrouteRoute; + getStyle(): GetrouteRoute.GetrouteRouteStyle; + setStyle(value: GetrouteRoute.GetrouteRouteStyle): GetrouteRoute; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetrouteRoute.AsObject; + static toObject( + includeInstance: boolean, + msg: GetrouteRoute, + ): GetrouteRoute.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetrouteRoute, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetrouteRoute; + static deserializeBinaryFromReader( + message: GetrouteRoute, + reader: jspb.BinaryReader, + ): GetrouteRoute; +} + +export namespace GetrouteRoute { + export type AsObject = { + id: Uint8Array | string; + channel: string; + direction: number; + amountMsat?: cln_primitives_pb.Amount.AsObject; + delay: number; + style: GetrouteRoute.GetrouteRouteStyle; + }; + + export enum GetrouteRouteStyle { + TLV = 0, + } +} + +export class ListforwardsRequest extends jspb.Message { + hasStatus(): boolean; + clearStatus(): void; + getStatus(): ListforwardsRequest.ListforwardsStatus | undefined; + setStatus(value: ListforwardsRequest.ListforwardsStatus): ListforwardsRequest; + + hasInChannel(): boolean; + clearInChannel(): void; + getInChannel(): string | undefined; + setInChannel(value: string): ListforwardsRequest; + + hasOutChannel(): boolean; + clearOutChannel(): void; + getOutChannel(): string | undefined; + setOutChannel(value: string): ListforwardsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListforwardsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListforwardsRequest, + ): ListforwardsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListforwardsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListforwardsRequest; + static deserializeBinaryFromReader( + message: ListforwardsRequest, + reader: jspb.BinaryReader, + ): ListforwardsRequest; +} + +export namespace ListforwardsRequest { + export type AsObject = { + status?: ListforwardsRequest.ListforwardsStatus; + inChannel?: string; + outChannel?: string; + }; + + export enum ListforwardsStatus { + OFFERED = 0, + SETTLED = 1, + LOCAL_FAILED = 2, + FAILED = 3, + } +} + +export class ListforwardsResponse extends jspb.Message { + clearForwardsList(): void; + getForwardsList(): Array; + setForwardsList(value: Array): ListforwardsResponse; + addForwards( + value?: ListforwardsForwards, + index?: number, + ): ListforwardsForwards; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListforwardsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListforwardsResponse, + ): ListforwardsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListforwardsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListforwardsResponse; + static deserializeBinaryFromReader( + message: ListforwardsResponse, + reader: jspb.BinaryReader, + ): ListforwardsResponse; +} + +export namespace ListforwardsResponse { + export type AsObject = { + forwardsList: Array; + }; +} + +export class ListforwardsForwards extends jspb.Message { + getInChannel(): string; + setInChannel(value: string): ListforwardsForwards; + + hasInHtlcId(): boolean; + clearInHtlcId(): void; + getInHtlcId(): number | undefined; + setInHtlcId(value: number): ListforwardsForwards; + + hasInMsat(): boolean; + clearInMsat(): void; + getInMsat(): cln_primitives_pb.Amount | undefined; + setInMsat(value?: cln_primitives_pb.Amount): ListforwardsForwards; + getStatus(): ListforwardsForwards.ListforwardsForwardsStatus; + setStatus( + value: ListforwardsForwards.ListforwardsForwardsStatus, + ): ListforwardsForwards; + getReceivedTime(): number; + setReceivedTime(value: number): ListforwardsForwards; + + hasOutChannel(): boolean; + clearOutChannel(): void; + getOutChannel(): string | undefined; + setOutChannel(value: string): ListforwardsForwards; + + hasOutHtlcId(): boolean; + clearOutHtlcId(): void; + getOutHtlcId(): number | undefined; + setOutHtlcId(value: number): ListforwardsForwards; + + hasStyle(): boolean; + clearStyle(): void; + getStyle(): ListforwardsForwards.ListforwardsForwardsStyle | undefined; + setStyle( + value: ListforwardsForwards.ListforwardsForwardsStyle, + ): ListforwardsForwards; + + hasFeeMsat(): boolean; + clearFeeMsat(): void; + getFeeMsat(): cln_primitives_pb.Amount | undefined; + setFeeMsat(value?: cln_primitives_pb.Amount): ListforwardsForwards; + + hasOutMsat(): boolean; + clearOutMsat(): void; + getOutMsat(): cln_primitives_pb.Amount | undefined; + setOutMsat(value?: cln_primitives_pb.Amount): ListforwardsForwards; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListforwardsForwards.AsObject; + static toObject( + includeInstance: boolean, + msg: ListforwardsForwards, + ): ListforwardsForwards.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListforwardsForwards, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListforwardsForwards; + static deserializeBinaryFromReader( + message: ListforwardsForwards, + reader: jspb.BinaryReader, + ): ListforwardsForwards; +} + +export namespace ListforwardsForwards { + export type AsObject = { + inChannel: string; + inHtlcId?: number; + inMsat?: cln_primitives_pb.Amount.AsObject; + status: ListforwardsForwards.ListforwardsForwardsStatus; + receivedTime: number; + outChannel?: string; + outHtlcId?: number; + style?: ListforwardsForwards.ListforwardsForwardsStyle; + feeMsat?: cln_primitives_pb.Amount.AsObject; + outMsat?: cln_primitives_pb.Amount.AsObject; + }; + + export enum ListforwardsForwardsStatus { + OFFERED = 0, + SETTLED = 1, + LOCAL_FAILED = 2, + FAILED = 3, + } + + export enum ListforwardsForwardsStyle { + LEGACY = 0, + TLV = 1, + } +} + +export class ListpaysRequest extends jspb.Message { + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): ListpaysRequest; + + hasPaymentHash(): boolean; + clearPaymentHash(): void; + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListpaysRequest; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): ListpaysRequest.ListpaysStatus | undefined; + setStatus(value: ListpaysRequest.ListpaysStatus): ListpaysRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpaysRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpaysRequest, + ): ListpaysRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpaysRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpaysRequest; + static deserializeBinaryFromReader( + message: ListpaysRequest, + reader: jspb.BinaryReader, + ): ListpaysRequest; +} + +export namespace ListpaysRequest { + export type AsObject = { + bolt11?: string; + paymentHash: Uint8Array | string; + status?: ListpaysRequest.ListpaysStatus; + }; + + export enum ListpaysStatus { + PENDING = 0, + COMPLETE = 1, + FAILED = 2, + } +} + +export class ListpaysResponse extends jspb.Message { + clearPaysList(): void; + getPaysList(): Array; + setPaysList(value: Array): ListpaysResponse; + addPays(value?: ListpaysPays, index?: number): ListpaysPays; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpaysResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpaysResponse, + ): ListpaysResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpaysResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpaysResponse; + static deserializeBinaryFromReader( + message: ListpaysResponse, + reader: jspb.BinaryReader, + ): ListpaysResponse; +} + +export namespace ListpaysResponse { + export type AsObject = { + paysList: Array; + }; +} + +export class ListpaysPays extends jspb.Message { + getPaymentHash(): Uint8Array | string; + getPaymentHash_asU8(): Uint8Array; + getPaymentHash_asB64(): string; + setPaymentHash(value: Uint8Array | string): ListpaysPays; + getStatus(): ListpaysPays.ListpaysPaysStatus; + setStatus(value: ListpaysPays.ListpaysPaysStatus): ListpaysPays; + + hasDestination(): boolean; + clearDestination(): void; + getDestination(): Uint8Array | string; + getDestination_asU8(): Uint8Array; + getDestination_asB64(): string; + setDestination(value: Uint8Array | string): ListpaysPays; + getCreatedAt(): number; + setCreatedAt(value: number): ListpaysPays; + + hasCompletedAt(): boolean; + clearCompletedAt(): void; + getCompletedAt(): number | undefined; + setCompletedAt(value: number): ListpaysPays; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): string | undefined; + setLabel(value: string): ListpaysPays; + + hasBolt11(): boolean; + clearBolt11(): void; + getBolt11(): string | undefined; + setBolt11(value: string): ListpaysPays; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): ListpaysPays; + + hasBolt12(): boolean; + clearBolt12(): void; + getBolt12(): string | undefined; + setBolt12(value: string): ListpaysPays; + + hasPreimage(): boolean; + clearPreimage(): void; + getPreimage(): Uint8Array | string; + getPreimage_asU8(): Uint8Array; + getPreimage_asB64(): string; + setPreimage(value: Uint8Array | string): ListpaysPays; + + hasNumberOfParts(): boolean; + clearNumberOfParts(): void; + getNumberOfParts(): number | undefined; + setNumberOfParts(value: number): ListpaysPays; + + hasErroronion(): boolean; + clearErroronion(): void; + getErroronion(): Uint8Array | string; + getErroronion_asU8(): Uint8Array; + getErroronion_asB64(): string; + setErroronion(value: Uint8Array | string): ListpaysPays; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListpaysPays.AsObject; + static toObject( + includeInstance: boolean, + msg: ListpaysPays, + ): ListpaysPays.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListpaysPays, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListpaysPays; + static deserializeBinaryFromReader( + message: ListpaysPays, + reader: jspb.BinaryReader, + ): ListpaysPays; +} + +export namespace ListpaysPays { + export type AsObject = { + paymentHash: Uint8Array | string; + status: ListpaysPays.ListpaysPaysStatus; + destination: Uint8Array | string; + createdAt: number; + completedAt?: number; + label?: string; + bolt11?: string; + description?: string; + bolt12?: string; + preimage: Uint8Array | string; + numberOfParts?: number; + erroronion: Uint8Array | string; + }; + + export enum ListpaysPaysStatus { + PENDING = 0, + FAILED = 1, + COMPLETE = 2, + } +} + +export class PingRequest extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): PingRequest; + + hasLen(): boolean; + clearLen(): void; + getLen(): number | undefined; + setLen(value: number): PingRequest; + + hasPongbytes(): boolean; + clearPongbytes(): void; + getPongbytes(): number | undefined; + setPongbytes(value: number): PingRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PingRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: PingRequest, + ): PingRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: PingRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): PingRequest; + static deserializeBinaryFromReader( + message: PingRequest, + reader: jspb.BinaryReader, + ): PingRequest; +} + +export namespace PingRequest { + export type AsObject = { + id: Uint8Array | string; + len?: number; + pongbytes?: number; + }; +} + +export class PingResponse extends jspb.Message { + getTotlen(): number; + setTotlen(value: number): PingResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PingResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: PingResponse, + ): PingResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: PingResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): PingResponse; + static deserializeBinaryFromReader( + message: PingResponse, + reader: jspb.BinaryReader, + ): PingResponse; +} + +export namespace PingResponse { + export type AsObject = { + totlen: number; + }; +} + +export class SendcustommsgRequest extends jspb.Message { + getNodeId(): Uint8Array | string; + getNodeId_asU8(): Uint8Array; + getNodeId_asB64(): string; + setNodeId(value: Uint8Array | string): SendcustommsgRequest; + getMsg(): Uint8Array | string; + getMsg_asU8(): Uint8Array; + getMsg_asB64(): string; + setMsg(value: Uint8Array | string): SendcustommsgRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendcustommsgRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SendcustommsgRequest, + ): SendcustommsgRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendcustommsgRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendcustommsgRequest; + static deserializeBinaryFromReader( + message: SendcustommsgRequest, + reader: jspb.BinaryReader, + ): SendcustommsgRequest; +} + +export namespace SendcustommsgRequest { + export type AsObject = { + nodeId: Uint8Array | string; + msg: Uint8Array | string; + }; +} + +export class SendcustommsgResponse extends jspb.Message { + getStatus(): string; + setStatus(value: string): SendcustommsgResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SendcustommsgResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SendcustommsgResponse, + ): SendcustommsgResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SendcustommsgResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SendcustommsgResponse; + static deserializeBinaryFromReader( + message: SendcustommsgResponse, + reader: jspb.BinaryReader, + ): SendcustommsgResponse; +} + +export namespace SendcustommsgResponse { + export type AsObject = { + status: string; + }; +} + +export class SetchannelRequest extends jspb.Message { + getId(): string; + setId(value: string): SetchannelRequest; + + hasFeebase(): boolean; + clearFeebase(): void; + getFeebase(): cln_primitives_pb.Amount | undefined; + setFeebase(value?: cln_primitives_pb.Amount): SetchannelRequest; + + hasFeeppm(): boolean; + clearFeeppm(): void; + getFeeppm(): number | undefined; + setFeeppm(value: number): SetchannelRequest; + + hasHtlcmin(): boolean; + clearHtlcmin(): void; + getHtlcmin(): cln_primitives_pb.Amount | undefined; + setHtlcmin(value?: cln_primitives_pb.Amount): SetchannelRequest; + + hasHtlcmax(): boolean; + clearHtlcmax(): void; + getHtlcmax(): cln_primitives_pb.Amount | undefined; + setHtlcmax(value?: cln_primitives_pb.Amount): SetchannelRequest; + + hasEnforcedelay(): boolean; + clearEnforcedelay(): void; + getEnforcedelay(): number | undefined; + setEnforcedelay(value: number): SetchannelRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetchannelRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SetchannelRequest, + ): SetchannelRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SetchannelRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SetchannelRequest; + static deserializeBinaryFromReader( + message: SetchannelRequest, + reader: jspb.BinaryReader, + ): SetchannelRequest; +} + +export namespace SetchannelRequest { + export type AsObject = { + id: string; + feebase?: cln_primitives_pb.Amount.AsObject; + feeppm?: number; + htlcmin?: cln_primitives_pb.Amount.AsObject; + htlcmax?: cln_primitives_pb.Amount.AsObject; + enforcedelay?: number; + }; +} + +export class SetchannelResponse extends jspb.Message { + clearChannelsList(): void; + getChannelsList(): Array; + setChannelsList(value: Array): SetchannelResponse; + addChannels(value?: SetchannelChannels, index?: number): SetchannelChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetchannelResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SetchannelResponse, + ): SetchannelResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SetchannelResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SetchannelResponse; + static deserializeBinaryFromReader( + message: SetchannelResponse, + reader: jspb.BinaryReader, + ): SetchannelResponse; +} + +export namespace SetchannelResponse { + export type AsObject = { + channelsList: Array; + }; +} + +export class SetchannelChannels extends jspb.Message { + getPeerId(): Uint8Array | string; + getPeerId_asU8(): Uint8Array; + getPeerId_asB64(): string; + setPeerId(value: Uint8Array | string): SetchannelChannels; + getChannelId(): Uint8Array | string; + getChannelId_asU8(): Uint8Array; + getChannelId_asB64(): string; + setChannelId(value: Uint8Array | string): SetchannelChannels; + + hasShortChannelId(): boolean; + clearShortChannelId(): void; + getShortChannelId(): string | undefined; + setShortChannelId(value: string): SetchannelChannels; + + hasFeeBaseMsat(): boolean; + clearFeeBaseMsat(): void; + getFeeBaseMsat(): cln_primitives_pb.Amount | undefined; + setFeeBaseMsat(value?: cln_primitives_pb.Amount): SetchannelChannels; + getFeeProportionalMillionths(): number; + setFeeProportionalMillionths(value: number): SetchannelChannels; + + hasMinimumHtlcOutMsat(): boolean; + clearMinimumHtlcOutMsat(): void; + getMinimumHtlcOutMsat(): cln_primitives_pb.Amount | undefined; + setMinimumHtlcOutMsat(value?: cln_primitives_pb.Amount): SetchannelChannels; + + hasWarningHtlcminTooLow(): boolean; + clearWarningHtlcminTooLow(): void; + getWarningHtlcminTooLow(): string | undefined; + setWarningHtlcminTooLow(value: string): SetchannelChannels; + + hasMaximumHtlcOutMsat(): boolean; + clearMaximumHtlcOutMsat(): void; + getMaximumHtlcOutMsat(): cln_primitives_pb.Amount | undefined; + setMaximumHtlcOutMsat(value?: cln_primitives_pb.Amount): SetchannelChannels; + + hasWarningHtlcmaxTooHigh(): boolean; + clearWarningHtlcmaxTooHigh(): void; + getWarningHtlcmaxTooHigh(): string | undefined; + setWarningHtlcmaxTooHigh(value: string): SetchannelChannels; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetchannelChannels.AsObject; + static toObject( + includeInstance: boolean, + msg: SetchannelChannels, + ): SetchannelChannels.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SetchannelChannels, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SetchannelChannels; + static deserializeBinaryFromReader( + message: SetchannelChannels, + reader: jspb.BinaryReader, + ): SetchannelChannels; +} + +export namespace SetchannelChannels { + export type AsObject = { + peerId: Uint8Array | string; + channelId: Uint8Array | string; + shortChannelId?: string; + feeBaseMsat?: cln_primitives_pb.Amount.AsObject; + feeProportionalMillionths: number; + minimumHtlcOutMsat?: cln_primitives_pb.Amount.AsObject; + warningHtlcminTooLow?: string; + maximumHtlcOutMsat?: cln_primitives_pb.Amount.AsObject; + warningHtlcmaxTooHigh?: string; + }; +} + +export class SigninvoiceRequest extends jspb.Message { + getInvstring(): string; + setInvstring(value: string): SigninvoiceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninvoiceRequest, + ): SigninvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SigninvoiceRequest; + static deserializeBinaryFromReader( + message: SigninvoiceRequest, + reader: jspb.BinaryReader, + ): SigninvoiceRequest; +} + +export namespace SigninvoiceRequest { + export type AsObject = { + invstring: string; + }; +} + +export class SigninvoiceResponse extends jspb.Message { + getBolt11(): string; + setBolt11(value: string): SigninvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninvoiceResponse, + ): SigninvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SigninvoiceResponse; + static deserializeBinaryFromReader( + message: SigninvoiceResponse, + reader: jspb.BinaryReader, + ): SigninvoiceResponse; +} + +export namespace SigninvoiceResponse { + export type AsObject = { + bolt11: string; + }; +} + +export class SignmessageRequest extends jspb.Message { + getMessage(): string; + setMessage(value: string): SignmessageRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignmessageRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SignmessageRequest, + ): SignmessageRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SignmessageRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SignmessageRequest; + static deserializeBinaryFromReader( + message: SignmessageRequest, + reader: jspb.BinaryReader, + ): SignmessageRequest; +} + +export namespace SignmessageRequest { + export type AsObject = { + message: string; + }; +} + +export class SignmessageResponse extends jspb.Message { + getSignature(): Uint8Array | string; + getSignature_asU8(): Uint8Array; + getSignature_asB64(): string; + setSignature(value: Uint8Array | string): SignmessageResponse; + getRecid(): Uint8Array | string; + getRecid_asU8(): Uint8Array; + getRecid_asB64(): string; + setRecid(value: Uint8Array | string): SignmessageResponse; + getZbase(): string; + setZbase(value: string): SignmessageResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SignmessageResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SignmessageResponse, + ): SignmessageResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SignmessageResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SignmessageResponse; + static deserializeBinaryFromReader( + message: SignmessageResponse, + reader: jspb.BinaryReader, + ): SignmessageResponse; +} + +export namespace SignmessageResponse { + export type AsObject = { + signature: Uint8Array | string; + recid: Uint8Array | string; + zbase: string; + }; +} + +export class StopRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: StopRequest, + ): StopRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: StopRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): StopRequest; + static deserializeBinaryFromReader( + message: StopRequest, + reader: jspb.BinaryReader, + ): StopRequest; +} + +export namespace StopRequest { + export type AsObject = {}; +} + +export class StopResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StopResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: StopResponse, + ): StopResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: StopResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): StopResponse; + static deserializeBinaryFromReader( + message: StopResponse, + reader: jspb.BinaryReader, + ): StopResponse; +} + +export namespace StopResponse { + export type AsObject = {}; +} diff --git a/lib/proto/cln/node_pb.js b/lib/proto/cln/node_pb.js new file mode 100644 index 000000000..09fadf60b --- /dev/null +++ b/lib/proto/cln/node_pb.js @@ -0,0 +1,62851 @@ +// source: cln/node.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var cln_primitives_pb = require('../cln/primitives_pb.js'); +goog.object.extend(proto, cln_primitives_pb); +goog.exportSymbol('proto.cln.AddgossipRequest', null, global); +goog.exportSymbol('proto.cln.AddgossipResponse', null, global); +goog.exportSymbol('proto.cln.AutocleaninvoiceRequest', null, global); +goog.exportSymbol('proto.cln.AutocleaninvoiceResponse', null, global); +goog.exportSymbol('proto.cln.CheckmessageRequest', null, global); +goog.exportSymbol('proto.cln.CheckmessageResponse', null, global); +goog.exportSymbol('proto.cln.CloseRequest', null, global); +goog.exportSymbol('proto.cln.CloseResponse', null, global); +goog.exportSymbol('proto.cln.CloseResponse.CloseType', null, global); +goog.exportSymbol('proto.cln.ConnectAddress', null, global); +goog.exportSymbol('proto.cln.ConnectAddress.ConnectAddressType', null, global); +goog.exportSymbol('proto.cln.ConnectRequest', null, global); +goog.exportSymbol('proto.cln.ConnectResponse', null, global); +goog.exportSymbol('proto.cln.ConnectResponse.ConnectDirection', null, global); +goog.exportSymbol('proto.cln.CreateinvoiceRequest', null, global); +goog.exportSymbol('proto.cln.CreateinvoiceResponse', null, global); +goog.exportSymbol('proto.cln.CreateinvoiceResponse.CreateinvoiceStatus', null, global); +goog.exportSymbol('proto.cln.CreateonionHops', null, global); +goog.exportSymbol('proto.cln.CreateonionRequest', null, global); +goog.exportSymbol('proto.cln.CreateonionResponse', null, global); +goog.exportSymbol('proto.cln.DatastoreRequest', null, global); +goog.exportSymbol('proto.cln.DatastoreRequest.DatastoreMode', null, global); +goog.exportSymbol('proto.cln.DatastoreResponse', null, global); +goog.exportSymbol('proto.cln.DecodeExtra', null, global); +goog.exportSymbol('proto.cln.DecodeFallbacks', null, global); +goog.exportSymbol('proto.cln.DecodeInvoice_fallbacks', null, global); +goog.exportSymbol('proto.cln.DecodeInvoice_pathsPath', null, global); +goog.exportSymbol('proto.cln.DecodeOffer_paths', null, global); +goog.exportSymbol('proto.cln.DecodeOffer_recurrencePaywindow', null, global); +goog.exportSymbol('proto.cln.DecodeRequest', null, global); +goog.exportSymbol('proto.cln.DecodeResponse', null, global); +goog.exportSymbol('proto.cln.DecodeResponse.DecodeType', null, global); +goog.exportSymbol('proto.cln.DecodeRestrictions', null, global); +goog.exportSymbol('proto.cln.DecodepayExtra', null, global); +goog.exportSymbol('proto.cln.DecodepayFallbacks', null, global); +goog.exportSymbol('proto.cln.DecodepayFallbacks.DecodepayFallbacksType', null, global); +goog.exportSymbol('proto.cln.DecodepayRequest', null, global); +goog.exportSymbol('proto.cln.DecodepayResponse', null, global); +goog.exportSymbol('proto.cln.DeldatastoreRequest', null, global); +goog.exportSymbol('proto.cln.DeldatastoreResponse', null, global); +goog.exportSymbol('proto.cln.DelexpiredinvoiceRequest', null, global); +goog.exportSymbol('proto.cln.DelexpiredinvoiceResponse', null, global); +goog.exportSymbol('proto.cln.DelinvoiceRequest', null, global); +goog.exportSymbol('proto.cln.DelinvoiceRequest.DelinvoiceStatus', null, global); +goog.exportSymbol('proto.cln.DelinvoiceResponse', null, global); +goog.exportSymbol('proto.cln.DelinvoiceResponse.DelinvoiceStatus', null, global); +goog.exportSymbol('proto.cln.DisconnectRequest', null, global); +goog.exportSymbol('proto.cln.DisconnectResponse', null, global); +goog.exportSymbol('proto.cln.FeeratesOnchain_fee_estimates', null, global); +goog.exportSymbol('proto.cln.FeeratesPerkb', null, global); +goog.exportSymbol('proto.cln.FeeratesPerkbEstimates', null, global); +goog.exportSymbol('proto.cln.FeeratesPerkw', null, global); +goog.exportSymbol('proto.cln.FeeratesPerkwEstimates', null, global); +goog.exportSymbol('proto.cln.FeeratesRequest', null, global); +goog.exportSymbol('proto.cln.FeeratesRequest.FeeratesStyle', null, global); +goog.exportSymbol('proto.cln.FeeratesResponse', null, global); +goog.exportSymbol('proto.cln.FundchannelRequest', null, global); +goog.exportSymbol('proto.cln.FundchannelResponse', null, global); +goog.exportSymbol('proto.cln.FundpsbtRequest', null, global); +goog.exportSymbol('proto.cln.FundpsbtReservations', null, global); +goog.exportSymbol('proto.cln.FundpsbtResponse', null, global); +goog.exportSymbol('proto.cln.GetinfoAddress', null, global); +goog.exportSymbol('proto.cln.GetinfoAddress.GetinfoAddressType', null, global); +goog.exportSymbol('proto.cln.GetinfoBinding', null, global); +goog.exportSymbol('proto.cln.GetinfoBinding.GetinfoBindingType', null, global); +goog.exportSymbol('proto.cln.GetinfoOur_features', null, global); +goog.exportSymbol('proto.cln.GetinfoRequest', null, global); +goog.exportSymbol('proto.cln.GetinfoResponse', null, global); +goog.exportSymbol('proto.cln.GetrouteRequest', null, global); +goog.exportSymbol('proto.cln.GetrouteResponse', null, global); +goog.exportSymbol('proto.cln.GetrouteRoute', null, global); +goog.exportSymbol('proto.cln.GetrouteRoute.GetrouteRouteStyle', null, global); +goog.exportSymbol('proto.cln.InvoiceRequest', null, global); +goog.exportSymbol('proto.cln.InvoiceResponse', null, global); +goog.exportSymbol('proto.cln.KeysendRequest', null, global); +goog.exportSymbol('proto.cln.KeysendResponse', null, global); +goog.exportSymbol('proto.cln.KeysendResponse.KeysendStatus', null, global); +goog.exportSymbol('proto.cln.ListchannelsChannels', null, global); +goog.exportSymbol('proto.cln.ListchannelsRequest', null, global); +goog.exportSymbol('proto.cln.ListchannelsResponse', null, global); +goog.exportSymbol('proto.cln.ListclosedchannelsClosedchannels', null, global); +goog.exportSymbol('proto.cln.ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause', null, global); +goog.exportSymbol('proto.cln.ListclosedchannelsClosedchannelsAlias', null, global); +goog.exportSymbol('proto.cln.ListclosedchannelsRequest', null, global); +goog.exportSymbol('proto.cln.ListclosedchannelsResponse', null, global); +goog.exportSymbol('proto.cln.ListdatastoreDatastore', null, global); +goog.exportSymbol('proto.cln.ListdatastoreRequest', null, global); +goog.exportSymbol('proto.cln.ListdatastoreResponse', null, global); +goog.exportSymbol('proto.cln.ListforwardsForwards', null, global); +goog.exportSymbol('proto.cln.ListforwardsForwards.ListforwardsForwardsStatus', null, global); +goog.exportSymbol('proto.cln.ListforwardsForwards.ListforwardsForwardsStyle', null, global); +goog.exportSymbol('proto.cln.ListforwardsRequest', null, global); +goog.exportSymbol('proto.cln.ListforwardsRequest.ListforwardsStatus', null, global); +goog.exportSymbol('proto.cln.ListforwardsResponse', null, global); +goog.exportSymbol('proto.cln.ListfundsChannels', null, global); +goog.exportSymbol('proto.cln.ListfundsOutputs', null, global); +goog.exportSymbol('proto.cln.ListfundsOutputs.ListfundsOutputsStatus', null, global); +goog.exportSymbol('proto.cln.ListfundsRequest', null, global); +goog.exportSymbol('proto.cln.ListfundsResponse', null, global); +goog.exportSymbol('proto.cln.ListinvoicesInvoices', null, global); +goog.exportSymbol('proto.cln.ListinvoicesInvoices.ListinvoicesInvoicesStatus', null, global); +goog.exportSymbol('proto.cln.ListinvoicesRequest', null, global); +goog.exportSymbol('proto.cln.ListinvoicesResponse', null, global); +goog.exportSymbol('proto.cln.ListnodesNodes', null, global); +goog.exportSymbol('proto.cln.ListnodesNodesAddresses', null, global); +goog.exportSymbol('proto.cln.ListnodesNodesAddresses.ListnodesNodesAddressesType', null, global); +goog.exportSymbol('proto.cln.ListnodesRequest', null, global); +goog.exportSymbol('proto.cln.ListnodesResponse', null, global); +goog.exportSymbol('proto.cln.ListpaysPays', null, global); +goog.exportSymbol('proto.cln.ListpaysPays.ListpaysPaysStatus', null, global); +goog.exportSymbol('proto.cln.ListpaysRequest', null, global); +goog.exportSymbol('proto.cln.ListpaysRequest.ListpaysStatus', null, global); +goog.exportSymbol('proto.cln.ListpaysResponse', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannels', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannelsAlias', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannelsFeerate', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannelsFunding', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannelsHtlcs', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsChannelsInflight', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsRequest', null, global); +goog.exportSymbol('proto.cln.ListpeerchannelsResponse', null, global); +goog.exportSymbol('proto.cln.ListpeersPeers', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannels', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannels.ListpeersPeersChannelsState', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannelsAlias', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannelsFeerate', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannelsFunding', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannelsHtlcs', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersChannelsInflight', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersLog', null, global); +goog.exportSymbol('proto.cln.ListpeersPeersLog.ListpeersPeersLogType', null, global); +goog.exportSymbol('proto.cln.ListpeersRequest', null, global); +goog.exportSymbol('proto.cln.ListpeersResponse', null, global); +goog.exportSymbol('proto.cln.ListsendpaysPayments', null, global); +goog.exportSymbol('proto.cln.ListsendpaysPayments.ListsendpaysPaymentsStatus', null, global); +goog.exportSymbol('proto.cln.ListsendpaysRequest', null, global); +goog.exportSymbol('proto.cln.ListsendpaysRequest.ListsendpaysStatus', null, global); +goog.exportSymbol('proto.cln.ListsendpaysResponse', null, global); +goog.exportSymbol('proto.cln.ListtransactionsRequest', null, global); +goog.exportSymbol('proto.cln.ListtransactionsResponse', null, global); +goog.exportSymbol('proto.cln.ListtransactionsTransactions', null, global); +goog.exportSymbol('proto.cln.ListtransactionsTransactionsInputs', null, global); +goog.exportSymbol('proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType', null, global); +goog.exportSymbol('proto.cln.ListtransactionsTransactionsOutputs', null, global); +goog.exportSymbol('proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType', null, global); +goog.exportSymbol('proto.cln.NewaddrRequest', null, global); +goog.exportSymbol('proto.cln.NewaddrRequest.NewaddrAddresstype', null, global); +goog.exportSymbol('proto.cln.NewaddrResponse', null, global); +goog.exportSymbol('proto.cln.PayRequest', null, global); +goog.exportSymbol('proto.cln.PayResponse', null, global); +goog.exportSymbol('proto.cln.PayResponse.PayStatus', null, global); +goog.exportSymbol('proto.cln.PingRequest', null, global); +goog.exportSymbol('proto.cln.PingResponse', null, global); +goog.exportSymbol('proto.cln.SendcustommsgRequest', null, global); +goog.exportSymbol('proto.cln.SendcustommsgResponse', null, global); +goog.exportSymbol('proto.cln.SendonionFirst_hop', null, global); +goog.exportSymbol('proto.cln.SendonionRequest', null, global); +goog.exportSymbol('proto.cln.SendonionResponse', null, global); +goog.exportSymbol('proto.cln.SendonionResponse.SendonionStatus', null, global); +goog.exportSymbol('proto.cln.SendpayRequest', null, global); +goog.exportSymbol('proto.cln.SendpayResponse', null, global); +goog.exportSymbol('proto.cln.SendpayResponse.SendpayStatus', null, global); +goog.exportSymbol('proto.cln.SendpayRoute', null, global); +goog.exportSymbol('proto.cln.SendpsbtRequest', null, global); +goog.exportSymbol('proto.cln.SendpsbtResponse', null, global); +goog.exportSymbol('proto.cln.SetchannelChannels', null, global); +goog.exportSymbol('proto.cln.SetchannelRequest', null, global); +goog.exportSymbol('proto.cln.SetchannelResponse', null, global); +goog.exportSymbol('proto.cln.SigninvoiceRequest', null, global); +goog.exportSymbol('proto.cln.SigninvoiceResponse', null, global); +goog.exportSymbol('proto.cln.SignmessageRequest', null, global); +goog.exportSymbol('proto.cln.SignmessageResponse', null, global); +goog.exportSymbol('proto.cln.SignpsbtRequest', null, global); +goog.exportSymbol('proto.cln.SignpsbtResponse', null, global); +goog.exportSymbol('proto.cln.StopRequest', null, global); +goog.exportSymbol('proto.cln.StopResponse', null, global); +goog.exportSymbol('proto.cln.TxdiscardRequest', null, global); +goog.exportSymbol('proto.cln.TxdiscardResponse', null, global); +goog.exportSymbol('proto.cln.TxprepareRequest', null, global); +goog.exportSymbol('proto.cln.TxprepareResponse', null, global); +goog.exportSymbol('proto.cln.TxsendRequest', null, global); +goog.exportSymbol('proto.cln.TxsendResponse', null, global); +goog.exportSymbol('proto.cln.UtxopsbtRequest', null, global); +goog.exportSymbol('proto.cln.UtxopsbtReservations', null, global); +goog.exportSymbol('proto.cln.UtxopsbtResponse', null, global); +goog.exportSymbol('proto.cln.WaitanyinvoiceRequest', null, global); +goog.exportSymbol('proto.cln.WaitanyinvoiceResponse', null, global); +goog.exportSymbol('proto.cln.WaitanyinvoiceResponse.WaitanyinvoiceStatus', null, global); +goog.exportSymbol('proto.cln.WaitinvoiceRequest', null, global); +goog.exportSymbol('proto.cln.WaitinvoiceResponse', null, global); +goog.exportSymbol('proto.cln.WaitinvoiceResponse.WaitinvoiceStatus', null, global); +goog.exportSymbol('proto.cln.WaitsendpayRequest', null, global); +goog.exportSymbol('proto.cln.WaitsendpayResponse', null, global); +goog.exportSymbol('proto.cln.WaitsendpayResponse.WaitsendpayStatus', null, global); +goog.exportSymbol('proto.cln.WithdrawRequest', null, global); +goog.exportSymbol('proto.cln.WithdrawResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetinfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.GetinfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetinfoRequest.displayName = 'proto.cln.GetinfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetinfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.GetinfoResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.GetinfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetinfoResponse.displayName = 'proto.cln.GetinfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetinfoOur_features = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.GetinfoOur_features, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetinfoOur_features.displayName = 'proto.cln.GetinfoOur_features'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetinfoAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.GetinfoAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetinfoAddress.displayName = 'proto.cln.GetinfoAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetinfoBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.GetinfoBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetinfoBinding.displayName = 'proto.cln.GetinfoBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersRequest.displayName = 'proto.cln.ListpeersRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListpeersResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListpeersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersResponse.displayName = 'proto.cln.ListpeersResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeers = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListpeersPeers.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListpeersPeers, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeers.displayName = 'proto.cln.ListpeersPeers'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersLog = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersPeersLog, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersLog.displayName = 'proto.cln.ListpeersPeersLog'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersChannels = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListpeersPeersChannels.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListpeersPeersChannels, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersChannels.displayName = 'proto.cln.ListpeersPeersChannels'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersChannelsFeerate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersPeersChannelsFeerate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersChannelsFeerate.displayName = 'proto.cln.ListpeersPeersChannelsFeerate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersChannelsInflight = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersPeersChannelsInflight, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersChannelsInflight.displayName = 'proto.cln.ListpeersPeersChannelsInflight'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersChannelsFunding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersPeersChannelsFunding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersChannelsFunding.displayName = 'proto.cln.ListpeersPeersChannelsFunding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersChannelsAlias = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersPeersChannelsAlias, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersChannelsAlias.displayName = 'proto.cln.ListpeersPeersChannelsAlias'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeersPeersChannelsHtlcs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeersPeersChannelsHtlcs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeersPeersChannelsHtlcs.displayName = 'proto.cln.ListpeersPeersChannelsHtlcs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListfundsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListfundsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListfundsRequest.displayName = 'proto.cln.ListfundsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListfundsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListfundsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListfundsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListfundsResponse.displayName = 'proto.cln.ListfundsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListfundsOutputs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListfundsOutputs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListfundsOutputs.displayName = 'proto.cln.ListfundsOutputs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListfundsChannels = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListfundsChannels, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListfundsChannels.displayName = 'proto.cln.ListfundsChannels'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendpayRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.SendpayRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.SendpayRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendpayRequest.displayName = 'proto.cln.SendpayRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendpayResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendpayResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendpayResponse.displayName = 'proto.cln.SendpayResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendpayRoute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendpayRoute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendpayRoute.displayName = 'proto.cln.SendpayRoute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListchannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListchannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListchannelsRequest.displayName = 'proto.cln.ListchannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListchannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListchannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListchannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListchannelsResponse.displayName = 'proto.cln.ListchannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListchannelsChannels = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListchannelsChannels, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListchannelsChannels.displayName = 'proto.cln.ListchannelsChannels'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.AddgossipRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.AddgossipRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.AddgossipRequest.displayName = 'proto.cln.AddgossipRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.AddgossipResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.AddgossipResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.AddgossipResponse.displayName = 'proto.cln.AddgossipResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.AutocleaninvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.AutocleaninvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.AutocleaninvoiceRequest.displayName = 'proto.cln.AutocleaninvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.AutocleaninvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.AutocleaninvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.AutocleaninvoiceResponse.displayName = 'proto.cln.AutocleaninvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CheckmessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.CheckmessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CheckmessageRequest.displayName = 'proto.cln.CheckmessageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CheckmessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.CheckmessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CheckmessageResponse.displayName = 'proto.cln.CheckmessageResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CloseRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.CloseRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.CloseRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CloseRequest.displayName = 'proto.cln.CloseRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CloseResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.CloseResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CloseResponse.displayName = 'proto.cln.CloseResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ConnectRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ConnectRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ConnectRequest.displayName = 'proto.cln.ConnectRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ConnectResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ConnectResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ConnectResponse.displayName = 'proto.cln.ConnectResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ConnectAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ConnectAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ConnectAddress.displayName = 'proto.cln.ConnectAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CreateinvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.CreateinvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CreateinvoiceRequest.displayName = 'proto.cln.CreateinvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CreateinvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.CreateinvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CreateinvoiceResponse.displayName = 'proto.cln.CreateinvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DatastoreRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DatastoreRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.DatastoreRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DatastoreRequest.displayName = 'proto.cln.DatastoreRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DatastoreResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DatastoreResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.DatastoreResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DatastoreResponse.displayName = 'proto.cln.DatastoreResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CreateonionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.CreateonionRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.CreateonionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CreateonionRequest.displayName = 'proto.cln.CreateonionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CreateonionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.CreateonionResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.CreateonionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CreateonionResponse.displayName = 'proto.cln.CreateonionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.CreateonionHops = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.CreateonionHops, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.CreateonionHops.displayName = 'proto.cln.CreateonionHops'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DeldatastoreRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DeldatastoreRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.DeldatastoreRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DeldatastoreRequest.displayName = 'proto.cln.DeldatastoreRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DeldatastoreResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DeldatastoreResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.DeldatastoreResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DeldatastoreResponse.displayName = 'proto.cln.DeldatastoreResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DelexpiredinvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DelexpiredinvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DelexpiredinvoiceRequest.displayName = 'proto.cln.DelexpiredinvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DelexpiredinvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DelexpiredinvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DelexpiredinvoiceResponse.displayName = 'proto.cln.DelexpiredinvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DelinvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DelinvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DelinvoiceRequest.displayName = 'proto.cln.DelinvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DelinvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DelinvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DelinvoiceResponse.displayName = 'proto.cln.DelinvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.InvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.InvoiceRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.InvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.InvoiceRequest.displayName = 'proto.cln.InvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.InvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.InvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.InvoiceResponse.displayName = 'proto.cln.InvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListdatastoreRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListdatastoreRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListdatastoreRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListdatastoreRequest.displayName = 'proto.cln.ListdatastoreRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListdatastoreResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListdatastoreResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListdatastoreResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListdatastoreResponse.displayName = 'proto.cln.ListdatastoreResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListdatastoreDatastore = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListdatastoreDatastore.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListdatastoreDatastore, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListdatastoreDatastore.displayName = 'proto.cln.ListdatastoreDatastore'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListinvoicesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListinvoicesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListinvoicesRequest.displayName = 'proto.cln.ListinvoicesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListinvoicesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListinvoicesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListinvoicesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListinvoicesResponse.displayName = 'proto.cln.ListinvoicesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListinvoicesInvoices = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListinvoicesInvoices, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListinvoicesInvoices.displayName = 'proto.cln.ListinvoicesInvoices'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendonionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.SendonionRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.SendonionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendonionRequest.displayName = 'proto.cln.SendonionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendonionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendonionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendonionResponse.displayName = 'proto.cln.SendonionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendonionFirst_hop = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendonionFirst_hop, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendonionFirst_hop.displayName = 'proto.cln.SendonionFirst_hop'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListsendpaysRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListsendpaysRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListsendpaysRequest.displayName = 'proto.cln.ListsendpaysRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListsendpaysResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListsendpaysResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListsendpaysResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListsendpaysResponse.displayName = 'proto.cln.ListsendpaysResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListsendpaysPayments = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListsendpaysPayments, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListsendpaysPayments.displayName = 'proto.cln.ListsendpaysPayments'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListtransactionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListtransactionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListtransactionsRequest.displayName = 'proto.cln.ListtransactionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListtransactionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListtransactionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListtransactionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListtransactionsResponse.displayName = 'proto.cln.ListtransactionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListtransactionsTransactions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListtransactionsTransactions.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListtransactionsTransactions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListtransactionsTransactions.displayName = 'proto.cln.ListtransactionsTransactions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListtransactionsTransactionsInputs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListtransactionsTransactionsInputs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListtransactionsTransactionsInputs.displayName = 'proto.cln.ListtransactionsTransactionsInputs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListtransactionsTransactionsOutputs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListtransactionsTransactionsOutputs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListtransactionsTransactionsOutputs.displayName = 'proto.cln.ListtransactionsTransactionsOutputs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.PayRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.PayRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.PayRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.PayRequest.displayName = 'proto.cln.PayRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.PayResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.PayResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.PayResponse.displayName = 'proto.cln.PayResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListnodesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListnodesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListnodesRequest.displayName = 'proto.cln.ListnodesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListnodesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListnodesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListnodesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListnodesResponse.displayName = 'proto.cln.ListnodesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListnodesNodes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListnodesNodes.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListnodesNodes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListnodesNodes.displayName = 'proto.cln.ListnodesNodes'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListnodesNodesAddresses = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListnodesNodesAddresses, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListnodesNodesAddresses.displayName = 'proto.cln.ListnodesNodesAddresses'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WaitanyinvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WaitanyinvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WaitanyinvoiceRequest.displayName = 'proto.cln.WaitanyinvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WaitanyinvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WaitanyinvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WaitanyinvoiceResponse.displayName = 'proto.cln.WaitanyinvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WaitinvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WaitinvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WaitinvoiceRequest.displayName = 'proto.cln.WaitinvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WaitinvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WaitinvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WaitinvoiceResponse.displayName = 'proto.cln.WaitinvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WaitsendpayRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WaitsendpayRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WaitsendpayRequest.displayName = 'proto.cln.WaitsendpayRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WaitsendpayResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WaitsendpayResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WaitsendpayResponse.displayName = 'proto.cln.WaitsendpayResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.NewaddrRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.NewaddrRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.NewaddrRequest.displayName = 'proto.cln.NewaddrRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.NewaddrResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.NewaddrResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.NewaddrResponse.displayName = 'proto.cln.NewaddrResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WithdrawRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.WithdrawRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.WithdrawRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WithdrawRequest.displayName = 'proto.cln.WithdrawRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.WithdrawResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.WithdrawResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.WithdrawResponse.displayName = 'proto.cln.WithdrawResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.KeysendRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.KeysendRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.KeysendRequest.displayName = 'proto.cln.KeysendRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.KeysendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.KeysendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.KeysendResponse.displayName = 'proto.cln.KeysendResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FundpsbtRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FundpsbtRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FundpsbtRequest.displayName = 'proto.cln.FundpsbtRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FundpsbtResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.FundpsbtResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.FundpsbtResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FundpsbtResponse.displayName = 'proto.cln.FundpsbtResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FundpsbtReservations = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FundpsbtReservations, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FundpsbtReservations.displayName = 'proto.cln.FundpsbtReservations'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendpsbtRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendpsbtRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendpsbtRequest.displayName = 'proto.cln.SendpsbtRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendpsbtResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendpsbtResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendpsbtResponse.displayName = 'proto.cln.SendpsbtResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SignpsbtRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.SignpsbtRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.SignpsbtRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SignpsbtRequest.displayName = 'proto.cln.SignpsbtRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SignpsbtResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SignpsbtResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SignpsbtResponse.displayName = 'proto.cln.SignpsbtResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.UtxopsbtRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.UtxopsbtRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.UtxopsbtRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.UtxopsbtRequest.displayName = 'proto.cln.UtxopsbtRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.UtxopsbtResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.UtxopsbtResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.UtxopsbtResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.UtxopsbtResponse.displayName = 'proto.cln.UtxopsbtResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.UtxopsbtReservations = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.UtxopsbtReservations, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.UtxopsbtReservations.displayName = 'proto.cln.UtxopsbtReservations'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TxdiscardRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.TxdiscardRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TxdiscardRequest.displayName = 'proto.cln.TxdiscardRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TxdiscardResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.TxdiscardResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TxdiscardResponse.displayName = 'proto.cln.TxdiscardResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TxprepareRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.TxprepareRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.TxprepareRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TxprepareRequest.displayName = 'proto.cln.TxprepareRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TxprepareResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.TxprepareResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TxprepareResponse.displayName = 'proto.cln.TxprepareResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TxsendRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.TxsendRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TxsendRequest.displayName = 'proto.cln.TxsendRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TxsendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.TxsendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TxsendResponse.displayName = 'proto.cln.TxsendResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeerchannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsRequest.displayName = 'proto.cln.ListpeerchannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListpeerchannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListpeerchannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsResponse.displayName = 'proto.cln.ListpeerchannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsChannels = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListpeerchannelsChannels.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListpeerchannelsChannels, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsChannels.displayName = 'proto.cln.ListpeerchannelsChannels'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsChannelsFeerate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeerchannelsChannelsFeerate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsChannelsFeerate.displayName = 'proto.cln.ListpeerchannelsChannelsFeerate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsChannelsInflight = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeerchannelsChannelsInflight, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsChannelsInflight.displayName = 'proto.cln.ListpeerchannelsChannelsInflight'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsChannelsFunding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeerchannelsChannelsFunding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsChannelsFunding.displayName = 'proto.cln.ListpeerchannelsChannelsFunding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsChannelsAlias = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeerchannelsChannelsAlias, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsChannelsAlias.displayName = 'proto.cln.ListpeerchannelsChannelsAlias'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpeerchannelsChannelsHtlcs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpeerchannelsChannelsHtlcs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpeerchannelsChannelsHtlcs.displayName = 'proto.cln.ListpeerchannelsChannelsHtlcs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListclosedchannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListclosedchannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListclosedchannelsRequest.displayName = 'proto.cln.ListclosedchannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListclosedchannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListclosedchannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListclosedchannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListclosedchannelsResponse.displayName = 'proto.cln.ListclosedchannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListclosedchannelsClosedchannels = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListclosedchannelsClosedchannels, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListclosedchannelsClosedchannels.displayName = 'proto.cln.ListclosedchannelsClosedchannels'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListclosedchannelsClosedchannelsAlias = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListclosedchannelsClosedchannelsAlias, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListclosedchannelsClosedchannelsAlias.displayName = 'proto.cln.ListclosedchannelsClosedchannelsAlias'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodepayRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodepayRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodepayRequest.displayName = 'proto.cln.DecodepayRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodepayResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DecodepayResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.DecodepayResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodepayResponse.displayName = 'proto.cln.DecodepayResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodepayFallbacks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodepayFallbacks, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodepayFallbacks.displayName = 'proto.cln.DecodepayFallbacks'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodepayExtra = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodepayExtra, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodepayExtra.displayName = 'proto.cln.DecodepayExtra'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeRequest.displayName = 'proto.cln.DecodeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DecodeResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.DecodeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeResponse.displayName = 'proto.cln.DecodeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeOffer_paths = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeOffer_paths, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeOffer_paths.displayName = 'proto.cln.DecodeOffer_paths'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeOffer_recurrencePaywindow = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeOffer_recurrencePaywindow, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeOffer_recurrencePaywindow.displayName = 'proto.cln.DecodeOffer_recurrencePaywindow'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeInvoice_pathsPath = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeInvoice_pathsPath, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeInvoice_pathsPath.displayName = 'proto.cln.DecodeInvoice_pathsPath'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeInvoice_fallbacks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeInvoice_fallbacks, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeInvoice_fallbacks.displayName = 'proto.cln.DecodeInvoice_fallbacks'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeFallbacks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeFallbacks, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeFallbacks.displayName = 'proto.cln.DecodeFallbacks'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeExtra = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DecodeExtra, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeExtra.displayName = 'proto.cln.DecodeExtra'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DecodeRestrictions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.DecodeRestrictions.repeatedFields_, null); +}; +goog.inherits(proto.cln.DecodeRestrictions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DecodeRestrictions.displayName = 'proto.cln.DecodeRestrictions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DisconnectRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DisconnectRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DisconnectRequest.displayName = 'proto.cln.DisconnectRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.DisconnectResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.DisconnectResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.DisconnectResponse.displayName = 'proto.cln.DisconnectResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FeeratesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesRequest.displayName = 'proto.cln.FeeratesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FeeratesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesResponse.displayName = 'proto.cln.FeeratesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesPerkb = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.FeeratesPerkb.repeatedFields_, null); +}; +goog.inherits(proto.cln.FeeratesPerkb, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesPerkb.displayName = 'proto.cln.FeeratesPerkb'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesPerkbEstimates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FeeratesPerkbEstimates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesPerkbEstimates.displayName = 'proto.cln.FeeratesPerkbEstimates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesPerkw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.FeeratesPerkw.repeatedFields_, null); +}; +goog.inherits(proto.cln.FeeratesPerkw, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesPerkw.displayName = 'proto.cln.FeeratesPerkw'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesPerkwEstimates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FeeratesPerkwEstimates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesPerkwEstimates.displayName = 'proto.cln.FeeratesPerkwEstimates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FeeratesOnchain_fee_estimates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FeeratesOnchain_fee_estimates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FeeratesOnchain_fee_estimates.displayName = 'proto.cln.FeeratesOnchain_fee_estimates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FundchannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.FundchannelRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.FundchannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FundchannelRequest.displayName = 'proto.cln.FundchannelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.FundchannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.FundchannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.FundchannelResponse.displayName = 'proto.cln.FundchannelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetrouteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.GetrouteRequest.repeatedFields_, null); +}; +goog.inherits(proto.cln.GetrouteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetrouteRequest.displayName = 'proto.cln.GetrouteRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetrouteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.GetrouteResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.GetrouteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetrouteResponse.displayName = 'proto.cln.GetrouteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.GetrouteRoute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.GetrouteRoute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.GetrouteRoute.displayName = 'proto.cln.GetrouteRoute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListforwardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListforwardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListforwardsRequest.displayName = 'proto.cln.ListforwardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListforwardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListforwardsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListforwardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListforwardsResponse.displayName = 'proto.cln.ListforwardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListforwardsForwards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListforwardsForwards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListforwardsForwards.displayName = 'proto.cln.ListforwardsForwards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpaysRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpaysRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpaysRequest.displayName = 'proto.cln.ListpaysRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpaysResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.ListpaysResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.ListpaysResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpaysResponse.displayName = 'proto.cln.ListpaysResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ListpaysPays = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ListpaysPays, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ListpaysPays.displayName = 'proto.cln.ListpaysPays'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.PingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.PingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.PingRequest.displayName = 'proto.cln.PingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.PingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.PingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.PingResponse.displayName = 'proto.cln.PingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendcustommsgRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendcustommsgRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendcustommsgRequest.displayName = 'proto.cln.SendcustommsgRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SendcustommsgResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SendcustommsgResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SendcustommsgResponse.displayName = 'proto.cln.SendcustommsgResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SetchannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SetchannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SetchannelRequest.displayName = 'proto.cln.SetchannelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SetchannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.SetchannelResponse.repeatedFields_, null); +}; +goog.inherits(proto.cln.SetchannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SetchannelResponse.displayName = 'proto.cln.SetchannelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SetchannelChannels = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SetchannelChannels, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SetchannelChannels.displayName = 'proto.cln.SetchannelChannels'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SigninvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SigninvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SigninvoiceRequest.displayName = 'proto.cln.SigninvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SigninvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SigninvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SigninvoiceResponse.displayName = 'proto.cln.SigninvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SignmessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SignmessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SignmessageRequest.displayName = 'proto.cln.SignmessageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.SignmessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.SignmessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.SignmessageResponse.displayName = 'proto.cln.SignmessageResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.StopRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.StopRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.StopRequest.displayName = 'proto.cln.StopRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.StopResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.StopResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.StopResponse.displayName = 'proto.cln.StopResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.GetinfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetinfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetinfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.GetinfoRequest} + */ +proto.cln.GetinfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetinfoRequest; + return proto.cln.GetinfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetinfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetinfoRequest} + */ +proto.cln.GetinfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetinfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetinfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetinfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.GetinfoResponse.repeatedFields_ = [14,15]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.GetinfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetinfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetinfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + alias: jspb.Message.getFieldWithDefault(msg, 2, ""), + color: msg.getColor_asB64(), + numPeers: jspb.Message.getFieldWithDefault(msg, 4, 0), + numPendingChannels: jspb.Message.getFieldWithDefault(msg, 5, 0), + numActiveChannels: jspb.Message.getFieldWithDefault(msg, 6, 0), + numInactiveChannels: jspb.Message.getFieldWithDefault(msg, 7, 0), + version: jspb.Message.getFieldWithDefault(msg, 8, ""), + lightningDir: jspb.Message.getFieldWithDefault(msg, 9, ""), + ourFeatures: (f = msg.getOurFeatures()) && proto.cln.GetinfoOur_features.toObject(includeInstance, f), + blockheight: jspb.Message.getFieldWithDefault(msg, 11, 0), + network: jspb.Message.getFieldWithDefault(msg, 12, ""), + feesCollectedMsat: (f = msg.getFeesCollectedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + addressList: jspb.Message.toObjectList(msg.getAddressList(), + proto.cln.GetinfoAddress.toObject, includeInstance), + bindingList: jspb.Message.toObjectList(msg.getBindingList(), + proto.cln.GetinfoBinding.toObject, includeInstance), + warningBitcoindSync: jspb.Message.getFieldWithDefault(msg, 16, ""), + warningLightningdSync: jspb.Message.getFieldWithDefault(msg, 17, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.GetinfoResponse} + */ +proto.cln.GetinfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetinfoResponse; + return proto.cln.GetinfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetinfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetinfoResponse} + */ +proto.cln.GetinfoResponse.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setColor(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumPeers(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumPendingChannels(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumActiveChannels(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumInactiveChannels(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setLightningDir(value); + break; + case 10: + var value = new proto.cln.GetinfoOur_features; + reader.readMessage(value,proto.cln.GetinfoOur_features.deserializeBinaryFromReader); + msg.setOurFeatures(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockheight(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 13: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeesCollectedMsat(value); + break; + case 14: + var value = new proto.cln.GetinfoAddress; + reader.readMessage(value,proto.cln.GetinfoAddress.deserializeBinaryFromReader); + msg.addAddress(value); + break; + case 15: + var value = new proto.cln.GetinfoBinding; + reader.readMessage(value,proto.cln.GetinfoBinding.deserializeBinaryFromReader); + msg.addBinding(value); + break; + case 16: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningBitcoindSync(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningLightningdSync(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetinfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetinfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetinfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAlias(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getColor_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getNumPeers(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getNumPendingChannels(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getNumActiveChannels(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getNumInactiveChannels(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getLightningDir(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getOurFeatures(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.cln.GetinfoOur_features.serializeBinaryToWriter + ); + } + f = message.getBlockheight(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getFeesCollectedMsat(); + if (f != null) { + writer.writeMessage( + 13, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getAddressList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 14, + f, + proto.cln.GetinfoAddress.serializeBinaryToWriter + ); + } + f = message.getBindingList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 15, + f, + proto.cln.GetinfoBinding.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeString( + 16, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeString( + 17, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetinfoResponse.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.GetinfoResponse.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string alias = 2; + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setAlias = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes color = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetinfoResponse.prototype.getColor = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes color = 3; + * This is a type-conversion wrapper around `getColor()` + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getColor_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getColor())); +}; + + +/** + * optional bytes color = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getColor()` + * @return {!Uint8Array} + */ +proto.cln.GetinfoResponse.prototype.getColor_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getColor())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setColor = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint32 num_peers = 4; + * @return {number} + */ +proto.cln.GetinfoResponse.prototype.getNumPeers = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setNumPeers = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 num_pending_channels = 5; + * @return {number} + */ +proto.cln.GetinfoResponse.prototype.getNumPendingChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setNumPendingChannels = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint32 num_active_channels = 6; + * @return {number} + */ +proto.cln.GetinfoResponse.prototype.getNumActiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setNumActiveChannels = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint32 num_inactive_channels = 7; + * @return {number} + */ +proto.cln.GetinfoResponse.prototype.getNumInactiveChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setNumInactiveChannels = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional string version = 8; + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string lightning_dir = 9; + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getLightningDir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setLightningDir = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional GetinfoOur_features our_features = 10; + * @return {?proto.cln.GetinfoOur_features} + */ +proto.cln.GetinfoResponse.prototype.getOurFeatures = function() { + return /** @type{?proto.cln.GetinfoOur_features} */ ( + jspb.Message.getWrapperField(this, proto.cln.GetinfoOur_features, 10)); +}; + + +/** + * @param {?proto.cln.GetinfoOur_features|undefined} value + * @return {!proto.cln.GetinfoResponse} returns this +*/ +proto.cln.GetinfoResponse.prototype.setOurFeatures = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.clearOurFeatures = function() { + return this.setOurFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoResponse.prototype.hasOurFeatures = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional uint32 blockheight = 11; + * @return {number} + */ +proto.cln.GetinfoResponse.prototype.getBlockheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setBlockheight = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional string network = 12; + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setNetwork = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional Amount fees_collected_msat = 13; + * @return {?proto.cln.Amount} + */ +proto.cln.GetinfoResponse.prototype.getFeesCollectedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 13)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.GetinfoResponse} returns this +*/ +proto.cln.GetinfoResponse.prototype.setFeesCollectedMsat = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.clearFeesCollectedMsat = function() { + return this.setFeesCollectedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoResponse.prototype.hasFeesCollectedMsat = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * repeated GetinfoAddress address = 14; + * @return {!Array} + */ +proto.cln.GetinfoResponse.prototype.getAddressList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.GetinfoAddress, 14)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.GetinfoResponse} returns this +*/ +proto.cln.GetinfoResponse.prototype.setAddressList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 14, value); +}; + + +/** + * @param {!proto.cln.GetinfoAddress=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.GetinfoAddress} + */ +proto.cln.GetinfoResponse.prototype.addAddress = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.cln.GetinfoAddress, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.clearAddressList = function() { + return this.setAddressList([]); +}; + + +/** + * repeated GetinfoBinding binding = 15; + * @return {!Array} + */ +proto.cln.GetinfoResponse.prototype.getBindingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.GetinfoBinding, 15)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.GetinfoResponse} returns this +*/ +proto.cln.GetinfoResponse.prototype.setBindingList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 15, value); +}; + + +/** + * @param {!proto.cln.GetinfoBinding=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.GetinfoBinding} + */ +proto.cln.GetinfoResponse.prototype.addBinding = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.cln.GetinfoBinding, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.clearBindingList = function() { + return this.setBindingList([]); +}; + + +/** + * optional string warning_bitcoind_sync = 16; + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getWarningBitcoindSync = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setWarningBitcoindSync = function(value) { + return jspb.Message.setField(this, 16, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.clearWarningBitcoindSync = function() { + return jspb.Message.setField(this, 16, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoResponse.prototype.hasWarningBitcoindSync = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional string warning_lightningd_sync = 17; + * @return {string} + */ +proto.cln.GetinfoResponse.prototype.getWarningLightningdSync = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.setWarningLightningdSync = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetinfoResponse} returns this + */ +proto.cln.GetinfoResponse.prototype.clearWarningLightningdSync = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoResponse.prototype.hasWarningLightningdSync = function() { + return jspb.Message.getField(this, 17) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.GetinfoOur_features.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetinfoOur_features.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetinfoOur_features} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoOur_features.toObject = function(includeInstance, msg) { + var f, obj = { + init: msg.getInit_asB64(), + node: msg.getNode_asB64(), + channel: msg.getChannel_asB64(), + invoice: msg.getInvoice_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.cln.GetinfoOur_features} + */ +proto.cln.GetinfoOur_features.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetinfoOur_features; + return proto.cln.GetinfoOur_features.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetinfoOur_features} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetinfoOur_features} + */ +proto.cln.GetinfoOur_features.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.setInit(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNode(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannel(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvoice(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetinfoOur_features.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetinfoOur_features.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetinfoOur_features} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoOur_features.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInit_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getNode_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChannel_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getInvoice_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes init = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetinfoOur_features.prototype.getInit = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes init = 1; + * This is a type-conversion wrapper around `getInit()` + * @return {string} + */ +proto.cln.GetinfoOur_features.prototype.getInit_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInit())); +}; + + +/** + * optional bytes init = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInit()` + * @return {!Uint8Array} + */ +proto.cln.GetinfoOur_features.prototype.getInit_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInit())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetinfoOur_features} returns this + */ +proto.cln.GetinfoOur_features.prototype.setInit = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes node = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetinfoOur_features.prototype.getNode = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes node = 2; + * This is a type-conversion wrapper around `getNode()` + * @return {string} + */ +proto.cln.GetinfoOur_features.prototype.getNode_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNode())); +}; + + +/** + * optional bytes node = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNode()` + * @return {!Uint8Array} + */ +proto.cln.GetinfoOur_features.prototype.getNode_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNode())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetinfoOur_features} returns this + */ +proto.cln.GetinfoOur_features.prototype.setNode = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes channel = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetinfoOur_features.prototype.getChannel = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes channel = 3; + * This is a type-conversion wrapper around `getChannel()` + * @return {string} + */ +proto.cln.GetinfoOur_features.prototype.getChannel_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannel())); +}; + + +/** + * optional bytes channel = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannel()` + * @return {!Uint8Array} + */ +proto.cln.GetinfoOur_features.prototype.getChannel_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannel())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetinfoOur_features} returns this + */ +proto.cln.GetinfoOur_features.prototype.setChannel = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional bytes invoice = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetinfoOur_features.prototype.getInvoice = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes invoice = 4; + * This is a type-conversion wrapper around `getInvoice()` + * @return {string} + */ +proto.cln.GetinfoOur_features.prototype.getInvoice_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvoice())); +}; + + +/** + * optional bytes invoice = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvoice()` + * @return {!Uint8Array} + */ +proto.cln.GetinfoOur_features.prototype.getInvoice_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvoice())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetinfoOur_features} returns this + */ +proto.cln.GetinfoOur_features.prototype.setInvoice = 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.cln.GetinfoAddress.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetinfoAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetinfoAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoAddress.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + port: jspb.Message.getFieldWithDefault(msg, 2, 0), + address: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.GetinfoAddress} + */ +proto.cln.GetinfoAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetinfoAddress; + return proto.cln.GetinfoAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetinfoAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetinfoAddress} + */ +proto.cln.GetinfoAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.GetinfoAddress.GetinfoAddressType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPort(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetinfoAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetinfoAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetinfoAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.GetinfoAddress.GetinfoAddressType = { + DNS: 0, + IPV4: 1, + IPV6: 2, + TORV2: 3, + TORV3: 4, + WEBSOCKET: 5 +}; + +/** + * optional GetinfoAddressType item_type = 1; + * @return {!proto.cln.GetinfoAddress.GetinfoAddressType} + */ +proto.cln.GetinfoAddress.prototype.getItemType = function() { + return /** @type {!proto.cln.GetinfoAddress.GetinfoAddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.GetinfoAddress.GetinfoAddressType} value + * @return {!proto.cln.GetinfoAddress} returns this + */ +proto.cln.GetinfoAddress.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint32 port = 2; + * @return {number} + */ +proto.cln.GetinfoAddress.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoAddress} returns this + */ +proto.cln.GetinfoAddress.prototype.setPort = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.cln.GetinfoAddress.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoAddress} returns this + */ +proto.cln.GetinfoAddress.prototype.setAddress = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetinfoAddress} returns this + */ +proto.cln.GetinfoAddress.prototype.clearAddress = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoAddress.prototype.hasAddress = 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.cln.GetinfoBinding.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetinfoBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetinfoBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoBinding.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + port: jspb.Message.getFieldWithDefault(msg, 3, 0), + socket: 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.cln.GetinfoBinding} + */ +proto.cln.GetinfoBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetinfoBinding; + return proto.cln.GetinfoBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetinfoBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetinfoBinding} + */ +proto.cln.GetinfoBinding.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.GetinfoBinding.GetinfoBindingType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPort(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSocket(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetinfoBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetinfoBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetinfoBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetinfoBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.GetinfoBinding.GetinfoBindingType = { + LOCAL_SOCKET: 0, + IPV4: 1, + IPV6: 2, + TORV2: 3, + TORV3: 4 +}; + +/** + * optional GetinfoBindingType item_type = 1; + * @return {!proto.cln.GetinfoBinding.GetinfoBindingType} + */ +proto.cln.GetinfoBinding.prototype.getItemType = function() { + return /** @type {!proto.cln.GetinfoBinding.GetinfoBindingType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.GetinfoBinding.GetinfoBindingType} value + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string address = 2; + * @return {string} + */ +proto.cln.GetinfoBinding.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.setAddress = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.clearAddress = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoBinding.prototype.hasAddress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 port = 3; + * @return {number} + */ +proto.cln.GetinfoBinding.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.setPort = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.clearPort = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoBinding.prototype.hasPort = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string socket = 4; + * @return {string} + */ +proto.cln.GetinfoBinding.prototype.getSocket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.setSocket = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetinfoBinding} returns this + */ +proto.cln.GetinfoBinding.prototype.clearSocket = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetinfoBinding.prototype.hasSocket = 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.cln.ListpeersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + level: 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.cln.ListpeersRequest} + */ +proto.cln.ListpeersRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersRequest; + return proto.cln.ListpeersRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersRequest} + */ +proto.cln.ListpeersRequest.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLevel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersRequest.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} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.ListpeersRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersRequest} returns this + */ +proto.cln.ListpeersRequest.prototype.setId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersRequest} returns this + */ +proto.cln.ListpeersRequest.prototype.clearId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersRequest.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string level = 2; + * @return {string} + */ +proto.cln.ListpeersRequest.prototype.getLevel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersRequest} returns this + */ +proto.cln.ListpeersRequest.prototype.setLevel = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersRequest} returns this + */ +proto.cln.ListpeersRequest.prototype.clearLevel = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersRequest.prototype.hasLevel = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListpeersResponse.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.cln.ListpeersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersResponse.toObject = function(includeInstance, msg) { + var f, obj = { + peersList: jspb.Message.toObjectList(msg.getPeersList(), + proto.cln.ListpeersPeers.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.cln.ListpeersResponse} + */ +proto.cln.ListpeersResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersResponse; + return proto.cln.ListpeersResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersResponse} + */ +proto.cln.ListpeersResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListpeersPeers; + reader.readMessage(value,proto.cln.ListpeersPeers.deserializeBinaryFromReader); + msg.addPeers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPeersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListpeersPeers.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListpeersPeers peers = 1; + * @return {!Array} + */ +proto.cln.ListpeersResponse.prototype.getPeersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeersPeers, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersResponse} returns this +*/ +proto.cln.ListpeersResponse.prototype.setPeersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListpeersPeers=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeers} + */ +proto.cln.ListpeersResponse.prototype.addPeers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListpeersPeers, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersResponse} returns this + */ +proto.cln.ListpeersResponse.prototype.clearPeersList = function() { + return this.setPeersList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListpeersPeers.repeatedFields_ = [3,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeersPeers.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeers.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeers} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeers.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + connected: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + numChannels: jspb.Message.getFieldWithDefault(msg, 8, 0), + logList: jspb.Message.toObjectList(msg.getLogList(), + proto.cln.ListpeersPeersLog.toObject, includeInstance), + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.cln.ListpeersPeersChannels.toObject, includeInstance), + netaddrList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + remoteAddr: jspb.Message.getFieldWithDefault(msg, 7, ""), + features: msg.getFeatures_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.cln.ListpeersPeers} + */ +proto.cln.ListpeersPeers.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeers; + return proto.cln.ListpeersPeers.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeers} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeers} + */ +proto.cln.ListpeersPeers.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.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setConnected(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumChannels(value); + break; + case 3: + var value = new proto.cln.ListpeersPeersLog; + reader.readMessage(value,proto.cln.ListpeersPeersLog.deserializeBinaryFromReader); + msg.addLog(value); + break; + case 4: + var value = new proto.cln.ListpeersPeersChannels; + reader.readMessage(value,proto.cln.ListpeersPeersChannels.deserializeBinaryFromReader); + msg.addChannels(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addNetaddr(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRemoteAddr(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFeatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeers.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeers.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeers} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeers.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getConnected(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } + f = message.getLogList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cln.ListpeersPeersLog.serializeBinaryToWriter + ); + } + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cln.ListpeersPeersChannels.serializeBinaryToWriter + ); + } + f = message.getNetaddrList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeers.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.ListpeersPeers.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeers.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool connected = 2; + * @return {boolean} + */ +proto.cln.ListpeersPeers.prototype.getConnected = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.setConnected = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional uint32 num_channels = 8; + * @return {number} + */ +proto.cln.ListpeersPeers.prototype.getNumChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.setNumChannels = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.clearNumChannels = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeers.prototype.hasNumChannels = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated ListpeersPeersLog log = 3; + * @return {!Array} + */ +proto.cln.ListpeersPeers.prototype.getLogList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeersPeersLog, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeers} returns this +*/ +proto.cln.ListpeersPeers.prototype.setLogList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cln.ListpeersPeersLog=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeersLog} + */ +proto.cln.ListpeersPeers.prototype.addLog = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cln.ListpeersPeersLog, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.clearLogList = function() { + return this.setLogList([]); +}; + + +/** + * repeated ListpeersPeersChannels channels = 4; + * @return {!Array} + */ +proto.cln.ListpeersPeers.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeersPeersChannels, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeers} returns this +*/ +proto.cln.ListpeersPeers.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cln.ListpeersPeersChannels=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeersChannels} + */ +proto.cln.ListpeersPeers.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cln.ListpeersPeersChannels, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * repeated string netaddr = 5; + * @return {!Array} + */ +proto.cln.ListpeersPeers.prototype.getNetaddrList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.setNetaddrList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.addNetaddr = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.clearNetaddrList = function() { + return this.setNetaddrList([]); +}; + + +/** + * optional string remote_addr = 7; + * @return {string} + */ +proto.cln.ListpeersPeers.prototype.getRemoteAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.setRemoteAddr = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.clearRemoteAddr = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeers.prototype.hasRemoteAddr = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bytes features = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeers.prototype.getFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes features = 6; + * This is a type-conversion wrapper around `getFeatures()` + * @return {string} + */ +proto.cln.ListpeersPeers.prototype.getFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFeatures())); +}; + + +/** + * optional bytes features = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFeatures()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeers.prototype.getFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.setFeatures = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeers} returns this + */ +proto.cln.ListpeersPeers.prototype.clearFeatures = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeers.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeersPeersLog.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersLog.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersLog} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersLog.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + numSkipped: jspb.Message.getFieldWithDefault(msg, 2, 0), + time: jspb.Message.getFieldWithDefault(msg, 3, ""), + source: jspb.Message.getFieldWithDefault(msg, 4, ""), + log: jspb.Message.getFieldWithDefault(msg, 5, ""), + nodeId: msg.getNodeId_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.cln.ListpeersPeersLog} + */ +proto.cln.ListpeersPeersLog.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersLog; + return proto.cln.ListpeersPeersLog.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersLog} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersLog} + */ +proto.cln.ListpeersPeersLog.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ListpeersPeersLog.ListpeersPeersLogType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNumSkipped(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTime(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNodeId(value); + break; + case 7: + 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.cln.ListpeersPeersLog.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersLog.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersLog} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersLog.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 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|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpeersPeersLog.ListpeersPeersLogType = { + SKIPPED: 0, + BROKEN: 1, + UNUSUAL: 2, + INFO: 3, + DEBUG: 4, + IO_IN: 5, + IO_OUT: 6 +}; + +/** + * optional ListpeersPeersLogType item_type = 1; + * @return {!proto.cln.ListpeersPeersLog.ListpeersPeersLogType} + */ +proto.cln.ListpeersPeersLog.prototype.getItemType = function() { + return /** @type {!proto.cln.ListpeersPeersLog.ListpeersPeersLogType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ListpeersPeersLog.ListpeersPeersLogType} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint32 num_skipped = 2; + * @return {number} + */ +proto.cln.ListpeersPeersLog.prototype.getNumSkipped = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setNumSkipped = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.clearNumSkipped = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersLog.prototype.hasNumSkipped = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string time = 3; + * @return {string} + */ +proto.cln.ListpeersPeersLog.prototype.getTime = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setTime = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.clearTime = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersLog.prototype.hasTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string source = 4; + * @return {string} + */ +proto.cln.ListpeersPeersLog.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setSource = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.clearSource = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersLog.prototype.hasSource = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string log = 5; + * @return {string} + */ +proto.cln.ListpeersPeersLog.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setLog = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.clearLog = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersLog.prototype.hasLog = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes node_id = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersLog.prototype.getNodeId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes node_id = 6; + * This is a type-conversion wrapper around `getNodeId()` + * @return {string} + */ +proto.cln.ListpeersPeersLog.prototype.getNodeId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodeId())); +}; + + +/** + * optional bytes node_id = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodeId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersLog.prototype.getNodeId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodeId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setNodeId = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.clearNodeId = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersLog.prototype.hasNodeId = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes data = 7; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersLog.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes data = 7; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.cln.ListpeersPeersLog.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 7; + * 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.cln.ListpeersPeersLog.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.setData = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersLog} returns this + */ +proto.cln.ListpeersPeersLog.prototype.clearData = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersLog.prototype.hasData = function() { + return jspb.Message.getField(this, 7) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListpeersPeersChannels.repeatedFields_ = [13,18,37,46]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeersPeersChannels.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersChannels.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersChannels} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannels.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + scratchTxid: msg.getScratchTxid_asB64(), + feerate: (f = msg.getFeerate()) && proto.cln.ListpeersPeersChannelsFeerate.toObject(includeInstance, f), + owner: jspb.Message.getFieldWithDefault(msg, 4, ""), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 5, ""), + channelId: msg.getChannelId_asB64(), + fundingTxid: msg.getFundingTxid_asB64(), + fundingOutnum: jspb.Message.getFieldWithDefault(msg, 8, 0), + initialFeerate: jspb.Message.getFieldWithDefault(msg, 9, ""), + lastFeerate: jspb.Message.getFieldWithDefault(msg, 10, ""), + nextFeerate: jspb.Message.getFieldWithDefault(msg, 11, ""), + nextFeeStep: jspb.Message.getFieldWithDefault(msg, 12, 0), + inflightList: jspb.Message.toObjectList(msg.getInflightList(), + proto.cln.ListpeersPeersChannelsInflight.toObject, includeInstance), + closeTo: msg.getCloseTo_asB64(), + pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), + opener: jspb.Message.getFieldWithDefault(msg, 16, 0), + closer: jspb.Message.getFieldWithDefault(msg, 17, 0), + featuresList: (f = jspb.Message.getRepeatedField(msg, 18)) == null ? undefined : f, + funding: (f = msg.getFunding()) && proto.cln.ListpeersPeersChannelsFunding.toObject(includeInstance, f), + toUsMsat: (f = msg.getToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minToUsMsat: (f = msg.getMinToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maxToUsMsat: (f = msg.getMaxToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + totalMsat: (f = msg.getTotalMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeBaseMsat: (f = msg.getFeeBaseMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 25, 0), + dustLimitMsat: (f = msg.getDustLimitMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maxTotalHtlcInMsat: (f = msg.getMaxTotalHtlcInMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + theirReserveMsat: (f = msg.getTheirReserveMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + ourReserveMsat: (f = msg.getOurReserveMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + spendableMsat: (f = msg.getSpendableMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + receivableMsat: (f = msg.getReceivableMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minimumHtlcInMsat: (f = msg.getMinimumHtlcInMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minimumHtlcOutMsat: (f = msg.getMinimumHtlcOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maximumHtlcOutMsat: (f = msg.getMaximumHtlcOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + theirToSelfDelay: jspb.Message.getFieldWithDefault(msg, 33, 0), + ourToSelfDelay: jspb.Message.getFieldWithDefault(msg, 34, 0), + maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 35, 0), + alias: (f = msg.getAlias()) && proto.cln.ListpeersPeersChannelsAlias.toObject(includeInstance, f), + statusList: (f = jspb.Message.getRepeatedField(msg, 37)) == null ? undefined : f, + inPaymentsOffered: jspb.Message.getFieldWithDefault(msg, 38, 0), + inOfferedMsat: (f = msg.getInOfferedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + inPaymentsFulfilled: jspb.Message.getFieldWithDefault(msg, 40, 0), + inFulfilledMsat: (f = msg.getInFulfilledMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + outPaymentsOffered: jspb.Message.getFieldWithDefault(msg, 42, 0), + outOfferedMsat: (f = msg.getOutOfferedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + outPaymentsFulfilled: jspb.Message.getFieldWithDefault(msg, 44, 0), + outFulfilledMsat: (f = msg.getOutFulfilledMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + proto.cln.ListpeersPeersChannelsHtlcs.toObject, includeInstance), + closeToAddr: jspb.Message.getFieldWithDefault(msg, 47, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListpeersPeersChannels} + */ +proto.cln.ListpeersPeersChannels.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersChannels; + return proto.cln.ListpeersPeersChannels.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersChannels} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersChannels} + */ +proto.cln.ListpeersPeersChannels.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ListpeersPeersChannels.ListpeersPeersChannelsState} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScratchTxid(value); + break; + case 3: + var value = new proto.cln.ListpeersPeersChannelsFeerate; + reader.readMessage(value,proto.cln.ListpeersPeersChannelsFeerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannelId(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundingTxid(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFundingOutnum(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setInitialFeerate(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setLastFeerate(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setNextFeerate(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNextFeeStep(value); + break; + case 13: + var value = new proto.cln.ListpeersPeersChannelsInflight; + reader.readMessage(value,proto.cln.ListpeersPeersChannelsInflight.deserializeBinaryFromReader); + msg.addInflight(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCloseTo(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 16: + var value = /** @type {!proto.cln.ChannelSide} */ (reader.readEnum()); + msg.setOpener(value); + break; + case 17: + var value = /** @type {!proto.cln.ChannelSide} */ (reader.readEnum()); + msg.setCloser(value); + break; + case 18: + var value = /** @type {string} */ (reader.readString()); + msg.addFeatures(value); + break; + case 19: + var value = new proto.cln.ListpeersPeersChannelsFunding; + reader.readMessage(value,proto.cln.ListpeersPeersChannelsFunding.deserializeBinaryFromReader); + msg.setFunding(value); + break; + case 20: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setToUsMsat(value); + break; + case 21: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinToUsMsat(value); + break; + case 22: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaxToUsMsat(value); + break; + case 23: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTotalMsat(value); + break; + case 24: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeeBaseMsat(value); + break; + case 25: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeProportionalMillionths(value); + break; + case 26: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setDustLimitMsat(value); + break; + case 27: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaxTotalHtlcInMsat(value); + break; + case 28: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTheirReserveMsat(value); + break; + case 29: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOurReserveMsat(value); + break; + case 30: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setSpendableMsat(value); + break; + case 31: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setReceivableMsat(value); + break; + case 32: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinimumHtlcInMsat(value); + break; + case 48: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinimumHtlcOutMsat(value); + break; + case 49: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaximumHtlcOutMsat(value); + break; + case 33: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTheirToSelfDelay(value); + break; + case 34: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOurToSelfDelay(value); + break; + case 35: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptedHtlcs(value); + break; + case 50: + var value = new proto.cln.ListpeersPeersChannelsAlias; + reader.readMessage(value,proto.cln.ListpeersPeersChannelsAlias.deserializeBinaryFromReader); + msg.setAlias(value); + break; + case 37: + var value = /** @type {string} */ (reader.readString()); + msg.addStatus(value); + break; + case 38: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInPaymentsOffered(value); + break; + case 39: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInOfferedMsat(value); + break; + case 40: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInPaymentsFulfilled(value); + break; + case 41: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInFulfilledMsat(value); + break; + case 42: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutPaymentsOffered(value); + break; + case 43: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOutOfferedMsat(value); + break; + case 44: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutPaymentsFulfilled(value); + break; + case 45: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOutFulfilledMsat(value); + break; + case 46: + var value = new proto.cln.ListpeersPeersChannelsHtlcs; + reader.readMessage(value,proto.cln.ListpeersPeersChannelsHtlcs.deserializeBinaryFromReader); + msg.addHtlcs(value); + break; + case 47: + var value = /** @type {string} */ (reader.readString()); + msg.setCloseToAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannels.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersChannels.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersChannels} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannels.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cln.ListpeersPeersChannelsFeerate.serializeBinaryToWriter + ); + } + 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|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeUint32( + 12, + f + ); + } + f = message.getInflightList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.cln.ListpeersPeersChannelsInflight.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeBytes( + 14, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeBool( + 15, + f + ); + } + f = message.getOpener(); + if (f !== 0.0) { + writer.writeEnum( + 16, + f + ); + } + f = /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeEnum( + 17, + f + ); + } + f = message.getFeaturesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 18, + f + ); + } + f = message.getFunding(); + if (f != null) { + writer.writeMessage( + 19, + f, + proto.cln.ListpeersPeersChannelsFunding.serializeBinaryToWriter + ); + } + f = message.getToUsMsat(); + if (f != null) { + writer.writeMessage( + 20, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinToUsMsat(); + if (f != null) { + writer.writeMessage( + 21, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaxToUsMsat(); + if (f != null) { + writer.writeMessage( + 22, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getTotalMsat(); + if (f != null) { + writer.writeMessage( + 23, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeeBaseMsat(); + if (f != null) { + writer.writeMessage( + 24, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 25)); + if (f != null) { + writer.writeUint32( + 25, + f + ); + } + f = message.getDustLimitMsat(); + if (f != null) { + writer.writeMessage( + 26, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaxTotalHtlcInMsat(); + if (f != null) { + writer.writeMessage( + 27, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getTheirReserveMsat(); + if (f != null) { + writer.writeMessage( + 28, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getOurReserveMsat(); + if (f != null) { + writer.writeMessage( + 29, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getSpendableMsat(); + if (f != null) { + writer.writeMessage( + 30, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getReceivableMsat(); + if (f != null) { + writer.writeMessage( + 31, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinimumHtlcInMsat(); + if (f != null) { + writer.writeMessage( + 32, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinimumHtlcOutMsat(); + if (f != null) { + writer.writeMessage( + 48, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaximumHtlcOutMsat(); + if (f != null) { + writer.writeMessage( + 49, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeUint32( + 33, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 34)); + if (f != null) { + writer.writeUint32( + 34, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 35)); + if (f != null) { + writer.writeUint32( + 35, + f + ); + } + f = message.getAlias(); + if (f != null) { + writer.writeMessage( + 50, + f, + proto.cln.ListpeersPeersChannelsAlias.serializeBinaryToWriter + ); + } + f = message.getStatusList(); + if (f.length > 0) { + writer.writeRepeatedString( + 37, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 38)); + if (f != null) { + writer.writeUint64( + 38, + f + ); + } + f = message.getInOfferedMsat(); + if (f != null) { + writer.writeMessage( + 39, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 40)); + if (f != null) { + writer.writeUint64( + 40, + f + ); + } + f = message.getInFulfilledMsat(); + if (f != null) { + writer.writeMessage( + 41, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 42)); + if (f != null) { + writer.writeUint64( + 42, + f + ); + } + f = message.getOutOfferedMsat(); + if (f != null) { + writer.writeMessage( + 43, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 44)); + if (f != null) { + writer.writeUint64( + 44, + f + ); + } + f = message.getOutFulfilledMsat(); + if (f != null) { + writer.writeMessage( + 45, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 46, + f, + proto.cln.ListpeersPeersChannelsHtlcs.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 47)); + if (f != null) { + writer.writeString( + 47, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpeersPeersChannels.ListpeersPeersChannelsState = { + OPENINGD: 0, + CHANNELD_AWAITING_LOCKIN: 1, + CHANNELD_NORMAL: 2, + CHANNELD_SHUTTING_DOWN: 3, + CLOSINGD_SIGEXCHANGE: 4, + CLOSINGD_COMPLETE: 5, + AWAITING_UNILATERAL: 6, + FUNDING_SPEND_SEEN: 7, + ONCHAIN: 8, + DUALOPEND_OPEN_INIT: 9, + DUALOPEND_AWAITING_LOCKIN: 10 +}; + +/** + * optional ListpeersPeersChannelsState state = 1; + * @return {!proto.cln.ListpeersPeersChannels.ListpeersPeersChannelsState} + */ +proto.cln.ListpeersPeersChannels.prototype.getState = function() { + return /** @type {!proto.cln.ListpeersPeersChannels.ListpeersPeersChannelsState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ListpeersPeersChannels.ListpeersPeersChannelsState} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes scratch_txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannels.prototype.getScratchTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes scratch_txid = 2; + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getScratchTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScratchTxid())); +}; + + +/** + * optional bytes scratch_txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getScratchTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScratchTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setScratchTxid = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearScratchTxid = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasScratchTxid = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ListpeersPeersChannelsFeerate feerate = 3; + * @return {?proto.cln.ListpeersPeersChannelsFeerate} + */ +proto.cln.ListpeersPeersChannels.prototype.getFeerate = function() { + return /** @type{?proto.cln.ListpeersPeersChannelsFeerate} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListpeersPeersChannelsFeerate, 3)); +}; + + +/** + * @param {?proto.cln.ListpeersPeersChannelsFeerate|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setOwner = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOwner = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOwner = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string short_channel_id = 5; + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setShortChannelId = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearShortChannelId = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasShortChannelId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes channel_id = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannels.prototype.getChannelId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes channel_id = 6; + * This is a type-conversion wrapper around `getChannelId()` + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getChannelId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannelId())); +}; + + +/** + * optional bytes channel_id = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannelId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getChannelId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannelId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setChannelId = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearChannelId = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasChannelId = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes funding_txid = 7; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannels.prototype.getFundingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes funding_txid = 7; + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getFundingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxid())); +}; + + +/** + * optional bytes funding_txid = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getFundingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setFundingTxid = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFundingTxid = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasFundingTxid = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint32 funding_outnum = 8; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getFundingOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setFundingOutnum = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFundingOutnum = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasFundingOutnum = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string initial_feerate = 9; + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getInitialFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setInitialFeerate = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearInitialFeerate = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasInitialFeerate = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string last_feerate = 10; + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getLastFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setLastFeerate = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearLastFeerate = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasLastFeerate = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string next_feerate = 11; + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getNextFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setNextFeerate = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearNextFeerate = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasNextFeerate = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional uint32 next_fee_step = 12; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getNextFeeStep = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setNextFeeStep = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearNextFeeStep = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasNextFeeStep = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * repeated ListpeersPeersChannelsInflight inflight = 13; + * @return {!Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getInflightList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeersPeersChannelsInflight, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setInflightList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.cln.ListpeersPeersChannelsInflight=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeersChannelsInflight} + */ +proto.cln.ListpeersPeersChannels.prototype.addInflight = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.cln.ListpeersPeersChannelsInflight, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearInflightList = function() { + return this.setInflightList([]); +}; + + +/** + * optional bytes close_to = 14; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannels.prototype.getCloseTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes close_to = 14; + * This is a type-conversion wrapper around `getCloseTo()` + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getCloseTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCloseTo())); +}; + + +/** + * optional bytes close_to = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCloseTo()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getCloseTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCloseTo())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setCloseTo = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearCloseTo = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasCloseTo = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional bool private = 15; + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setPrivate = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearPrivate = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasPrivate = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional ChannelSide opener = 16; + * @return {!proto.cln.ChannelSide} + */ +proto.cln.ListpeersPeersChannels.prototype.getOpener = function() { + return /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {!proto.cln.ChannelSide} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setOpener = function(value) { + return jspb.Message.setProto3EnumField(this, 16, value); +}; + + +/** + * optional ChannelSide closer = 17; + * @return {!proto.cln.ChannelSide} + */ +proto.cln.ListpeersPeersChannels.prototype.getCloser = function() { + return /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {!proto.cln.ChannelSide} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setCloser = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearCloser = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasCloser = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * repeated string features = 18; + * @return {!Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 18)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setFeaturesList = function(value) { + return jspb.Message.setField(this, 18, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.addFeatures = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 18, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFeaturesList = function() { + return this.setFeaturesList([]); +}; + + +/** + * optional ListpeersPeersChannelsFunding funding = 19; + * @return {?proto.cln.ListpeersPeersChannelsFunding} + */ +proto.cln.ListpeersPeersChannels.prototype.getFunding = function() { + return /** @type{?proto.cln.ListpeersPeersChannelsFunding} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListpeersPeersChannelsFunding, 19)); +}; + + +/** + * @param {?proto.cln.ListpeersPeersChannelsFunding|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setFunding = function(value) { + return jspb.Message.setWrapperField(this, 19, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFunding = function() { + return this.setFunding(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasFunding = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional Amount to_us_msat = 20; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 20)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 20, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearToUsMsat = function() { + return this.setToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasToUsMsat = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional Amount min_to_us_msat = 21; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getMinToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 21)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setMinToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 21, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMinToUsMsat = function() { + return this.setMinToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMinToUsMsat = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional Amount max_to_us_msat = 22; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getMaxToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 22)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setMaxToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 22, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMaxToUsMsat = function() { + return this.setMaxToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMaxToUsMsat = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional Amount total_msat = 23; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getTotalMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 23)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setTotalMsat = function(value) { + return jspb.Message.setWrapperField(this, 23, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearTotalMsat = function() { + return this.setTotalMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasTotalMsat = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional Amount fee_base_msat = 24; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getFeeBaseMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 24)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setFeeBaseMsat = function(value) { + return jspb.Message.setWrapperField(this, 24, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFeeBaseMsat = function() { + return this.setFeeBaseMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasFeeBaseMsat = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional uint32 fee_proportional_millionths = 25; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getFeeProportionalMillionths = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setFeeProportionalMillionths = function(value) { + return jspb.Message.setField(this, 25, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearFeeProportionalMillionths = function() { + return jspb.Message.setField(this, 25, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasFeeProportionalMillionths = function() { + return jspb.Message.getField(this, 25) != null; +}; + + +/** + * optional Amount dust_limit_msat = 26; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getDustLimitMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 26)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setDustLimitMsat = function(value) { + return jspb.Message.setWrapperField(this, 26, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearDustLimitMsat = function() { + return this.setDustLimitMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasDustLimitMsat = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional Amount max_total_htlc_in_msat = 27; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getMaxTotalHtlcInMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 27)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setMaxTotalHtlcInMsat = function(value) { + return jspb.Message.setWrapperField(this, 27, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMaxTotalHtlcInMsat = function() { + return this.setMaxTotalHtlcInMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMaxTotalHtlcInMsat = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional Amount their_reserve_msat = 28; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getTheirReserveMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 28)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setTheirReserveMsat = function(value) { + return jspb.Message.setWrapperField(this, 28, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearTheirReserveMsat = function() { + return this.setTheirReserveMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasTheirReserveMsat = function() { + return jspb.Message.getField(this, 28) != null; +}; + + +/** + * optional Amount our_reserve_msat = 29; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getOurReserveMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 29)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setOurReserveMsat = function(value) { + return jspb.Message.setWrapperField(this, 29, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOurReserveMsat = function() { + return this.setOurReserveMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOurReserveMsat = function() { + return jspb.Message.getField(this, 29) != null; +}; + + +/** + * optional Amount spendable_msat = 30; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getSpendableMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 30)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setSpendableMsat = function(value) { + return jspb.Message.setWrapperField(this, 30, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearSpendableMsat = function() { + return this.setSpendableMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasSpendableMsat = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +/** + * optional Amount receivable_msat = 31; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getReceivableMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 31)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setReceivableMsat = function(value) { + return jspb.Message.setWrapperField(this, 31, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearReceivableMsat = function() { + return this.setReceivableMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasReceivableMsat = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional Amount minimum_htlc_in_msat = 32; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getMinimumHtlcInMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 32)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setMinimumHtlcInMsat = function(value) { + return jspb.Message.setWrapperField(this, 32, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMinimumHtlcInMsat = function() { + return this.setMinimumHtlcInMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMinimumHtlcInMsat = function() { + return jspb.Message.getField(this, 32) != null; +}; + + +/** + * optional Amount minimum_htlc_out_msat = 48; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getMinimumHtlcOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 48)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setMinimumHtlcOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 48, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMinimumHtlcOutMsat = function() { + return this.setMinimumHtlcOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMinimumHtlcOutMsat = function() { + return jspb.Message.getField(this, 48) != null; +}; + + +/** + * optional Amount maximum_htlc_out_msat = 49; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getMaximumHtlcOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 49)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setMaximumHtlcOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 49, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMaximumHtlcOutMsat = function() { + return this.setMaximumHtlcOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMaximumHtlcOutMsat = function() { + return jspb.Message.getField(this, 49) != null; +}; + + +/** + * optional uint32 their_to_self_delay = 33; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getTheirToSelfDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 33, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setTheirToSelfDelay = function(value) { + return jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearTheirToSelfDelay = function() { + return jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasTheirToSelfDelay = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional uint32 our_to_self_delay = 34; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getOurToSelfDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 34, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setOurToSelfDelay = function(value) { + return jspb.Message.setField(this, 34, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOurToSelfDelay = function() { + return jspb.Message.setField(this, 34, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOurToSelfDelay = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * optional uint32 max_accepted_htlcs = 35; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getMaxAcceptedHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 35, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setMaxAcceptedHtlcs = function(value) { + return jspb.Message.setField(this, 35, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearMaxAcceptedHtlcs = function() { + return jspb.Message.setField(this, 35, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasMaxAcceptedHtlcs = function() { + return jspb.Message.getField(this, 35) != null; +}; + + +/** + * optional ListpeersPeersChannelsAlias alias = 50; + * @return {?proto.cln.ListpeersPeersChannelsAlias} + */ +proto.cln.ListpeersPeersChannels.prototype.getAlias = function() { + return /** @type{?proto.cln.ListpeersPeersChannelsAlias} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListpeersPeersChannelsAlias, 50)); +}; + + +/** + * @param {?proto.cln.ListpeersPeersChannelsAlias|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setAlias = function(value) { + return jspb.Message.setWrapperField(this, 50, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearAlias = function() { + return this.setAlias(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasAlias = function() { + return jspb.Message.getField(this, 50) != null; +}; + + +/** + * repeated string status = 37; + * @return {!Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getStatusList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 37)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setStatusList = function(value) { + return jspb.Message.setField(this, 37, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.addStatus = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 37, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearStatusList = function() { + return this.setStatusList([]); +}; + + +/** + * optional uint64 in_payments_offered = 38; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getInPaymentsOffered = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 38, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setInPaymentsOffered = function(value) { + return jspb.Message.setField(this, 38, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearInPaymentsOffered = function() { + return jspb.Message.setField(this, 38, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasInPaymentsOffered = function() { + return jspb.Message.getField(this, 38) != null; +}; + + +/** + * optional Amount in_offered_msat = 39; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getInOfferedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 39)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setInOfferedMsat = function(value) { + return jspb.Message.setWrapperField(this, 39, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearInOfferedMsat = function() { + return this.setInOfferedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasInOfferedMsat = function() { + return jspb.Message.getField(this, 39) != null; +}; + + +/** + * optional uint64 in_payments_fulfilled = 40; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getInPaymentsFulfilled = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 40, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setInPaymentsFulfilled = function(value) { + return jspb.Message.setField(this, 40, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearInPaymentsFulfilled = function() { + return jspb.Message.setField(this, 40, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasInPaymentsFulfilled = function() { + return jspb.Message.getField(this, 40) != null; +}; + + +/** + * optional Amount in_fulfilled_msat = 41; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getInFulfilledMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 41)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setInFulfilledMsat = function(value) { + return jspb.Message.setWrapperField(this, 41, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearInFulfilledMsat = function() { + return this.setInFulfilledMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasInFulfilledMsat = function() { + return jspb.Message.getField(this, 41) != null; +}; + + +/** + * optional uint64 out_payments_offered = 42; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getOutPaymentsOffered = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 42, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setOutPaymentsOffered = function(value) { + return jspb.Message.setField(this, 42, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOutPaymentsOffered = function() { + return jspb.Message.setField(this, 42, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOutPaymentsOffered = function() { + return jspb.Message.getField(this, 42) != null; +}; + + +/** + * optional Amount out_offered_msat = 43; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getOutOfferedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 43)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setOutOfferedMsat = function(value) { + return jspb.Message.setWrapperField(this, 43, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOutOfferedMsat = function() { + return this.setOutOfferedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOutOfferedMsat = function() { + return jspb.Message.getField(this, 43) != null; +}; + + +/** + * optional uint64 out_payments_fulfilled = 44; + * @return {number} + */ +proto.cln.ListpeersPeersChannels.prototype.getOutPaymentsFulfilled = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 44, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setOutPaymentsFulfilled = function(value) { + return jspb.Message.setField(this, 44, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOutPaymentsFulfilled = function() { + return jspb.Message.setField(this, 44, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOutPaymentsFulfilled = function() { + return jspb.Message.getField(this, 44) != null; +}; + + +/** + * optional Amount out_fulfilled_msat = 45; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannels.prototype.getOutFulfilledMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 45)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setOutFulfilledMsat = function(value) { + return jspb.Message.setWrapperField(this, 45, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearOutFulfilledMsat = function() { + return this.setOutFulfilledMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasOutFulfilledMsat = function() { + return jspb.Message.getField(this, 45) != null; +}; + + +/** + * repeated ListpeersPeersChannelsHtlcs htlcs = 46; + * @return {!Array} + */ +proto.cln.ListpeersPeersChannels.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeersPeersChannelsHtlcs, 46)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeersPeersChannels} returns this +*/ +proto.cln.ListpeersPeersChannels.prototype.setHtlcsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 46, value); +}; + + +/** + * @param {!proto.cln.ListpeersPeersChannelsHtlcs=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} + */ +proto.cln.ListpeersPeersChannels.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 46, opt_value, proto.cln.ListpeersPeersChannelsHtlcs, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearHtlcsList = function() { + return this.setHtlcsList([]); +}; + + +/** + * optional string close_to_addr = 47; + * @return {string} + */ +proto.cln.ListpeersPeersChannels.prototype.getCloseToAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 47, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.setCloseToAddr = function(value) { + return jspb.Message.setField(this, 47, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannels} returns this + */ +proto.cln.ListpeersPeersChannels.prototype.clearCloseToAddr = function() { + return jspb.Message.setField(this, 47, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannels.prototype.hasCloseToAddr = function() { + return jspb.Message.getField(this, 47) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeersPeersChannelsFeerate.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersChannelsFeerate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersChannelsFeerate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsFeerate.toObject = function(includeInstance, msg) { + var f, obj = { + perkw: jspb.Message.getFieldWithDefault(msg, 1, 0), + perkb: 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.cln.ListpeersPeersChannelsFeerate} + */ +proto.cln.ListpeersPeersChannelsFeerate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersChannelsFeerate; + return proto.cln.ListpeersPeersChannelsFeerate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersChannelsFeerate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersChannelsFeerate} + */ +proto.cln.ListpeersPeersChannelsFeerate.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.setPerkw(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPerkb(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsFeerate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersChannelsFeerate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersChannelsFeerate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsFeerate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPerkw(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getPerkb(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional uint32 perkw = 1; + * @return {number} + */ +proto.cln.ListpeersPeersChannelsFeerate.prototype.getPerkw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannelsFeerate} returns this + */ +proto.cln.ListpeersPeersChannelsFeerate.prototype.setPerkw = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 perkb = 2; + * @return {number} + */ +proto.cln.ListpeersPeersChannelsFeerate.prototype.getPerkb = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannelsFeerate} returns this + */ +proto.cln.ListpeersPeersChannelsFeerate.prototype.setPerkb = 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.cln.ListpeersPeersChannelsInflight.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersChannelsInflight.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersChannelsInflight} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsInflight.toObject = function(includeInstance, msg) { + var f, obj = { + fundingTxid: msg.getFundingTxid_asB64(), + fundingOutnum: jspb.Message.getFieldWithDefault(msg, 2, 0), + feerate: jspb.Message.getFieldWithDefault(msg, 3, ""), + totalFundingMsat: (f = msg.getTotalFundingMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + ourFundingMsat: (f = msg.getOurFundingMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + scratchTxid: msg.getScratchTxid_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.cln.ListpeersPeersChannelsInflight} + */ +proto.cln.ListpeersPeersChannelsInflight.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersChannelsInflight; + return proto.cln.ListpeersPeersChannelsInflight.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersChannelsInflight} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersChannelsInflight} + */ +proto.cln.ListpeersPeersChannelsInflight.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.setFundingTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFundingOutnum(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFeerate(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTotalFundingMsat(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOurFundingMsat(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScratchTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersChannelsInflight.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersChannelsInflight} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsInflight.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFundingTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFundingOutnum(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getFeerate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTotalFundingMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getOurFundingMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getScratchTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } +}; + + +/** + * optional bytes funding_txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getFundingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes funding_txid = 1; + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {string} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getFundingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxid())); +}; + + +/** + * optional bytes funding_txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getFundingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.setFundingTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 funding_outnum = 2; + * @return {number} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getFundingOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.setFundingOutnum = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string feerate = 3; + * @return {string} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.setFeerate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Amount total_funding_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getTotalFundingMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this +*/ +proto.cln.ListpeersPeersChannelsInflight.prototype.setTotalFundingMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.clearTotalFundingMsat = function() { + return this.setTotalFundingMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.hasTotalFundingMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Amount our_funding_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getOurFundingMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this +*/ +proto.cln.ListpeersPeersChannelsInflight.prototype.setOurFundingMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.clearOurFundingMsat = function() { + return this.setOurFundingMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.hasOurFundingMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes scratch_txid = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getScratchTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes scratch_txid = 6; + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {string} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getScratchTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScratchTxid())); +}; + + +/** + * optional bytes scratch_txid = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.getScratchTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScratchTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannelsInflight} returns this + */ +proto.cln.ListpeersPeersChannelsInflight.prototype.setScratchTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersChannelsFunding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersChannelsFunding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsFunding.toObject = function(includeInstance, msg) { + var f, obj = { + pushedMsat: (f = msg.getPushedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + localFundsMsat: (f = msg.getLocalFundsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + remoteFundsMsat: (f = msg.getRemoteFundsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feePaidMsat: (f = msg.getFeePaidMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeRcvdMsat: (f = msg.getFeeRcvdMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListpeersPeersChannelsFunding} + */ +proto.cln.ListpeersPeersChannelsFunding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersChannelsFunding; + return proto.cln.ListpeersPeersChannelsFunding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersChannelsFunding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersChannelsFunding} + */ +proto.cln.ListpeersPeersChannelsFunding.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setPushedMsat(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setLocalFundsMsat(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setRemoteFundsMsat(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeePaidMsat(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeeRcvdMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersChannelsFunding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersChannelsFunding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsFunding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPushedMsat(); + if (f != null) { + writer.writeMessage( + 3, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getLocalFundsMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getRemoteFundsMsat(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeePaidMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeeRcvdMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Amount pushed_msat = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.getPushedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this +*/ +proto.cln.ListpeersPeersChannelsFunding.prototype.setPushedMsat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.clearPushedMsat = function() { + return this.setPushedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.hasPushedMsat = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount local_funds_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.getLocalFundsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this +*/ +proto.cln.ListpeersPeersChannelsFunding.prototype.setLocalFundsMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.clearLocalFundsMsat = function() { + return this.setLocalFundsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.hasLocalFundsMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Amount remote_funds_msat = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.getRemoteFundsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this +*/ +proto.cln.ListpeersPeersChannelsFunding.prototype.setRemoteFundsMsat = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.clearRemoteFundsMsat = function() { + return this.setRemoteFundsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.hasRemoteFundsMsat = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional Amount fee_paid_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.getFeePaidMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this +*/ +proto.cln.ListpeersPeersChannelsFunding.prototype.setFeePaidMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.clearFeePaidMsat = function() { + return this.setFeePaidMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.hasFeePaidMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Amount fee_rcvd_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.getFeeRcvdMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this +*/ +proto.cln.ListpeersPeersChannelsFunding.prototype.setFeeRcvdMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsFunding} returns this + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.clearFeeRcvdMsat = function() { + return this.setFeeRcvdMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsFunding.prototype.hasFeeRcvdMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersChannelsAlias.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersChannelsAlias} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsAlias.toObject = function(includeInstance, msg) { + var f, obj = { + local: jspb.Message.getFieldWithDefault(msg, 1, ""), + remote: 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.cln.ListpeersPeersChannelsAlias} + */ +proto.cln.ListpeersPeersChannelsAlias.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersChannelsAlias; + return proto.cln.ListpeersPeersChannelsAlias.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersChannelsAlias} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersChannelsAlias} + */ +proto.cln.ListpeersPeersChannelsAlias.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocal(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRemote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersChannelsAlias.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersChannelsAlias} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsAlias.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string local = 1; + * @return {string} + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.getLocal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannelsAlias} returns this + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.setLocal = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsAlias} returns this + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.clearLocal = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.hasLocal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string remote = 2; + * @return {string} + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.getRemote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannelsAlias} returns this + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.setRemote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsAlias} returns this + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.clearRemote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsAlias.prototype.hasRemote = 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.cln.ListpeersPeersChannelsHtlcs.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeersPeersChannelsHtlcs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeersPeersChannelsHtlcs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsHtlcs.toObject = function(includeInstance, msg) { + var f, obj = { + direction: jspb.Message.getFieldWithDefault(msg, 1, 0), + id: jspb.Message.getFieldWithDefault(msg, 2, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + expiry: jspb.Message.getFieldWithDefault(msg, 4, 0), + paymentHash: msg.getPaymentHash_asB64(), + localTrimmed: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + status: jspb.Message.getFieldWithDefault(msg, 7, ""), + 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.cln.ListpeersPeersChannelsHtlcs} + */ +proto.cln.ListpeersPeersChannelsHtlcs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeersPeersChannelsHtlcs; + return proto.cln.ListpeersPeersChannelsHtlcs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeersPeersChannelsHtlcs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} + */ +proto.cln.ListpeersPeersChannelsHtlcs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection} */ (reader.readEnum()); + msg.setDirection(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 3: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpiry(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLocalTrimmed(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); + break; + case 8: + var value = /** @type {!proto.cln.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.cln.ListpeersPeersChannelsHtlcs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeersPeersChannelsHtlcs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeersPeersChannelsHtlcs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeersPeersChannelsHtlcs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDirection(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 3, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getExpiry(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 8, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection = { + IN: 0, + OUT: 1 +}; + +/** + * optional ListpeersPeersChannelsHtlcsDirection direction = 1; + * @return {!proto.cln.ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getDirection = function() { + return /** @type {!proto.cln.ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ListpeersPeersChannelsHtlcs.ListpeersPeersChannelsHtlcsDirection} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setDirection = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint64 id = 2; + * @return {number} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Amount amount_msat = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this +*/ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 expiry = 4; + * @return {number} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes payment_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes payment_hash = 5; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional bool local_trimmed = 6; + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getLocalTrimmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setLocalTrimmed = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.clearLocalTrimmed = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.hasLocalTrimmed = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string status = 7; + * @return {string} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setStatus = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.clearStatus = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.hasStatus = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional HtlcState state = 8; + * @return {!proto.cln.HtlcState} + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.getState = function() { + return /** @type {!proto.cln.HtlcState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {!proto.cln.HtlcState} value + * @return {!proto.cln.ListpeersPeersChannelsHtlcs} returns this + */ +proto.cln.ListpeersPeersChannelsHtlcs.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(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.cln.ListfundsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListfundsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListfundsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + spent: 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.cln.ListfundsRequest} + */ +proto.cln.ListfundsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListfundsRequest; + return proto.cln.ListfundsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListfundsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListfundsRequest} + */ +proto.cln.ListfundsRequest.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.setSpent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListfundsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListfundsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListfundsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool spent = 1; + * @return {boolean} + */ +proto.cln.ListfundsRequest.prototype.getSpent = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListfundsRequest} returns this + */ +proto.cln.ListfundsRequest.prototype.setSpent = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListfundsRequest} returns this + */ +proto.cln.ListfundsRequest.prototype.clearSpent = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsRequest.prototype.hasSpent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListfundsResponse.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.cln.ListfundsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListfundsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListfundsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + proto.cln.ListfundsOutputs.toObject, includeInstance), + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.cln.ListfundsChannels.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.cln.ListfundsResponse} + */ +proto.cln.ListfundsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListfundsResponse; + return proto.cln.ListfundsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListfundsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListfundsResponse} + */ +proto.cln.ListfundsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListfundsOutputs; + reader.readMessage(value,proto.cln.ListfundsOutputs.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + case 2: + var value = new proto.cln.ListfundsChannels; + reader.readMessage(value,proto.cln.ListfundsChannels.deserializeBinaryFromReader); + msg.addChannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListfundsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListfundsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListfundsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListfundsOutputs.serializeBinaryToWriter + ); + } + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cln.ListfundsChannels.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListfundsOutputs outputs = 1; + * @return {!Array} + */ +proto.cln.ListfundsResponse.prototype.getOutputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListfundsOutputs, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListfundsResponse} returns this +*/ +proto.cln.ListfundsResponse.prototype.setOutputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListfundsOutputs=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListfundsOutputs} + */ +proto.cln.ListfundsResponse.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListfundsOutputs, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListfundsResponse} returns this + */ +proto.cln.ListfundsResponse.prototype.clearOutputsList = function() { + return this.setOutputsList([]); +}; + + +/** + * repeated ListfundsChannels channels = 2; + * @return {!Array} + */ +proto.cln.ListfundsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListfundsChannels, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListfundsResponse} returns this +*/ +proto.cln.ListfundsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cln.ListfundsChannels=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListfundsChannels} + */ +proto.cln.ListfundsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cln.ListfundsChannels, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListfundsResponse} returns this + */ +proto.cln.ListfundsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListfundsOutputs.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListfundsOutputs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListfundsOutputs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsOutputs.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + output: jspb.Message.getFieldWithDefault(msg, 2, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + scriptpubkey: msg.getScriptpubkey_asB64(), + address: jspb.Message.getFieldWithDefault(msg, 5, ""), + redeemscript: msg.getRedeemscript_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 7, 0), + reserved: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + blockheight: 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.cln.ListfundsOutputs} + */ +proto.cln.ListfundsOutputs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListfundsOutputs; + return proto.cln.ListfundsOutputs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListfundsOutputs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListfundsOutputs} + */ +proto.cln.ListfundsOutputs.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.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutput(value); + break; + case 3: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScriptpubkey(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRedeemscript(value); + break; + case 7: + var value = /** @type {!proto.cln.ListfundsOutputs.ListfundsOutputsStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReserved(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockheight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListfundsOutputs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListfundsOutputs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListfundsOutputs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsOutputs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOutput(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 3, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getScriptpubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } + f = message.getReserved(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListfundsOutputs.ListfundsOutputsStatus = { + UNCONFIRMED: 0, + CONFIRMED: 1, + SPENT: 2, + IMMATURE: 3 +}; + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListfundsOutputs.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.ListfundsOutputs.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListfundsOutputs.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 output = 2; + * @return {number} + */ +proto.cln.ListfundsOutputs.prototype.getOutput = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setOutput = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Amount amount_msat = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.ListfundsOutputs.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListfundsOutputs} returns this +*/ +proto.cln.ListfundsOutputs.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsOutputs.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes scriptpubkey = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListfundsOutputs.prototype.getScriptpubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes scriptpubkey = 4; + * This is a type-conversion wrapper around `getScriptpubkey()` + * @return {string} + */ +proto.cln.ListfundsOutputs.prototype.getScriptpubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScriptpubkey())); +}; + + +/** + * optional bytes scriptpubkey = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScriptpubkey()` + * @return {!Uint8Array} + */ +proto.cln.ListfundsOutputs.prototype.getScriptpubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScriptpubkey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setScriptpubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional string address = 5; + * @return {string} + */ +proto.cln.ListfundsOutputs.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setAddress = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.clearAddress = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsOutputs.prototype.hasAddress = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes redeemscript = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListfundsOutputs.prototype.getRedeemscript = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes redeemscript = 6; + * This is a type-conversion wrapper around `getRedeemscript()` + * @return {string} + */ +proto.cln.ListfundsOutputs.prototype.getRedeemscript_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRedeemscript())); +}; + + +/** + * optional bytes redeemscript = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRedeemscript()` + * @return {!Uint8Array} + */ +proto.cln.ListfundsOutputs.prototype.getRedeemscript_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRedeemscript())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setRedeemscript = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.clearRedeemscript = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsOutputs.prototype.hasRedeemscript = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ListfundsOutputsStatus status = 7; + * @return {!proto.cln.ListfundsOutputs.ListfundsOutputsStatus} + */ +proto.cln.ListfundsOutputs.prototype.getStatus = function() { + return /** @type {!proto.cln.ListfundsOutputs.ListfundsOutputsStatus} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.cln.ListfundsOutputs.ListfundsOutputsStatus} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); +}; + + +/** + * optional bool reserved = 9; + * @return {boolean} + */ +proto.cln.ListfundsOutputs.prototype.getReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setReserved = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional uint32 blockheight = 8; + * @return {number} + */ +proto.cln.ListfundsOutputs.prototype.getBlockheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.setBlockheight = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListfundsOutputs} returns this + */ +proto.cln.ListfundsOutputs.prototype.clearBlockheight = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsOutputs.prototype.hasBlockheight = 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.cln.ListfundsChannels.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListfundsChannels.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListfundsChannels} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsChannels.toObject = function(includeInstance, msg) { + var f, obj = { + peerId: msg.getPeerId_asB64(), + ourAmountMsat: (f = msg.getOurAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + fundingTxid: msg.getFundingTxid_asB64(), + fundingOutput: jspb.Message.getFieldWithDefault(msg, 5, 0), + connected: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + state: jspb.Message.getFieldWithDefault(msg, 7, 0), + channelId: msg.getChannelId_asB64(), + shortChannelId: 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.cln.ListfundsChannels} + */ +proto.cln.ListfundsChannels.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListfundsChannels; + return proto.cln.ListfundsChannels.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListfundsChannels} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListfundsChannels} + */ +proto.cln.ListfundsChannels.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.setPeerId(value); + break; + case 2: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOurAmountMsat(value); + break; + case 3: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundingTxid(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFundingOutput(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setConnected(value); + break; + case 7: + var value = /** @type {!proto.cln.ChannelState} */ (reader.readEnum()); + msg.setState(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannelId(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListfundsChannels.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListfundsChannels.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListfundsChannels} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListfundsChannels.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPeerId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOurAmountMsat(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 3, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFundingTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getFundingOutput(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getConnected(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBytes( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional bytes peer_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListfundsChannels.prototype.getPeerId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes peer_id = 1; + * This is a type-conversion wrapper around `getPeerId()` + * @return {string} + */ +proto.cln.ListfundsChannels.prototype.getPeerId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeerId())); +}; + + +/** + * optional bytes peer_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPeerId()` + * @return {!Uint8Array} + */ +proto.cln.ListfundsChannels.prototype.getPeerId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeerId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setPeerId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Amount our_amount_msat = 2; + * @return {?proto.cln.Amount} + */ +proto.cln.ListfundsChannels.prototype.getOurAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 2)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListfundsChannels} returns this +*/ +proto.cln.ListfundsChannels.prototype.setOurAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.clearOurAmountMsat = function() { + return this.setOurAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsChannels.prototype.hasOurAmountMsat = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Amount amount_msat = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.ListfundsChannels.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListfundsChannels} returns this +*/ +proto.cln.ListfundsChannels.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsChannels.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes funding_txid = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListfundsChannels.prototype.getFundingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes funding_txid = 4; + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {string} + */ +proto.cln.ListfundsChannels.prototype.getFundingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxid())); +}; + + +/** + * optional bytes funding_txid = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListfundsChannels.prototype.getFundingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setFundingTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional uint32 funding_output = 5; + * @return {number} + */ +proto.cln.ListfundsChannels.prototype.getFundingOutput = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setFundingOutput = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bool connected = 6; + * @return {boolean} + */ +proto.cln.ListfundsChannels.prototype.getConnected = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setConnected = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional ChannelState state = 7; + * @return {!proto.cln.ChannelState} + */ +proto.cln.ListfundsChannels.prototype.getState = function() { + return /** @type {!proto.cln.ChannelState} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.cln.ChannelState} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); +}; + + +/** + * optional bytes channel_id = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListfundsChannels.prototype.getChannelId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes channel_id = 9; + * This is a type-conversion wrapper around `getChannelId()` + * @return {string} + */ +proto.cln.ListfundsChannels.prototype.getChannelId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannelId())); +}; + + +/** + * optional bytes channel_id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannelId()` + * @return {!Uint8Array} + */ +proto.cln.ListfundsChannels.prototype.getChannelId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannelId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setChannelId = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.clearChannelId = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsChannels.prototype.hasChannelId = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string short_channel_id = 8; + * @return {string} + */ +proto.cln.ListfundsChannels.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.setShortChannelId = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListfundsChannels} returns this + */ +proto.cln.ListfundsChannels.prototype.clearShortChannelId = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListfundsChannels.prototype.hasShortChannelId = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.SendpayRequest.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.cln.SendpayRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendpayRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendpayRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpayRequest.toObject = function(includeInstance, msg) { + var f, obj = { + routeList: jspb.Message.toObjectList(msg.getRouteList(), + proto.cln.SendpayRoute.toObject, includeInstance), + paymentHash: msg.getPaymentHash_asB64(), + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + bolt11: jspb.Message.getFieldWithDefault(msg, 5, ""), + paymentSecret: msg.getPaymentSecret_asB64(), + partid: jspb.Message.getFieldWithDefault(msg, 7, 0), + localinvreqid: msg.getLocalinvreqid_asB64(), + groupid: 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.cln.SendpayRequest} + */ +proto.cln.SendpayRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendpayRequest; + return proto.cln.SendpayRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendpayRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendpayRequest} + */ +proto.cln.SendpayRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.SendpayRoute; + reader.readMessage(value,proto.cln.SendpayRoute.deserializeBinaryFromReader); + msg.addRoute(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 10: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentSecret(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPartid(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLocalinvreqid(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendpayRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendpayRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendpayRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpayRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRouteList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.SendpayRoute.serializeBinaryToWriter + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeBytes( + 11, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeUint64( + 9, + f + ); + } +}; + + +/** + * repeated SendpayRoute route = 1; + * @return {!Array} + */ +proto.cln.SendpayRequest.prototype.getRouteList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.SendpayRoute, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.SendpayRequest} returns this +*/ +proto.cln.SendpayRequest.prototype.setRouteList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.SendpayRoute=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.SendpayRoute} + */ +proto.cln.SendpayRequest.prototype.addRoute = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.SendpayRoute, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearRouteList = function() { + return this.setRouteList([]); +}; + + +/** + * optional bytes payment_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_hash = 2; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.SendpayRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.SendpayRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string label = 3; + * @return {string} + */ +proto.cln.SendpayRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearLabel = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasLabel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount amount_msat = 10; + * @return {?proto.cln.Amount} + */ +proto.cln.SendpayRequest.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 10)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendpayRequest} returns this +*/ +proto.cln.SendpayRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string bolt11 = 5; + * @return {string} + */ +proto.cln.SendpayRequest.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes payment_secret = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayRequest.prototype.getPaymentSecret = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes payment_secret = 6; + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {string} + */ +proto.cln.SendpayRequest.prototype.getPaymentSecret_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentSecret())); +}; + + +/** + * optional bytes payment_secret = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {!Uint8Array} + */ +proto.cln.SendpayRequest.prototype.getPaymentSecret_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentSecret())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setPaymentSecret = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearPaymentSecret = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasPaymentSecret = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint32 partid = 7; + * @return {number} + */ +proto.cln.SendpayRequest.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearPartid = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasPartid = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bytes localinvreqid = 11; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayRequest.prototype.getLocalinvreqid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes localinvreqid = 11; + * This is a type-conversion wrapper around `getLocalinvreqid()` + * @return {string} + */ +proto.cln.SendpayRequest.prototype.getLocalinvreqid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLocalinvreqid())); +}; + + +/** + * optional bytes localinvreqid = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLocalinvreqid()` + * @return {!Uint8Array} + */ +proto.cln.SendpayRequest.prototype.getLocalinvreqid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLocalinvreqid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setLocalinvreqid = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearLocalinvreqid = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasLocalinvreqid = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional uint64 groupid = 9; + * @return {number} + */ +proto.cln.SendpayRequest.prototype.getGroupid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.setGroupid = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayRequest} returns this + */ +proto.cln.SendpayRequest.prototype.clearGroupid = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRequest.prototype.hasGroupid = 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.cln.SendpayResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendpayResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendpayResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpayResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + groupid: jspb.Message.getFieldWithDefault(msg, 2, 0), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + destination: msg.getDestination_asB64(), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + completedAt: jspb.Message.getFieldWithDefault(msg, 15, 0), + amountSentMsat: (f = msg.getAmountSentMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + label: jspb.Message.getFieldWithDefault(msg, 9, ""), + partid: jspb.Message.getFieldWithDefault(msg, 10, 0), + bolt11: jspb.Message.getFieldWithDefault(msg, 11, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 12, ""), + paymentPreimage: msg.getPaymentPreimage_asB64(), + message: jspb.Message.getFieldWithDefault(msg, 14, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.SendpayResponse} + */ +proto.cln.SendpayResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendpayResponse; + return proto.cln.SendpayResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendpayResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendpayResponse} + */ +proto.cln.SendpayResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupid(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {!proto.cln.SendpayResponse.SendpayStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCompletedAt(value); + break; + case 8: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountSentMsat(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPartid(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + case 14: + 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.cln.SendpayResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendpayResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendpayResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpayResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeUint64( + 15, + f + ); + } + f = message.getAmountSentMsat(); + if (f != null) { + writer.writeMessage( + 8, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint64( + 10, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeString( + 14, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.SendpayResponse.SendpayStatus = { + PENDING: 0, + COMPLETE: 1 +}; + +/** + * optional uint64 id = 1; + * @return {number} + */ +proto.cln.SendpayResponse.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 groupid = 2; + * @return {number} + */ +proto.cln.SendpayResponse.prototype.getGroupid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setGroupid = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearGroupid = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasGroupid = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.SendpayResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional SendpayStatus status = 4; + * @return {!proto.cln.SendpayResponse.SendpayStatus} + */ +proto.cln.SendpayResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.SendpayResponse.SendpayStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.SendpayResponse.SendpayStatus} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.SendpayResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendpayResponse} returns this +*/ +proto.cln.SendpayResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes destination = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayResponse.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes destination = 6; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.SendpayResponse.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearDestination = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasDestination = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint64 created_at = 7; + * @return {number} + */ +proto.cln.SendpayResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 completed_at = 15; + * @return {number} + */ +proto.cln.SendpayResponse.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setCompletedAt = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearCompletedAt = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasCompletedAt = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional Amount amount_sent_msat = 8; + * @return {?proto.cln.Amount} + */ +proto.cln.SendpayResponse.prototype.getAmountSentMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 8)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendpayResponse} returns this +*/ +proto.cln.SendpayResponse.prototype.setAmountSentMsat = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearAmountSentMsat = function() { + return this.setAmountSentMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasAmountSentMsat = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string label = 9; + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearLabel = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasLabel = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional uint64 partid = 10; + * @return {number} + */ +proto.cln.SendpayResponse.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearPartid = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasPartid = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string bolt11 = 11; + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string bolt12 = 12; + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes payment_preimage = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes payment_preimage = 13; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.SendpayResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional string message = 14; + * @return {string} + */ +proto.cln.SendpayResponse.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.setMessage = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpayResponse} returns this + */ +proto.cln.SendpayResponse.prototype.clearMessage = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayResponse.prototype.hasMessage = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.SendpayRoute.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendpayRoute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendpayRoute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpayRoute.toObject = function(includeInstance, msg) { + var f, obj = { + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + id: msg.getId_asB64(), + delay: jspb.Message.getFieldWithDefault(msg, 3, 0), + channel: 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.cln.SendpayRoute} + */ +proto.cln.SendpayRoute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendpayRoute; + return proto.cln.SendpayRoute.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendpayRoute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendpayRoute} + */ +proto.cln.SendpayRoute.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDelay(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setChannel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendpayRoute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendpayRoute.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendpayRoute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpayRoute.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getDelay(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getChannel(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.SendpayRoute.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendpayRoute} returns this +*/ +proto.cln.SendpayRoute.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendpayRoute} returns this + */ +proto.cln.SendpayRoute.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpayRoute.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes id = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpayRoute.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes id = 2; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.SendpayRoute.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.SendpayRoute.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpayRoute} returns this + */ +proto.cln.SendpayRoute.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 delay = 3; + * @return {number} + */ +proto.cln.SendpayRoute.prototype.getDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendpayRoute} returns this + */ +proto.cln.SendpayRoute.prototype.setDelay = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string channel = 4; + * @return {string} + */ +proto.cln.SendpayRoute.prototype.getChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpayRoute} returns this + */ +proto.cln.SendpayRoute.prototype.setChannel = 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.cln.ListchannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListchannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListchannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListchannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + shortChannelId: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: msg.getSource_asB64(), + destination: msg.getDestination_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.cln.ListchannelsRequest} + */ +proto.cln.ListchannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListchannelsRequest; + return proto.cln.ListchannelsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListchannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListchannelsRequest} + */ +proto.cln.ListchannelsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSource(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListchannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListchannelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListchannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListchannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string short_channel_id = 1; + * @return {string} + */ +proto.cln.ListchannelsRequest.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListchannelsRequest} returns this + */ +proto.cln.ListchannelsRequest.prototype.setShortChannelId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListchannelsRequest} returns this + */ +proto.cln.ListchannelsRequest.prototype.clearShortChannelId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListchannelsRequest.prototype.hasShortChannelId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes source = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListchannelsRequest.prototype.getSource = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes source = 2; + * This is a type-conversion wrapper around `getSource()` + * @return {string} + */ +proto.cln.ListchannelsRequest.prototype.getSource_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSource())); +}; + + +/** + * optional bytes source = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSource()` + * @return {!Uint8Array} + */ +proto.cln.ListchannelsRequest.prototype.getSource_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSource())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListchannelsRequest} returns this + */ +proto.cln.ListchannelsRequest.prototype.setSource = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListchannelsRequest} returns this + */ +proto.cln.ListchannelsRequest.prototype.clearSource = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListchannelsRequest.prototype.hasSource = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes destination = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListchannelsRequest.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes destination = 3; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.ListchannelsRequest.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.ListchannelsRequest.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListchannelsRequest} returns this + */ +proto.cln.ListchannelsRequest.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListchannelsRequest} returns this + */ +proto.cln.ListchannelsRequest.prototype.clearDestination = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListchannelsRequest.prototype.hasDestination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListchannelsResponse.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.cln.ListchannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListchannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListchannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListchannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.cln.ListchannelsChannels.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.cln.ListchannelsResponse} + */ +proto.cln.ListchannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListchannelsResponse; + return proto.cln.ListchannelsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListchannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListchannelsResponse} + */ +proto.cln.ListchannelsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListchannelsChannels; + reader.readMessage(value,proto.cln.ListchannelsChannels.deserializeBinaryFromReader); + msg.addChannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListchannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListchannelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListchannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListchannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListchannelsChannels.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListchannelsChannels channels = 1; + * @return {!Array} + */ +proto.cln.ListchannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListchannelsChannels, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListchannelsResponse} returns this +*/ +proto.cln.ListchannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListchannelsChannels=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListchannelsChannels} + */ +proto.cln.ListchannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListchannelsChannels, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListchannelsResponse} returns this + */ +proto.cln.ListchannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListchannelsChannels.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListchannelsChannels.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListchannelsChannels} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListchannelsChannels.toObject = function(includeInstance, msg) { + var f, obj = { + source: msg.getSource_asB64(), + destination: msg.getDestination_asB64(), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + direction: jspb.Message.getFieldWithDefault(msg, 16, 0), + pb_public: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + messageFlags: jspb.Message.getFieldWithDefault(msg, 6, 0), + channelFlags: jspb.Message.getFieldWithDefault(msg, 7, 0), + active: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + lastUpdate: jspb.Message.getFieldWithDefault(msg, 9, 0), + baseFeeMillisatoshi: jspb.Message.getFieldWithDefault(msg, 10, 0), + feePerMillionth: jspb.Message.getFieldWithDefault(msg, 11, 0), + delay: jspb.Message.getFieldWithDefault(msg, 12, 0), + htlcMinimumMsat: (f = msg.getHtlcMinimumMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + htlcMaximumMsat: (f = msg.getHtlcMaximumMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + features: msg.getFeatures_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.cln.ListchannelsChannels} + */ +proto.cln.ListchannelsChannels.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListchannelsChannels; + return proto.cln.ListchannelsChannels.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListchannelsChannels} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListchannelsChannels} + */ +proto.cln.ListchannelsChannels.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.setSource(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDirection(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPublic(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMessageFlags(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChannelFlags(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setActive(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastUpdate(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBaseFeeMillisatoshi(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeePerMillionth(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDelay(value); + break; + case 13: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setHtlcMinimumMsat(value); + break; + case 14: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setHtlcMaximumMsat(value); + break; + case 15: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFeatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListchannelsChannels.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListchannelsChannels.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListchannelsChannels} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListchannelsChannels.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSource_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDestination_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getShortChannelId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDirection(); + if (f !== 0) { + writer.writeUint32( + 16, + f + ); + } + f = message.getPublic(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMessageFlags(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getChannelFlags(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getActive(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getLastUpdate(); + if (f !== 0) { + writer.writeUint32( + 9, + f + ); + } + f = message.getBaseFeeMillisatoshi(); + if (f !== 0) { + writer.writeUint32( + 10, + f + ); + } + f = message.getFeePerMillionth(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + f = message.getDelay(); + if (f !== 0) { + writer.writeUint32( + 12, + f + ); + } + f = message.getHtlcMinimumMsat(); + if (f != null) { + writer.writeMessage( + 13, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getHtlcMaximumMsat(); + if (f != null) { + writer.writeMessage( + 14, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeatures_asU8(); + if (f.length > 0) { + writer.writeBytes( + 15, + f + ); + } +}; + + +/** + * optional bytes source = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListchannelsChannels.prototype.getSource = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes source = 1; + * This is a type-conversion wrapper around `getSource()` + * @return {string} + */ +proto.cln.ListchannelsChannels.prototype.getSource_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSource())); +}; + + +/** + * optional bytes source = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSource()` + * @return {!Uint8Array} + */ +proto.cln.ListchannelsChannels.prototype.getSource_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSource())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setSource = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes destination = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListchannelsChannels.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes destination = 2; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.ListchannelsChannels.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.ListchannelsChannels.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setDestination = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string short_channel_id = 3; + * @return {string} + */ +proto.cln.ListchannelsChannels.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setShortChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint32 direction = 16; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getDirection = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setDirection = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional bool public = 4; + * @return {boolean} + */ +proto.cln.ListchannelsChannels.prototype.getPublic = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setPublic = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.ListchannelsChannels.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListchannelsChannels} returns this +*/ +proto.cln.ListchannelsChannels.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListchannelsChannels.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 message_flags = 6; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getMessageFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setMessageFlags = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint32 channel_flags = 7; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getChannelFlags = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setChannelFlags = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bool active = 8; + * @return {boolean} + */ +proto.cln.ListchannelsChannels.prototype.getActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional uint32 last_update = 9; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getLastUpdate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setLastUpdate = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint32 base_fee_millisatoshi = 10; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getBaseFeeMillisatoshi = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setBaseFeeMillisatoshi = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint32 fee_per_millionth = 11; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getFeePerMillionth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setFeePerMillionth = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint32 delay = 12; + * @return {number} + */ +proto.cln.ListchannelsChannels.prototype.getDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setDelay = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional Amount htlc_minimum_msat = 13; + * @return {?proto.cln.Amount} + */ +proto.cln.ListchannelsChannels.prototype.getHtlcMinimumMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 13)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListchannelsChannels} returns this +*/ +proto.cln.ListchannelsChannels.prototype.setHtlcMinimumMsat = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.clearHtlcMinimumMsat = function() { + return this.setHtlcMinimumMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListchannelsChannels.prototype.hasHtlcMinimumMsat = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional Amount htlc_maximum_msat = 14; + * @return {?proto.cln.Amount} + */ +proto.cln.ListchannelsChannels.prototype.getHtlcMaximumMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 14)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListchannelsChannels} returns this +*/ +proto.cln.ListchannelsChannels.prototype.setHtlcMaximumMsat = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.clearHtlcMaximumMsat = function() { + return this.setHtlcMaximumMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListchannelsChannels.prototype.hasHtlcMaximumMsat = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional bytes features = 15; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListchannelsChannels.prototype.getFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * optional bytes features = 15; + * This is a type-conversion wrapper around `getFeatures()` + * @return {string} + */ +proto.cln.ListchannelsChannels.prototype.getFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFeatures())); +}; + + +/** + * optional bytes features = 15; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFeatures()` + * @return {!Uint8Array} + */ +proto.cln.ListchannelsChannels.prototype.getFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListchannelsChannels} returns this + */ +proto.cln.ListchannelsChannels.prototype.setFeatures = function(value) { + return jspb.Message.setProto3BytesField(this, 15, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.AddgossipRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.AddgossipRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.AddgossipRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AddgossipRequest.toObject = function(includeInstance, msg) { + var f, obj = { + message: msg.getMessage_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.cln.AddgossipRequest} + */ +proto.cln.AddgossipRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.AddgossipRequest; + return proto.cln.AddgossipRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.AddgossipRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.AddgossipRequest} + */ +proto.cln.AddgossipRequest.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.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.AddgossipRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.AddgossipRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.AddgossipRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AddgossipRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes message = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.AddgossipRequest.prototype.getMessage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes message = 1; + * This is a type-conversion wrapper around `getMessage()` + * @return {string} + */ +proto.cln.AddgossipRequest.prototype.getMessage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMessage())); +}; + + +/** + * optional bytes message = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMessage()` + * @return {!Uint8Array} + */ +proto.cln.AddgossipRequest.prototype.getMessage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMessage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.AddgossipRequest} returns this + */ +proto.cln.AddgossipRequest.prototype.setMessage = 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.cln.AddgossipResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.AddgossipResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.AddgossipResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AddgossipResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.AddgossipResponse} + */ +proto.cln.AddgossipResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.AddgossipResponse; + return proto.cln.AddgossipResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.AddgossipResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.AddgossipResponse} + */ +proto.cln.AddgossipResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.AddgossipResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.AddgossipResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.AddgossipResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AddgossipResponse.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.cln.AutocleaninvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.AutocleaninvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.AutocleaninvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AutocleaninvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + expiredBy: jspb.Message.getFieldWithDefault(msg, 1, 0), + cycleSeconds: 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.cln.AutocleaninvoiceRequest} + */ +proto.cln.AutocleaninvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.AutocleaninvoiceRequest; + return proto.cln.AutocleaninvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.AutocleaninvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.AutocleaninvoiceRequest} + */ +proto.cln.AutocleaninvoiceRequest.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.setExpiredBy(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCycleSeconds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.AutocleaninvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.AutocleaninvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.AutocleaninvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AutocleaninvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 expired_by = 1; + * @return {number} + */ +proto.cln.AutocleaninvoiceRequest.prototype.getExpiredBy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.AutocleaninvoiceRequest} returns this + */ +proto.cln.AutocleaninvoiceRequest.prototype.setExpiredBy = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.AutocleaninvoiceRequest} returns this + */ +proto.cln.AutocleaninvoiceRequest.prototype.clearExpiredBy = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AutocleaninvoiceRequest.prototype.hasExpiredBy = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 cycle_seconds = 2; + * @return {number} + */ +proto.cln.AutocleaninvoiceRequest.prototype.getCycleSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.AutocleaninvoiceRequest} returns this + */ +proto.cln.AutocleaninvoiceRequest.prototype.setCycleSeconds = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.AutocleaninvoiceRequest} returns this + */ +proto.cln.AutocleaninvoiceRequest.prototype.clearCycleSeconds = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AutocleaninvoiceRequest.prototype.hasCycleSeconds = 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.cln.AutocleaninvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.AutocleaninvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.AutocleaninvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AutocleaninvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + enabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + expiredBy: jspb.Message.getFieldWithDefault(msg, 2, 0), + cycleSeconds: 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.cln.AutocleaninvoiceResponse} + */ +proto.cln.AutocleaninvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.AutocleaninvoiceResponse; + return proto.cln.AutocleaninvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.AutocleaninvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.AutocleaninvoiceResponse} + */ +proto.cln.AutocleaninvoiceResponse.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.setEnabled(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiredBy(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCycleSeconds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.AutocleaninvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.AutocleaninvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.AutocleaninvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AutocleaninvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional bool enabled = 1; + * @return {boolean} + */ +proto.cln.AutocleaninvoiceResponse.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.AutocleaninvoiceResponse} returns this + */ +proto.cln.AutocleaninvoiceResponse.prototype.setEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional uint64 expired_by = 2; + * @return {number} + */ +proto.cln.AutocleaninvoiceResponse.prototype.getExpiredBy = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.AutocleaninvoiceResponse} returns this + */ +proto.cln.AutocleaninvoiceResponse.prototype.setExpiredBy = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.AutocleaninvoiceResponse} returns this + */ +proto.cln.AutocleaninvoiceResponse.prototype.clearExpiredBy = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AutocleaninvoiceResponse.prototype.hasExpiredBy = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 cycle_seconds = 3; + * @return {number} + */ +proto.cln.AutocleaninvoiceResponse.prototype.getCycleSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.AutocleaninvoiceResponse} returns this + */ +proto.cln.AutocleaninvoiceResponse.prototype.setCycleSeconds = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.AutocleaninvoiceResponse} returns this + */ +proto.cln.AutocleaninvoiceResponse.prototype.clearCycleSeconds = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AutocleaninvoiceResponse.prototype.hasCycleSeconds = 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.cln.CheckmessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CheckmessageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CheckmessageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CheckmessageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + zbase: jspb.Message.getFieldWithDefault(msg, 2, ""), + pubkey: msg.getPubkey_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.cln.CheckmessageRequest} + */ +proto.cln.CheckmessageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CheckmessageRequest; + return proto.cln.CheckmessageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CheckmessageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CheckmessageRequest} + */ +proto.cln.CheckmessageRequest.deserializeBinaryFromReader = function(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; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setZbase(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CheckmessageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CheckmessageRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CheckmessageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CheckmessageRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getZbase(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.cln.CheckmessageRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CheckmessageRequest} returns this + */ +proto.cln.CheckmessageRequest.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string zbase = 2; + * @return {string} + */ +proto.cln.CheckmessageRequest.prototype.getZbase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CheckmessageRequest} returns this + */ +proto.cln.CheckmessageRequest.prototype.setZbase = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes pubkey = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.CheckmessageRequest.prototype.getPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes pubkey = 3; + * This is a type-conversion wrapper around `getPubkey()` + * @return {string} + */ +proto.cln.CheckmessageRequest.prototype.getPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubkey())); +}; + + +/** + * optional bytes pubkey = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubkey()` + * @return {!Uint8Array} + */ +proto.cln.CheckmessageRequest.prototype.getPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubkey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CheckmessageRequest} returns this + */ +proto.cln.CheckmessageRequest.prototype.setPubkey = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CheckmessageRequest} returns this + */ +proto.cln.CheckmessageRequest.prototype.clearPubkey = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CheckmessageRequest.prototype.hasPubkey = 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.cln.CheckmessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CheckmessageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CheckmessageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CheckmessageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + verified: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + pubkey: msg.getPubkey_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.cln.CheckmessageResponse} + */ +proto.cln.CheckmessageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CheckmessageResponse; + return proto.cln.CheckmessageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CheckmessageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CheckmessageResponse} + */ +proto.cln.CheckmessageResponse.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.setVerified(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CheckmessageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CheckmessageResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CheckmessageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CheckmessageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVerified(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bool verified = 1; + * @return {boolean} + */ +proto.cln.CheckmessageResponse.prototype.getVerified = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.CheckmessageResponse} returns this + */ +proto.cln.CheckmessageResponse.prototype.setVerified = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bytes pubkey = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.CheckmessageResponse.prototype.getPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes pubkey = 2; + * This is a type-conversion wrapper around `getPubkey()` + * @return {string} + */ +proto.cln.CheckmessageResponse.prototype.getPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubkey())); +}; + + +/** + * optional bytes pubkey = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubkey()` + * @return {!Uint8Array} + */ +proto.cln.CheckmessageResponse.prototype.getPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubkey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CheckmessageResponse} returns this + */ +proto.cln.CheckmessageResponse.prototype.setPubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.CloseRequest.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.cln.CloseRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CloseRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CloseRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CloseRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + unilateraltimeout: jspb.Message.getFieldWithDefault(msg, 2, 0), + destination: jspb.Message.getFieldWithDefault(msg, 3, ""), + feeNegotiationStep: jspb.Message.getFieldWithDefault(msg, 4, ""), + wrongFunding: (f = msg.getWrongFunding()) && cln_primitives_pb.Outpoint.toObject(includeInstance, f), + forceLeaseClosed: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + feerangeList: jspb.Message.toObjectList(msg.getFeerangeList(), + cln_primitives_pb.Feerate.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.cln.CloseRequest} + */ +proto.cln.CloseRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CloseRequest; + return proto.cln.CloseRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CloseRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CloseRequest} + */ +proto.cln.CloseRequest.deserializeBinaryFromReader = function(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 {number} */ (reader.readUint32()); + msg.setUnilateraltimeout(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDestination(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFeeNegotiationStep(value); + break; + case 5: + var value = new cln_primitives_pb.Outpoint; + reader.readMessage(value,cln_primitives_pb.Outpoint.deserializeBinaryFromReader); + msg.setWrongFunding(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setForceLeaseClosed(value); + break; + case 7: + var value = new cln_primitives_pb.Feerate; + reader.readMessage(value,cln_primitives_pb.Feerate.deserializeBinaryFromReader); + msg.addFeerange(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CloseRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CloseRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CloseRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CloseRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 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 = message.getWrongFunding(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Outpoint.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } + f = message.getFeerangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cln_primitives_pb.Feerate.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.cln.CloseRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 unilateraltimeout = 2; + * @return {number} + */ +proto.cln.CloseRequest.prototype.getUnilateraltimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.setUnilateraltimeout = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.clearUnilateraltimeout = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseRequest.prototype.hasUnilateraltimeout = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string destination = 3; + * @return {string} + */ +proto.cln.CloseRequest.prototype.getDestination = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.clearDestination = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseRequest.prototype.hasDestination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string fee_negotiation_step = 4; + * @return {string} + */ +proto.cln.CloseRequest.prototype.getFeeNegotiationStep = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.setFeeNegotiationStep = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.clearFeeNegotiationStep = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseRequest.prototype.hasFeeNegotiationStep = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Outpoint wrong_funding = 5; + * @return {?proto.cln.Outpoint} + */ +proto.cln.CloseRequest.prototype.getWrongFunding = function() { + return /** @type{?proto.cln.Outpoint} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Outpoint, 5)); +}; + + +/** + * @param {?proto.cln.Outpoint|undefined} value + * @return {!proto.cln.CloseRequest} returns this +*/ +proto.cln.CloseRequest.prototype.setWrongFunding = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.clearWrongFunding = function() { + return this.setWrongFunding(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseRequest.prototype.hasWrongFunding = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool force_lease_closed = 6; + * @return {boolean} + */ +proto.cln.CloseRequest.prototype.getForceLeaseClosed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.setForceLeaseClosed = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.clearForceLeaseClosed = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseRequest.prototype.hasForceLeaseClosed = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated Feerate feerange = 7; + * @return {!Array} + */ +proto.cln.CloseRequest.prototype.getFeerangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cln_primitives_pb.Feerate, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.CloseRequest} returns this +*/ +proto.cln.CloseRequest.prototype.setFeerangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cln.Feerate=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.Feerate} + */ +proto.cln.CloseRequest.prototype.addFeerange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cln.Feerate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.CloseRequest} returns this + */ +proto.cln.CloseRequest.prototype.clearFeerangeList = function() { + return this.setFeerangeList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.CloseResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CloseResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CloseResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CloseResponse.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + tx: msg.getTx_asB64(), + txid: msg.getTxid_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.cln.CloseResponse} + */ +proto.cln.CloseResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CloseResponse; + return proto.cln.CloseResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CloseResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CloseResponse} + */ +proto.cln.CloseResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.CloseResponse.CloseType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CloseResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CloseResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CloseResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CloseResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.CloseResponse.CloseType = { + MUTUAL: 0, + UNILATERAL: 1, + UNOPENED: 2 +}; + +/** + * optional CloseType item_type = 1; + * @return {!proto.cln.CloseResponse.CloseType} + */ +proto.cln.CloseResponse.prototype.getItemType = function() { + return /** @type {!proto.cln.CloseResponse.CloseType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.CloseResponse.CloseType} value + * @return {!proto.cln.CloseResponse} returns this + */ +proto.cln.CloseResponse.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes tx = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.CloseResponse.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes tx = 2; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.cln.CloseResponse.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 2; + * 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.cln.CloseResponse.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CloseResponse} returns this + */ +proto.cln.CloseResponse.prototype.setTx = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CloseResponse} returns this + */ +proto.cln.CloseResponse.prototype.clearTx = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes txid = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.CloseResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes txid = 3; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.CloseResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.CloseResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CloseResponse} returns this + */ +proto.cln.CloseResponse.prototype.setTxid = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CloseResponse} returns this + */ +proto.cln.CloseResponse.prototype.clearTxid = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CloseResponse.prototype.hasTxid = 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.cln.ConnectRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ConnectRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ConnectRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ConnectRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + host: 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.cln.ConnectRequest} + */ +proto.cln.ConnectRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ConnectRequest; + return proto.cln.ConnectRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ConnectRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ConnectRequest} + */ +proto.cln.ConnectRequest.deserializeBinaryFromReader = function(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.setHost(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.cln.ConnectRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ConnectRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ConnectRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ConnectRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + 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 {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.cln.ConnectRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ConnectRequest} returns this + */ +proto.cln.ConnectRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string host = 2; + * @return {string} + */ +proto.cln.ConnectRequest.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ConnectRequest} returns this + */ +proto.cln.ConnectRequest.prototype.setHost = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ConnectRequest} returns this + */ +proto.cln.ConnectRequest.prototype.clearHost = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ConnectRequest.prototype.hasHost = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 port = 3; + * @return {number} + */ +proto.cln.ConnectRequest.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ConnectRequest} returns this + */ +proto.cln.ConnectRequest.prototype.setPort = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ConnectRequest} returns this + */ +proto.cln.ConnectRequest.prototype.clearPort = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ConnectRequest.prototype.hasPort = 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.cln.ConnectResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ConnectResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ConnectResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ConnectResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + features: msg.getFeatures_asB64(), + direction: jspb.Message.getFieldWithDefault(msg, 3, 0), + address: (f = msg.getAddress()) && proto.cln.ConnectAddress.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ConnectResponse} + */ +proto.cln.ConnectResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ConnectResponse; + return proto.cln.ConnectResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ConnectResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ConnectResponse} + */ +proto.cln.ConnectResponse.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.setId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFeatures(value); + break; + case 3: + var value = /** @type {!proto.cln.ConnectResponse.ConnectDirection} */ (reader.readEnum()); + msg.setDirection(value); + break; + case 4: + var value = new proto.cln.ConnectAddress; + reader.readMessage(value,proto.cln.ConnectAddress.deserializeBinaryFromReader); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ConnectResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ConnectResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ConnectResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ConnectResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFeatures_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getDirection(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getAddress(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cln.ConnectAddress.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ConnectResponse.ConnectDirection = { + IN: 0, + OUT: 1 +}; + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ConnectResponse.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.ConnectResponse.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.ConnectResponse.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ConnectResponse} returns this + */ +proto.cln.ConnectResponse.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes features = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ConnectResponse.prototype.getFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes features = 2; + * This is a type-conversion wrapper around `getFeatures()` + * @return {string} + */ +proto.cln.ConnectResponse.prototype.getFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFeatures())); +}; + + +/** + * optional bytes features = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFeatures()` + * @return {!Uint8Array} + */ +proto.cln.ConnectResponse.prototype.getFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ConnectResponse} returns this + */ +proto.cln.ConnectResponse.prototype.setFeatures = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional ConnectDirection direction = 3; + * @return {!proto.cln.ConnectResponse.ConnectDirection} + */ +proto.cln.ConnectResponse.prototype.getDirection = function() { + return /** @type {!proto.cln.ConnectResponse.ConnectDirection} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.ConnectResponse.ConnectDirection} value + * @return {!proto.cln.ConnectResponse} returns this + */ +proto.cln.ConnectResponse.prototype.setDirection = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional ConnectAddress address = 4; + * @return {?proto.cln.ConnectAddress} + */ +proto.cln.ConnectResponse.prototype.getAddress = function() { + return /** @type{?proto.cln.ConnectAddress} */ ( + jspb.Message.getWrapperField(this, proto.cln.ConnectAddress, 4)); +}; + + +/** + * @param {?proto.cln.ConnectAddress|undefined} value + * @return {!proto.cln.ConnectResponse} returns this +*/ +proto.cln.ConnectResponse.prototype.setAddress = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ConnectResponse} returns this + */ +proto.cln.ConnectResponse.prototype.clearAddress = function() { + return this.setAddress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ConnectResponse.prototype.hasAddress = 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.cln.ConnectAddress.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ConnectAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ConnectAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ConnectAddress.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + socket: jspb.Message.getFieldWithDefault(msg, 2, ""), + address: jspb.Message.getFieldWithDefault(msg, 3, ""), + port: 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.cln.ConnectAddress} + */ +proto.cln.ConnectAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ConnectAddress; + return proto.cln.ConnectAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ConnectAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ConnectAddress} + */ +proto.cln.ConnectAddress.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ConnectAddress.ConnectAddressType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSocket(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 4: + 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.cln.ConnectAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ConnectAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ConnectAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ConnectAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 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 {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ConnectAddress.ConnectAddressType = { + LOCAL_SOCKET: 0, + IPV4: 1, + IPV6: 2, + TORV2: 3, + TORV3: 4 +}; + +/** + * optional ConnectAddressType item_type = 1; + * @return {!proto.cln.ConnectAddress.ConnectAddressType} + */ +proto.cln.ConnectAddress.prototype.getItemType = function() { + return /** @type {!proto.cln.ConnectAddress.ConnectAddressType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ConnectAddress.ConnectAddressType} value + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string socket = 2; + * @return {string} + */ +proto.cln.ConnectAddress.prototype.getSocket = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.setSocket = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.clearSocket = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ConnectAddress.prototype.hasSocket = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.cln.ConnectAddress.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.setAddress = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.clearAddress = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ConnectAddress.prototype.hasAddress = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 port = 4; + * @return {number} + */ +proto.cln.ConnectAddress.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.setPort = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ConnectAddress} returns this + */ +proto.cln.ConnectAddress.prototype.clearPort = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ConnectAddress.prototype.hasPort = 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.cln.CreateinvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CreateinvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CreateinvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateinvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + invstring: jspb.Message.getFieldWithDefault(msg, 1, ""), + label: jspb.Message.getFieldWithDefault(msg, 2, ""), + preimage: msg.getPreimage_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.cln.CreateinvoiceRequest} + */ +proto.cln.CreateinvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CreateinvoiceRequest; + return proto.cln.CreateinvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CreateinvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CreateinvoiceRequest} + */ +proto.cln.CreateinvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setInvstring(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CreateinvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CreateinvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CreateinvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateinvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInvstring(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string invstring = 1; + * @return {string} + */ +proto.cln.CreateinvoiceRequest.prototype.getInvstring = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceRequest} returns this + */ +proto.cln.CreateinvoiceRequest.prototype.setInvstring = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string label = 2; + * @return {string} + */ +proto.cln.CreateinvoiceRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceRequest} returns this + */ +proto.cln.CreateinvoiceRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes preimage = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateinvoiceRequest.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes preimage = 3; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} + */ +proto.cln.CreateinvoiceRequest.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); +}; + + +/** + * optional bytes preimage = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPreimage()` + * @return {!Uint8Array} + */ +proto.cln.CreateinvoiceRequest.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateinvoiceRequest} returns this + */ +proto.cln.CreateinvoiceRequest.prototype.setPreimage = 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.cln.CreateinvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CreateinvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CreateinvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateinvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + bolt11: jspb.Message.getFieldWithDefault(msg, 2, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 3, ""), + paymentHash: msg.getPaymentHash_asB64(), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 6, 0), + description: jspb.Message.getFieldWithDefault(msg, 7, ""), + expiresAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + payIndex: jspb.Message.getFieldWithDefault(msg, 9, 0), + amountReceivedMsat: (f = msg.getAmountReceivedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + paidAt: jspb.Message.getFieldWithDefault(msg, 11, 0), + paymentPreimage: msg.getPaymentPreimage_asB64(), + localOfferId: msg.getLocalOfferId_asB64(), + invreqPayerNote: jspb.Message.getFieldWithDefault(msg, 15, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.CreateinvoiceResponse} + */ +proto.cln.CreateinvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CreateinvoiceResponse; + return proto.cln.CreateinvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CreateinvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CreateinvoiceResponse} + */ +proto.cln.CreateinvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 6: + var value = /** @type {!proto.cln.CreateinvoiceResponse.CreateinvoiceStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPayIndex(value); + break; + case 10: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountReceivedMsat(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPaidAt(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLocalOfferId(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setInvreqPayerNote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CreateinvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CreateinvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CreateinvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateinvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + 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 = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeUint64( + 9, + f + ); + } + f = message.getAmountReceivedMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint64( + 11, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBytes( + 12, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeString( + 15, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.CreateinvoiceResponse.CreateinvoiceStatus = { + PAID: 0, + EXPIRED: 1, + UNPAID: 2 +}; + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bolt11 = 2; + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string bolt12 = 3; + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes payment_hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes payment_hash = 4; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.CreateinvoiceResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.CreateinvoiceResponse} returns this +*/ +proto.cln.CreateinvoiceResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional CreateinvoiceStatus status = 6; + * @return {!proto.cln.CreateinvoiceResponse.CreateinvoiceStatus} + */ +proto.cln.CreateinvoiceResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.CreateinvoiceResponse.CreateinvoiceStatus} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.cln.CreateinvoiceResponse.CreateinvoiceStatus} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 6, value); +}; + + +/** + * optional string description = 7; + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional uint64 expires_at = 8; + * @return {number} + */ +proto.cln.CreateinvoiceResponse.prototype.getExpiresAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional uint64 pay_index = 9; + * @return {number} + */ +proto.cln.CreateinvoiceResponse.prototype.getPayIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setPayIndex = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearPayIndex = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasPayIndex = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Amount amount_received_msat = 10; + * @return {?proto.cln.Amount} + */ +proto.cln.CreateinvoiceResponse.prototype.getAmountReceivedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 10)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.CreateinvoiceResponse} returns this +*/ +proto.cln.CreateinvoiceResponse.prototype.setAmountReceivedMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearAmountReceivedMsat = function() { + return this.setAmountReceivedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasAmountReceivedMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional uint64 paid_at = 11; + * @return {number} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaidAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setPaidAt = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearPaidAt = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasPaidAt = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bytes payment_preimage = 12; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes payment_preimage = 12; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.CreateinvoiceResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes local_offer_id = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateinvoiceResponse.prototype.getLocalOfferId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes local_offer_id = 13; + * This is a type-conversion wrapper around `getLocalOfferId()` + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getLocalOfferId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLocalOfferId())); +}; + + +/** + * optional bytes local_offer_id = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLocalOfferId()` + * @return {!Uint8Array} + */ +proto.cln.CreateinvoiceResponse.prototype.getLocalOfferId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLocalOfferId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setLocalOfferId = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearLocalOfferId = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasLocalOfferId = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional string invreq_payer_note = 15; + * @return {string} + */ +proto.cln.CreateinvoiceResponse.prototype.getInvreqPayerNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.setInvreqPayerNote = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateinvoiceResponse} returns this + */ +proto.cln.CreateinvoiceResponse.prototype.clearInvreqPayerNote = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateinvoiceResponse.prototype.hasInvreqPayerNote = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DatastoreRequest.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.cln.DatastoreRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DatastoreRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DatastoreRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DatastoreRequest.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + string: jspb.Message.getFieldWithDefault(msg, 6, ""), + hex: msg.getHex_asB64(), + mode: jspb.Message.getFieldWithDefault(msg, 3, 0), + generation: 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.cln.DatastoreRequest} + */ +proto.cln.DatastoreRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DatastoreRequest; + return proto.cln.DatastoreRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DatastoreRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DatastoreRequest} + */ +proto.cln.DatastoreRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addKey(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setString(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + case 3: + var value = /** @type {!proto.cln.DatastoreRequest.DatastoreMode} */ (reader.readEnum()); + msg.setMode(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGeneration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DatastoreRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DatastoreRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DatastoreRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DatastoreRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!proto.cln.DatastoreRequest.DatastoreMode} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.DatastoreRequest.DatastoreMode = { + MUST_CREATE: 0, + MUST_REPLACE: 1, + CREATE_OR_REPLACE: 2, + MUST_APPEND: 3, + CREATE_OR_APPEND: 4 +}; + +/** + * repeated string key = 5; + * @return {!Array} + */ +proto.cln.DatastoreRequest.prototype.getKeyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.setKeyList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.addKey = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.clearKeyList = function() { + return this.setKeyList([]); +}; + + +/** + * optional string string = 6; + * @return {string} + */ +proto.cln.DatastoreRequest.prototype.getString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.setString = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.clearString = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreRequest.prototype.hasString = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes hex = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.DatastoreRequest.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hex = 2; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.DatastoreRequest.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.DatastoreRequest.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.setHex = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.clearHex = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreRequest.prototype.hasHex = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional DatastoreMode mode = 3; + * @return {!proto.cln.DatastoreRequest.DatastoreMode} + */ +proto.cln.DatastoreRequest.prototype.getMode = function() { + return /** @type {!proto.cln.DatastoreRequest.DatastoreMode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.DatastoreRequest.DatastoreMode} value + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.setMode = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.clearMode = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreRequest.prototype.hasMode = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 generation = 4; + * @return {number} + */ +proto.cln.DatastoreRequest.prototype.getGeneration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.setGeneration = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreRequest} returns this + */ +proto.cln.DatastoreRequest.prototype.clearGeneration = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreRequest.prototype.hasGeneration = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DatastoreResponse.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.cln.DatastoreResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DatastoreResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DatastoreResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DatastoreResponse.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + generation: jspb.Message.getFieldWithDefault(msg, 2, 0), + hex: msg.getHex_asB64(), + string: 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.cln.DatastoreResponse} + */ +proto.cln.DatastoreResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DatastoreResponse; + return proto.cln.DatastoreResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DatastoreResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DatastoreResponse} + */ +proto.cln.DatastoreResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGeneration(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setString(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DatastoreResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DatastoreResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DatastoreResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DatastoreResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * repeated string key = 5; + * @return {!Array} + */ +proto.cln.DatastoreResponse.prototype.getKeyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.setKeyList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.addKey = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.clearKeyList = function() { + return this.setKeyList([]); +}; + + +/** + * optional uint64 generation = 2; + * @return {number} + */ +proto.cln.DatastoreResponse.prototype.getGeneration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.setGeneration = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.clearGeneration = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreResponse.prototype.hasGeneration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes hex = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.DatastoreResponse.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes hex = 3; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.DatastoreResponse.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.DatastoreResponse.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.setHex = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.clearHex = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreResponse.prototype.hasHex = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string string = 4; + * @return {string} + */ +proto.cln.DatastoreResponse.prototype.getString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.setString = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DatastoreResponse} returns this + */ +proto.cln.DatastoreResponse.prototype.clearString = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DatastoreResponse.prototype.hasString = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.CreateonionRequest.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.cln.CreateonionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CreateonionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CreateonionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateonionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + hopsList: jspb.Message.toObjectList(msg.getHopsList(), + proto.cln.CreateonionHops.toObject, includeInstance), + assocdata: msg.getAssocdata_asB64(), + sessionKey: msg.getSessionKey_asB64(), + onionSize: 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.cln.CreateonionRequest} + */ +proto.cln.CreateonionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CreateonionRequest; + return proto.cln.CreateonionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CreateonionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CreateonionRequest} + */ +proto.cln.CreateonionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.CreateonionHops; + reader.readMessage(value,proto.cln.CreateonionHops.deserializeBinaryFromReader); + msg.addHops(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAssocdata(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSessionKey(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOnionSize(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CreateonionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CreateonionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CreateonionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateonionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHopsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.CreateonionHops.serializeBinaryToWriter + ); + } + f = message.getAssocdata_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } +}; + + +/** + * repeated CreateonionHops hops = 1; + * @return {!Array} + */ +proto.cln.CreateonionRequest.prototype.getHopsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.CreateonionHops, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.CreateonionRequest} returns this +*/ +proto.cln.CreateonionRequest.prototype.setHopsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.CreateonionHops=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.CreateonionHops} + */ +proto.cln.CreateonionRequest.prototype.addHops = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.CreateonionHops, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.CreateonionRequest} returns this + */ +proto.cln.CreateonionRequest.prototype.clearHopsList = function() { + return this.setHopsList([]); +}; + + +/** + * optional bytes assocdata = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateonionRequest.prototype.getAssocdata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes assocdata = 2; + * This is a type-conversion wrapper around `getAssocdata()` + * @return {string} + */ +proto.cln.CreateonionRequest.prototype.getAssocdata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAssocdata())); +}; + + +/** + * optional bytes assocdata = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAssocdata()` + * @return {!Uint8Array} + */ +proto.cln.CreateonionRequest.prototype.getAssocdata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAssocdata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateonionRequest} returns this + */ +proto.cln.CreateonionRequest.prototype.setAssocdata = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes session_key = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateonionRequest.prototype.getSessionKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes session_key = 3; + * This is a type-conversion wrapper around `getSessionKey()` + * @return {string} + */ +proto.cln.CreateonionRequest.prototype.getSessionKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSessionKey())); +}; + + +/** + * optional bytes session_key = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSessionKey()` + * @return {!Uint8Array} + */ +proto.cln.CreateonionRequest.prototype.getSessionKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSessionKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateonionRequest} returns this + */ +proto.cln.CreateonionRequest.prototype.setSessionKey = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateonionRequest} returns this + */ +proto.cln.CreateonionRequest.prototype.clearSessionKey = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateonionRequest.prototype.hasSessionKey = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 onion_size = 4; + * @return {number} + */ +proto.cln.CreateonionRequest.prototype.getOnionSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.CreateonionRequest} returns this + */ +proto.cln.CreateonionRequest.prototype.setOnionSize = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.CreateonionRequest} returns this + */ +proto.cln.CreateonionRequest.prototype.clearOnionSize = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.CreateonionRequest.prototype.hasOnionSize = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.CreateonionResponse.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.cln.CreateonionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CreateonionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CreateonionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateonionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + onion: msg.getOnion_asB64(), + sharedSecretsList: msg.getSharedSecretsList_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.cln.CreateonionResponse} + */ +proto.cln.CreateonionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CreateonionResponse; + return proto.cln.CreateonionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CreateonionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CreateonionResponse} + */ +proto.cln.CreateonionResponse.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.setOnion(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSharedSecrets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CreateonionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CreateonionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CreateonionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateonionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOnion_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getSharedSecretsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes onion = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateonionResponse.prototype.getOnion = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes onion = 1; + * This is a type-conversion wrapper around `getOnion()` + * @return {string} + */ +proto.cln.CreateonionResponse.prototype.getOnion_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOnion())); +}; + + +/** + * optional bytes onion = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOnion()` + * @return {!Uint8Array} + */ +proto.cln.CreateonionResponse.prototype.getOnion_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOnion())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateonionResponse} returns this + */ +proto.cln.CreateonionResponse.prototype.setOnion = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated bytes shared_secrets = 2; + * @return {!(Array|Array)} + */ +proto.cln.CreateonionResponse.prototype.getSharedSecretsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes shared_secrets = 2; + * This is a type-conversion wrapper around `getSharedSecretsList()` + * @return {!Array} + */ +proto.cln.CreateonionResponse.prototype.getSharedSecretsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSharedSecretsList())); +}; + + +/** + * repeated bytes shared_secrets = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSharedSecretsList()` + * @return {!Array} + */ +proto.cln.CreateonionResponse.prototype.getSharedSecretsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSharedSecretsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cln.CreateonionResponse} returns this + */ +proto.cln.CreateonionResponse.prototype.setSharedSecretsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cln.CreateonionResponse} returns this + */ +proto.cln.CreateonionResponse.prototype.addSharedSecrets = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.CreateonionResponse} returns this + */ +proto.cln.CreateonionResponse.prototype.clearSharedSecretsList = function() { + return this.setSharedSecretsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.CreateonionHops.prototype.toObject = function(opt_includeInstance) { + return proto.cln.CreateonionHops.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.CreateonionHops} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateonionHops.toObject = function(includeInstance, msg) { + var f, obj = { + pubkey: msg.getPubkey_asB64(), + payload: msg.getPayload_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.CreateonionHops} + */ +proto.cln.CreateonionHops.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.CreateonionHops; + return proto.cln.CreateonionHops.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.CreateonionHops} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.CreateonionHops} + */ +proto.cln.CreateonionHops.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPubkey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.CreateonionHops.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.CreateonionHops.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.CreateonionHops} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.CreateonionHops.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPayload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes pubkey = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateonionHops.prototype.getPubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes pubkey = 1; + * This is a type-conversion wrapper around `getPubkey()` + * @return {string} + */ +proto.cln.CreateonionHops.prototype.getPubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPubkey())); +}; + + +/** + * optional bytes pubkey = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPubkey()` + * @return {!Uint8Array} + */ +proto.cln.CreateonionHops.prototype.getPubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPubkey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateonionHops} returns this + */ +proto.cln.CreateonionHops.prototype.setPubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes payload = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.CreateonionHops.prototype.getPayload = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payload = 2; + * This is a type-conversion wrapper around `getPayload()` + * @return {string} + */ +proto.cln.CreateonionHops.prototype.getPayload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayload())); +}; + + +/** + * optional bytes payload = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayload()` + * @return {!Uint8Array} + */ +proto.cln.CreateonionHops.prototype.getPayload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.CreateonionHops} returns this + */ +proto.cln.CreateonionHops.prototype.setPayload = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DeldatastoreRequest.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.cln.DeldatastoreRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DeldatastoreRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DeldatastoreRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DeldatastoreRequest.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + generation: 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.cln.DeldatastoreRequest} + */ +proto.cln.DeldatastoreRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DeldatastoreRequest; + return proto.cln.DeldatastoreRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DeldatastoreRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DeldatastoreRequest} + */ +proto.cln.DeldatastoreRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGeneration(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DeldatastoreRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DeldatastoreRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DeldatastoreRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DeldatastoreRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * repeated string key = 3; + * @return {!Array} + */ +proto.cln.DeldatastoreRequest.prototype.getKeyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DeldatastoreRequest} returns this + */ +proto.cln.DeldatastoreRequest.prototype.setKeyList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.DeldatastoreRequest} returns this + */ +proto.cln.DeldatastoreRequest.prototype.addKey = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DeldatastoreRequest} returns this + */ +proto.cln.DeldatastoreRequest.prototype.clearKeyList = function() { + return this.setKeyList([]); +}; + + +/** + * optional uint64 generation = 2; + * @return {number} + */ +proto.cln.DeldatastoreRequest.prototype.getGeneration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DeldatastoreRequest} returns this + */ +proto.cln.DeldatastoreRequest.prototype.setGeneration = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DeldatastoreRequest} returns this + */ +proto.cln.DeldatastoreRequest.prototype.clearGeneration = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DeldatastoreRequest.prototype.hasGeneration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DeldatastoreResponse.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.cln.DeldatastoreResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DeldatastoreResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DeldatastoreResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DeldatastoreResponse.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + generation: jspb.Message.getFieldWithDefault(msg, 2, 0), + hex: msg.getHex_asB64(), + string: 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.cln.DeldatastoreResponse} + */ +proto.cln.DeldatastoreResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DeldatastoreResponse; + return proto.cln.DeldatastoreResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DeldatastoreResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DeldatastoreResponse} + */ +proto.cln.DeldatastoreResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGeneration(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setString(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DeldatastoreResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DeldatastoreResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DeldatastoreResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DeldatastoreResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * repeated string key = 5; + * @return {!Array} + */ +proto.cln.DeldatastoreResponse.prototype.getKeyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.setKeyList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.addKey = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.clearKeyList = function() { + return this.setKeyList([]); +}; + + +/** + * optional uint64 generation = 2; + * @return {number} + */ +proto.cln.DeldatastoreResponse.prototype.getGeneration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.setGeneration = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.clearGeneration = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DeldatastoreResponse.prototype.hasGeneration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes hex = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.DeldatastoreResponse.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes hex = 3; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.DeldatastoreResponse.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.DeldatastoreResponse.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.setHex = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.clearHex = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DeldatastoreResponse.prototype.hasHex = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string string = 4; + * @return {string} + */ +proto.cln.DeldatastoreResponse.prototype.getString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.setString = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DeldatastoreResponse} returns this + */ +proto.cln.DeldatastoreResponse.prototype.clearString = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DeldatastoreResponse.prototype.hasString = 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.cln.DelexpiredinvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DelexpiredinvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DelexpiredinvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelexpiredinvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + maxexpirytime: 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.cln.DelexpiredinvoiceRequest} + */ +proto.cln.DelexpiredinvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DelexpiredinvoiceRequest; + return proto.cln.DelexpiredinvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DelexpiredinvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DelexpiredinvoiceRequest} + */ +proto.cln.DelexpiredinvoiceRequest.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.setMaxexpirytime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DelexpiredinvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DelexpiredinvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DelexpiredinvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelexpiredinvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 maxexpirytime = 1; + * @return {number} + */ +proto.cln.DelexpiredinvoiceRequest.prototype.getMaxexpirytime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DelexpiredinvoiceRequest} returns this + */ +proto.cln.DelexpiredinvoiceRequest.prototype.setMaxexpirytime = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelexpiredinvoiceRequest} returns this + */ +proto.cln.DelexpiredinvoiceRequest.prototype.clearMaxexpirytime = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelexpiredinvoiceRequest.prototype.hasMaxexpirytime = 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.cln.DelexpiredinvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DelexpiredinvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DelexpiredinvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelexpiredinvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.DelexpiredinvoiceResponse} + */ +proto.cln.DelexpiredinvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DelexpiredinvoiceResponse; + return proto.cln.DelexpiredinvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DelexpiredinvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DelexpiredinvoiceResponse} + */ +proto.cln.DelexpiredinvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DelexpiredinvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DelexpiredinvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DelexpiredinvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelexpiredinvoiceResponse.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.cln.DelinvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DelinvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DelinvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelinvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + status: jspb.Message.getFieldWithDefault(msg, 2, 0), + desconly: 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.cln.DelinvoiceRequest} + */ +proto.cln.DelinvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DelinvoiceRequest; + return proto.cln.DelinvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DelinvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DelinvoiceRequest} + */ +proto.cln.DelinvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {!proto.cln.DelinvoiceRequest.DelinvoiceStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDesconly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DelinvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DelinvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DelinvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelinvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.DelinvoiceRequest.DelinvoiceStatus = { + PAID: 0, + EXPIRED: 1, + UNPAID: 2 +}; + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.DelinvoiceRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DelinvoiceRequest} returns this + */ +proto.cln.DelinvoiceRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional DelinvoiceStatus status = 2; + * @return {!proto.cln.DelinvoiceRequest.DelinvoiceStatus} + */ +proto.cln.DelinvoiceRequest.prototype.getStatus = function() { + return /** @type {!proto.cln.DelinvoiceRequest.DelinvoiceStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cln.DelinvoiceRequest.DelinvoiceStatus} value + * @return {!proto.cln.DelinvoiceRequest} returns this + */ +proto.cln.DelinvoiceRequest.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bool desconly = 3; + * @return {boolean} + */ +proto.cln.DelinvoiceRequest.prototype.getDesconly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.DelinvoiceRequest} returns this + */ +proto.cln.DelinvoiceRequest.prototype.setDesconly = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelinvoiceRequest} returns this + */ +proto.cln.DelinvoiceRequest.prototype.clearDesconly = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceRequest.prototype.hasDesconly = 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.cln.DelinvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DelinvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DelinvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelinvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + bolt11: jspb.Message.getFieldWithDefault(msg, 2, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 3, ""), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + description: jspb.Message.getFieldWithDefault(msg, 5, ""), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 7, 0), + expiresAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + localOfferId: msg.getLocalOfferId_asB64(), + invreqPayerNote: 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.cln.DelinvoiceResponse} + */ +proto.cln.DelinvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DelinvoiceResponse; + return proto.cln.DelinvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DelinvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DelinvoiceResponse} + */ +proto.cln.DelinvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 7: + var value = /** @type {!proto.cln.DelinvoiceResponse.DelinvoiceStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLocalOfferId(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setInvreqPayerNote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DelinvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DelinvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DelinvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DelinvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + 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 = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBytes( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.DelinvoiceResponse.DelinvoiceStatus = { + PAID: 0, + EXPIRED: 1, + UNPAID: 2 +}; + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bolt11 = 2; + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string bolt12 = 3; + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount amount_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.DelinvoiceResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.DelinvoiceResponse} returns this +*/ +proto.cln.DelinvoiceResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string description = 5; + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.clearDescription = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceResponse.prototype.hasDescription = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes payment_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.DelinvoiceResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes payment_hash = 6; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.DelinvoiceResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional DelinvoiceStatus status = 7; + * @return {!proto.cln.DelinvoiceResponse.DelinvoiceStatus} + */ +proto.cln.DelinvoiceResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.DelinvoiceResponse.DelinvoiceStatus} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.cln.DelinvoiceResponse.DelinvoiceStatus} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); +}; + + +/** + * optional uint64 expires_at = 8; + * @return {number} + */ +proto.cln.DelinvoiceResponse.prototype.getExpiresAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional bytes local_offer_id = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.DelinvoiceResponse.prototype.getLocalOfferId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes local_offer_id = 9; + * This is a type-conversion wrapper around `getLocalOfferId()` + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getLocalOfferId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLocalOfferId())); +}; + + +/** + * optional bytes local_offer_id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLocalOfferId()` + * @return {!Uint8Array} + */ +proto.cln.DelinvoiceResponse.prototype.getLocalOfferId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLocalOfferId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setLocalOfferId = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.clearLocalOfferId = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceResponse.prototype.hasLocalOfferId = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string invreq_payer_note = 11; + * @return {string} + */ +proto.cln.DelinvoiceResponse.prototype.getInvreqPayerNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.setInvreqPayerNote = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DelinvoiceResponse} returns this + */ +proto.cln.DelinvoiceResponse.prototype.clearInvreqPayerNote = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DelinvoiceResponse.prototype.hasInvreqPayerNote = function() { + return jspb.Message.getField(this, 11) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.InvoiceRequest.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.cln.InvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.InvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.InvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.InvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.AmountOrAny.toObject(includeInstance, f), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + expiry: jspb.Message.getFieldWithDefault(msg, 7, 0), + fallbacksList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + preimage: msg.getPreimage_asB64(), + cltv: jspb.Message.getFieldWithDefault(msg, 6, 0), + deschashonly: jspb.Message.getBooleanFieldWithDefault(msg, 9, 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.cln.InvoiceRequest} + */ +proto.cln.InvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.InvoiceRequest; + return proto.cln.InvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.InvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.InvoiceRequest} + */ +proto.cln.InvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 10: + var value = new cln_primitives_pb.AmountOrAny; + reader.readMessage(value,cln_primitives_pb.AmountOrAny.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiry(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addFallbacks(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCltv(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeschashonly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.InvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.InvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.InvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.InvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.AmountOrAny.serializeBinaryToWriter + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint64( + 7, + f + ); + } + f = message.getFallbacksList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBool( + 9, + f + ); + } +}; + + +/** + * optional AmountOrAny amount_msat = 10; + * @return {?proto.cln.AmountOrAny} + */ +proto.cln.InvoiceRequest.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.AmountOrAny} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.AmountOrAny, 10)); +}; + + +/** + * @param {?proto.cln.AmountOrAny|undefined} value + * @return {!proto.cln.InvoiceRequest} returns this +*/ +proto.cln.InvoiceRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceRequest.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cln.InvoiceRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string label = 3; + * @return {string} + */ +proto.cln.InvoiceRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 expiry = 7; + * @return {number} + */ +proto.cln.InvoiceRequest.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setExpiry = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.clearExpiry = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceRequest.prototype.hasExpiry = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated string fallbacks = 4; + * @return {!Array} + */ +proto.cln.InvoiceRequest.prototype.getFallbacksList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setFallbacksList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.addFallbacks = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.clearFallbacksList = function() { + return this.setFallbacksList([]); +}; + + +/** + * optional bytes preimage = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.InvoiceRequest.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes preimage = 5; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} + */ +proto.cln.InvoiceRequest.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); +}; + + +/** + * optional bytes preimage = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPreimage()` + * @return {!Uint8Array} + */ +proto.cln.InvoiceRequest.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setPreimage = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.clearPreimage = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceRequest.prototype.hasPreimage = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 cltv = 6; + * @return {number} + */ +proto.cln.InvoiceRequest.prototype.getCltv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setCltv = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.clearCltv = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceRequest.prototype.hasCltv = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool deschashonly = 9; + * @return {boolean} + */ +proto.cln.InvoiceRequest.prototype.getDeschashonly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.setDeschashonly = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceRequest} returns this + */ +proto.cln.InvoiceRequest.prototype.clearDeschashonly = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceRequest.prototype.hasDeschashonly = 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.cln.InvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.InvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.InvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.InvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentHash: msg.getPaymentHash_asB64(), + paymentSecret: msg.getPaymentSecret_asB64(), + expiresAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + warningCapacity: jspb.Message.getFieldWithDefault(msg, 5, ""), + warningOffline: jspb.Message.getFieldWithDefault(msg, 6, ""), + warningDeadends: jspb.Message.getFieldWithDefault(msg, 7, ""), + warningPrivateUnused: jspb.Message.getFieldWithDefault(msg, 8, ""), + warningMpp: 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.cln.InvoiceResponse} + */ +proto.cln.InvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.InvoiceResponse; + return proto.cln.InvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.InvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.InvoiceResponse} + */ +proto.cln.InvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentSecret(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningCapacity(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningOffline(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningDeadends(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningPrivateUnused(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMpp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.InvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.InvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.InvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.InvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPaymentSecret_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64( + 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 = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes payment_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.InvoiceResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_hash = 2; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.InvoiceResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes payment_secret = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.InvoiceResponse.prototype.getPaymentSecret = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_secret = 3; + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getPaymentSecret_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentSecret())); +}; + + +/** + * optional bytes payment_secret = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {!Uint8Array} + */ +proto.cln.InvoiceResponse.prototype.getPaymentSecret_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentSecret())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setPaymentSecret = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional uint64 expires_at = 4; + * @return {number} + */ +proto.cln.InvoiceResponse.prototype.getExpiresAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string warning_capacity = 5; + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getWarningCapacity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setWarningCapacity = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.clearWarningCapacity = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceResponse.prototype.hasWarningCapacity = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string warning_offline = 6; + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getWarningOffline = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setWarningOffline = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.clearWarningOffline = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceResponse.prototype.hasWarningOffline = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string warning_deadends = 7; + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getWarningDeadends = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setWarningDeadends = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.clearWarningDeadends = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceResponse.prototype.hasWarningDeadends = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string warning_private_unused = 8; + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getWarningPrivateUnused = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setWarningPrivateUnused = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.clearWarningPrivateUnused = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceResponse.prototype.hasWarningPrivateUnused = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string warning_mpp = 9; + * @return {string} + */ +proto.cln.InvoiceResponse.prototype.getWarningMpp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.setWarningMpp = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.InvoiceResponse} returns this + */ +proto.cln.InvoiceResponse.prototype.clearWarningMpp = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.InvoiceResponse.prototype.hasWarningMpp = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListdatastoreRequest.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.cln.ListdatastoreRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListdatastoreRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListdatastoreRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListdatastoreRequest.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: (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.cln.ListdatastoreRequest} + */ +proto.cln.ListdatastoreRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListdatastoreRequest; + return proto.cln.ListdatastoreRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListdatastoreRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListdatastoreRequest} + */ +proto.cln.ListdatastoreRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListdatastoreRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListdatastoreRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListdatastoreRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListdatastoreRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * repeated string key = 2; + * @return {!Array} + */ +proto.cln.ListdatastoreRequest.prototype.getKeyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListdatastoreRequest} returns this + */ +proto.cln.ListdatastoreRequest.prototype.setKeyList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.ListdatastoreRequest} returns this + */ +proto.cln.ListdatastoreRequest.prototype.addKey = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListdatastoreRequest} returns this + */ +proto.cln.ListdatastoreRequest.prototype.clearKeyList = function() { + return this.setKeyList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListdatastoreResponse.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.cln.ListdatastoreResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListdatastoreResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListdatastoreResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListdatastoreResponse.toObject = function(includeInstance, msg) { + var f, obj = { + datastoreList: jspb.Message.toObjectList(msg.getDatastoreList(), + proto.cln.ListdatastoreDatastore.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.cln.ListdatastoreResponse} + */ +proto.cln.ListdatastoreResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListdatastoreResponse; + return proto.cln.ListdatastoreResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListdatastoreResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListdatastoreResponse} + */ +proto.cln.ListdatastoreResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListdatastoreDatastore; + reader.readMessage(value,proto.cln.ListdatastoreDatastore.deserializeBinaryFromReader); + msg.addDatastore(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListdatastoreResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListdatastoreResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListdatastoreResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListdatastoreResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDatastoreList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListdatastoreDatastore.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListdatastoreDatastore datastore = 1; + * @return {!Array} + */ +proto.cln.ListdatastoreResponse.prototype.getDatastoreList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListdatastoreDatastore, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListdatastoreResponse} returns this +*/ +proto.cln.ListdatastoreResponse.prototype.setDatastoreList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListdatastoreDatastore=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListdatastoreDatastore} + */ +proto.cln.ListdatastoreResponse.prototype.addDatastore = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListdatastoreDatastore, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListdatastoreResponse} returns this + */ +proto.cln.ListdatastoreResponse.prototype.clearDatastoreList = function() { + return this.setDatastoreList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListdatastoreDatastore.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.cln.ListdatastoreDatastore.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListdatastoreDatastore.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListdatastoreDatastore} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListdatastoreDatastore.toObject = function(includeInstance, msg) { + var f, obj = { + keyList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + generation: jspb.Message.getFieldWithDefault(msg, 2, 0), + hex: msg.getHex_asB64(), + string: 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.cln.ListdatastoreDatastore} + */ +proto.cln.ListdatastoreDatastore.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListdatastoreDatastore; + return proto.cln.ListdatastoreDatastore.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListdatastoreDatastore} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListdatastoreDatastore} + */ +proto.cln.ListdatastoreDatastore.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGeneration(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setString(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListdatastoreDatastore.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListdatastoreDatastore.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListdatastoreDatastore} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListdatastoreDatastore.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * repeated string key = 1; + * @return {!Array} + */ +proto.cln.ListdatastoreDatastore.prototype.getKeyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.setKeyList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.addKey = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.clearKeyList = function() { + return this.setKeyList([]); +}; + + +/** + * optional uint64 generation = 2; + * @return {number} + */ +proto.cln.ListdatastoreDatastore.prototype.getGeneration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.setGeneration = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.clearGeneration = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListdatastoreDatastore.prototype.hasGeneration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes hex = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListdatastoreDatastore.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes hex = 3; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.ListdatastoreDatastore.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.ListdatastoreDatastore.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.setHex = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.clearHex = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListdatastoreDatastore.prototype.hasHex = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string string = 4; + * @return {string} + */ +proto.cln.ListdatastoreDatastore.prototype.getString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.setString = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListdatastoreDatastore} returns this + */ +proto.cln.ListdatastoreDatastore.prototype.clearString = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListdatastoreDatastore.prototype.hasString = 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.cln.ListinvoicesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListinvoicesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListinvoicesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListinvoicesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + invstring: jspb.Message.getFieldWithDefault(msg, 2, ""), + paymentHash: msg.getPaymentHash_asB64(), + offerId: 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.cln.ListinvoicesRequest} + */ +proto.cln.ListinvoicesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListinvoicesRequest; + return proto.cln.ListinvoicesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListinvoicesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListinvoicesRequest} + */ +proto.cln.ListinvoicesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInvstring(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOfferId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListinvoicesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListinvoicesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListinvoicesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.ListinvoicesRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.clearLabel = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesRequest.prototype.hasLabel = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string invstring = 2; + * @return {string} + */ +proto.cln.ListinvoicesRequest.prototype.getInvstring = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.setInvstring = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.clearInvstring = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesRequest.prototype.hasInvstring = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListinvoicesRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListinvoicesRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.clearPaymentHash = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesRequest.prototype.hasPaymentHash = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string offer_id = 4; + * @return {string} + */ +proto.cln.ListinvoicesRequest.prototype.getOfferId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.setOfferId = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesRequest} returns this + */ +proto.cln.ListinvoicesRequest.prototype.clearOfferId = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesRequest.prototype.hasOfferId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListinvoicesResponse.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.cln.ListinvoicesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListinvoicesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListinvoicesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListinvoicesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + invoicesList: jspb.Message.toObjectList(msg.getInvoicesList(), + proto.cln.ListinvoicesInvoices.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.cln.ListinvoicesResponse} + */ +proto.cln.ListinvoicesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListinvoicesResponse; + return proto.cln.ListinvoicesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListinvoicesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListinvoicesResponse} + */ +proto.cln.ListinvoicesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListinvoicesInvoices; + reader.readMessage(value,proto.cln.ListinvoicesInvoices.deserializeBinaryFromReader); + msg.addInvoices(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListinvoicesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListinvoicesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListinvoicesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInvoicesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListinvoicesInvoices.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListinvoicesInvoices invoices = 1; + * @return {!Array} + */ +proto.cln.ListinvoicesResponse.prototype.getInvoicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListinvoicesInvoices, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListinvoicesResponse} returns this +*/ +proto.cln.ListinvoicesResponse.prototype.setInvoicesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListinvoicesInvoices=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListinvoicesInvoices} + */ +proto.cln.ListinvoicesResponse.prototype.addInvoices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListinvoicesInvoices, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListinvoicesResponse} returns this + */ +proto.cln.ListinvoicesResponse.prototype.clearInvoicesList = function() { + return this.setInvoicesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListinvoicesInvoices.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListinvoicesInvoices.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListinvoicesInvoices} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListinvoicesInvoices.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiresAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + bolt11: jspb.Message.getFieldWithDefault(msg, 7, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 8, ""), + localOfferId: msg.getLocalOfferId_asB64(), + invreqPayerNote: jspb.Message.getFieldWithDefault(msg, 15, ""), + payIndex: jspb.Message.getFieldWithDefault(msg, 11, 0), + amountReceivedMsat: (f = msg.getAmountReceivedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + paidAt: jspb.Message.getFieldWithDefault(msg, 13, 0), + paymentPreimage: msg.getPaymentPreimage_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.cln.ListinvoicesInvoices} + */ +proto.cln.ListinvoicesInvoices.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListinvoicesInvoices; + return proto.cln.ListinvoicesInvoices.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListinvoicesInvoices} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListinvoicesInvoices} + */ +proto.cln.ListinvoicesInvoices.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {!proto.cln.ListinvoicesInvoices.ListinvoicesInvoicesStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLocalOfferId(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setInvreqPayerNote(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPayIndex(value); + break; + case 12: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountReceivedMsat(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPaidAt(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesInvoices.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListinvoicesInvoices.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListinvoicesInvoices} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListinvoicesInvoices.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBytes( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeString( + 15, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint64( + 11, + f + ); + } + f = message.getAmountReceivedMsat(); + if (f != null) { + writer.writeMessage( + 12, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeUint64( + 13, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeBytes( + 14, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListinvoicesInvoices.ListinvoicesInvoicesStatus = { + UNPAID: 0, + PAID: 1, + EXPIRED: 2 +}; + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearDescription = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasDescription = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ListinvoicesInvoicesStatus status = 4; + * @return {!proto.cln.ListinvoicesInvoices.ListinvoicesInvoicesStatus} + */ +proto.cln.ListinvoicesInvoices.prototype.getStatus = function() { + return /** @type {!proto.cln.ListinvoicesInvoices.ListinvoicesInvoicesStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.ListinvoicesInvoices.ListinvoicesInvoicesStatus} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional uint64 expires_at = 5; + * @return {number} + */ +proto.cln.ListinvoicesInvoices.prototype.getExpiresAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setExpiresAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional Amount amount_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.ListinvoicesInvoices.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListinvoicesInvoices} returns this +*/ +proto.cln.ListinvoicesInvoices.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string bolt11 = 7; + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string bolt12 = 8; + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bytes local_offer_id = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListinvoicesInvoices.prototype.getLocalOfferId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes local_offer_id = 9; + * This is a type-conversion wrapper around `getLocalOfferId()` + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getLocalOfferId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLocalOfferId())); +}; + + +/** + * optional bytes local_offer_id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLocalOfferId()` + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesInvoices.prototype.getLocalOfferId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLocalOfferId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setLocalOfferId = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearLocalOfferId = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasLocalOfferId = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string invreq_payer_note = 15; + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getInvreqPayerNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setInvreqPayerNote = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearInvreqPayerNote = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasInvreqPayerNote = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional uint64 pay_index = 11; + * @return {number} + */ +proto.cln.ListinvoicesInvoices.prototype.getPayIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setPayIndex = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearPayIndex = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasPayIndex = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional Amount amount_received_msat = 12; + * @return {?proto.cln.Amount} + */ +proto.cln.ListinvoicesInvoices.prototype.getAmountReceivedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 12)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListinvoicesInvoices} returns this +*/ +proto.cln.ListinvoicesInvoices.prototype.setAmountReceivedMsat = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearAmountReceivedMsat = function() { + return this.setAmountReceivedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasAmountReceivedMsat = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional uint64 paid_at = 13; + * @return {number} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaidAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setPaidAt = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearPaidAt = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasPaidAt = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional bytes payment_preimage = 14; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes payment_preimage = 14; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.ListinvoicesInvoices.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListinvoicesInvoices} returns this + */ +proto.cln.ListinvoicesInvoices.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListinvoicesInvoices.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.SendonionRequest.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.cln.SendonionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendonionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendonionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendonionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + onion: msg.getOnion_asB64(), + firstHop: (f = msg.getFirstHop()) && proto.cln.SendonionFirst_hop.toObject(includeInstance, f), + paymentHash: msg.getPaymentHash_asB64(), + label: jspb.Message.getFieldWithDefault(msg, 4, ""), + sharedSecretsList: msg.getSharedSecretsList_asB64(), + partid: jspb.Message.getFieldWithDefault(msg, 6, 0), + bolt11: jspb.Message.getFieldWithDefault(msg, 7, ""), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + destination: msg.getDestination_asB64(), + localinvreqid: msg.getLocalinvreqid_asB64(), + groupid: 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.cln.SendonionRequest} + */ +proto.cln.SendonionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendonionRequest; + return proto.cln.SendonionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendonionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendonionRequest} + */ +proto.cln.SendonionRequest.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.setOnion(value); + break; + case 2: + var value = new proto.cln.SendonionFirst_hop; + reader.readMessage(value,proto.cln.SendonionFirst_hop.deserializeBinaryFromReader); + msg.setFirstHop(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSharedSecrets(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPartid(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 12: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLocalinvreqid(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendonionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendonionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendonionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendonionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOnion_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getFirstHop(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cln.SendonionFirst_hop.serializeBinaryToWriter + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = message.getSharedSecretsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 12, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBytes( + 9, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint64( + 11, + f + ); + } +}; + + +/** + * optional bytes onion = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionRequest.prototype.getOnion = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes onion = 1; + * This is a type-conversion wrapper around `getOnion()` + * @return {string} + */ +proto.cln.SendonionRequest.prototype.getOnion_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOnion())); +}; + + +/** + * optional bytes onion = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOnion()` + * @return {!Uint8Array} + */ +proto.cln.SendonionRequest.prototype.getOnion_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOnion())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setOnion = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional SendonionFirst_hop first_hop = 2; + * @return {?proto.cln.SendonionFirst_hop} + */ +proto.cln.SendonionRequest.prototype.getFirstHop = function() { + return /** @type{?proto.cln.SendonionFirst_hop} */ ( + jspb.Message.getWrapperField(this, proto.cln.SendonionFirst_hop, 2)); +}; + + +/** + * @param {?proto.cln.SendonionFirst_hop|undefined} value + * @return {!proto.cln.SendonionRequest} returns this +*/ +proto.cln.SendonionRequest.prototype.setFirstHop = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearFirstHop = function() { + return this.setFirstHop(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasFirstHop = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.SendonionRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.SendonionRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional string label = 4; + * @return {string} + */ +proto.cln.SendonionRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearLabel = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasLabel = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated bytes shared_secrets = 5; + * @return {!(Array|Array)} + */ +proto.cln.SendonionRequest.prototype.getSharedSecretsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * repeated bytes shared_secrets = 5; + * This is a type-conversion wrapper around `getSharedSecretsList()` + * @return {!Array} + */ +proto.cln.SendonionRequest.prototype.getSharedSecretsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSharedSecretsList())); +}; + + +/** + * repeated bytes shared_secrets = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSharedSecretsList()` + * @return {!Array} + */ +proto.cln.SendonionRequest.prototype.getSharedSecretsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSharedSecretsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setSharedSecretsList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.addSharedSecrets = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearSharedSecretsList = function() { + return this.setSharedSecretsList([]); +}; + + +/** + * optional uint32 partid = 6; + * @return {number} + */ +proto.cln.SendonionRequest.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearPartid = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasPartid = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string bolt11 = 7; + * @return {string} + */ +proto.cln.SendonionRequest.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional Amount amount_msat = 12; + * @return {?proto.cln.Amount} + */ +proto.cln.SendonionRequest.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 12)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendonionRequest} returns this +*/ +proto.cln.SendonionRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes destination = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionRequest.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes destination = 9; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.SendonionRequest.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.SendonionRequest.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearDestination = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasDestination = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional bytes localinvreqid = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionRequest.prototype.getLocalinvreqid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes localinvreqid = 13; + * This is a type-conversion wrapper around `getLocalinvreqid()` + * @return {string} + */ +proto.cln.SendonionRequest.prototype.getLocalinvreqid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLocalinvreqid())); +}; + + +/** + * optional bytes localinvreqid = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLocalinvreqid()` + * @return {!Uint8Array} + */ +proto.cln.SendonionRequest.prototype.getLocalinvreqid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLocalinvreqid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setLocalinvreqid = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearLocalinvreqid = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasLocalinvreqid = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional uint64 groupid = 11; + * @return {number} + */ +proto.cln.SendonionRequest.prototype.getGroupid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.setGroupid = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionRequest} returns this + */ +proto.cln.SendonionRequest.prototype.clearGroupid = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionRequest.prototype.hasGroupid = function() { + return jspb.Message.getField(this, 11) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.SendonionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendonionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendonionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendonionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + destination: msg.getDestination_asB64(), + createdAt: jspb.Message.getFieldWithDefault(msg, 6, 0), + amountSentMsat: (f = msg.getAmountSentMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + label: jspb.Message.getFieldWithDefault(msg, 8, ""), + bolt11: jspb.Message.getFieldWithDefault(msg, 9, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 10, ""), + partid: jspb.Message.getFieldWithDefault(msg, 13, 0), + paymentPreimage: msg.getPaymentPreimage_asB64(), + message: 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.cln.SendonionResponse} + */ +proto.cln.SendonionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendonionResponse; + return proto.cln.SendonionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendonionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendonionResponse} + */ +proto.cln.SendonionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 3: + var value = /** @type {!proto.cln.SendonionResponse.SendonionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountSentMsat(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPartid(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + case 12: + 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.cln.SendonionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendonionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendonionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendonionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getAmountSentMsat(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeUint64( + 13, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeBytes( + 11, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.SendonionResponse.SendonionStatus = { + PENDING: 0, + COMPLETE: 1 +}; + +/** + * optional uint64 id = 1; + * @return {number} + */ +proto.cln.SendonionResponse.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes payment_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_hash = 2; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.SendonionResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional SendonionStatus status = 3; + * @return {!proto.cln.SendonionResponse.SendonionStatus} + */ +proto.cln.SendonionResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.SendonionResponse.SendonionStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.SendonionResponse.SendonionStatus} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional Amount amount_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.SendonionResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendonionResponse} returns this +*/ +proto.cln.SendonionResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes destination = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionResponse.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes destination = 5; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.SendonionResponse.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearDestination = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasDestination = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint64 created_at = 6; + * @return {number} + */ +proto.cln.SendonionResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional Amount amount_sent_msat = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.SendonionResponse.prototype.getAmountSentMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendonionResponse} returns this +*/ +proto.cln.SendonionResponse.prototype.setAmountSentMsat = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearAmountSentMsat = function() { + return this.setAmountSentMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasAmountSentMsat = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string label = 8; + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearLabel = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasLabel = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string bolt11 = 9; + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string bolt12 = 10; + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional uint64 partid = 13; + * @return {number} + */ +proto.cln.SendonionResponse.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearPartid = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasPartid = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional bytes payment_preimage = 11; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes payment_preimage = 11; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.SendonionResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string message = 12; + * @return {string} + */ +proto.cln.SendonionResponse.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.setMessage = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendonionResponse} returns this + */ +proto.cln.SendonionResponse.prototype.clearMessage = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionResponse.prototype.hasMessage = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.SendonionFirst_hop.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendonionFirst_hop.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendonionFirst_hop} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendonionFirst_hop.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + delay: 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.cln.SendonionFirst_hop} + */ +proto.cln.SendonionFirst_hop.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendonionFirst_hop; + return proto.cln.SendonionFirst_hop.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendonionFirst_hop} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendonionFirst_hop} + */ +proto.cln.SendonionFirst_hop.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.setId(value); + break; + case 2: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendonionFirst_hop.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendonionFirst_hop.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendonionFirst_hop} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendonionFirst_hop.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getDelay(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendonionFirst_hop.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.SendonionFirst_hop.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.SendonionFirst_hop.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendonionFirst_hop} returns this + */ +proto.cln.SendonionFirst_hop.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Amount amount_msat = 2; + * @return {?proto.cln.Amount} + */ +proto.cln.SendonionFirst_hop.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 2)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SendonionFirst_hop} returns this +*/ +proto.cln.SendonionFirst_hop.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SendonionFirst_hop} returns this + */ +proto.cln.SendonionFirst_hop.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendonionFirst_hop.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 delay = 3; + * @return {number} + */ +proto.cln.SendonionFirst_hop.prototype.getDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SendonionFirst_hop} returns this + */ +proto.cln.SendonionFirst_hop.prototype.setDelay = 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.cln.ListsendpaysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListsendpaysRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListsendpaysRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListsendpaysRequest.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentHash: msg.getPaymentHash_asB64(), + status: 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.cln.ListsendpaysRequest} + */ +proto.cln.ListsendpaysRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListsendpaysRequest; + return proto.cln.ListsendpaysRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListsendpaysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListsendpaysRequest} + */ +proto.cln.ListsendpaysRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 3: + var value = /** @type {!proto.cln.ListsendpaysRequest.ListsendpaysStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListsendpaysRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListsendpaysRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListsendpaysRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!proto.cln.ListsendpaysRequest.ListsendpaysStatus} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListsendpaysRequest.ListsendpaysStatus = { + PENDING: 0, + COMPLETE: 1, + FAILED: 2 +}; + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.cln.ListsendpaysRequest.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListsendpaysRequest} returns this + */ +proto.cln.ListsendpaysRequest.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysRequest} returns this + */ +proto.cln.ListsendpaysRequest.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysRequest.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes payment_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListsendpaysRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_hash = 2; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListsendpaysRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListsendpaysRequest} returns this + */ +proto.cln.ListsendpaysRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysRequest} returns this + */ +proto.cln.ListsendpaysRequest.prototype.clearPaymentHash = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysRequest.prototype.hasPaymentHash = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ListsendpaysStatus status = 3; + * @return {!proto.cln.ListsendpaysRequest.ListsendpaysStatus} + */ +proto.cln.ListsendpaysRequest.prototype.getStatus = function() { + return /** @type {!proto.cln.ListsendpaysRequest.ListsendpaysStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.ListsendpaysRequest.ListsendpaysStatus} value + * @return {!proto.cln.ListsendpaysRequest} returns this + */ +proto.cln.ListsendpaysRequest.prototype.setStatus = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysRequest} returns this + */ +proto.cln.ListsendpaysRequest.prototype.clearStatus = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysRequest.prototype.hasStatus = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListsendpaysResponse.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.cln.ListsendpaysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListsendpaysResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListsendpaysResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListsendpaysResponse.toObject = function(includeInstance, msg) { + var f, obj = { + paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), + proto.cln.ListsendpaysPayments.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.cln.ListsendpaysResponse} + */ +proto.cln.ListsendpaysResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListsendpaysResponse; + return proto.cln.ListsendpaysResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListsendpaysResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListsendpaysResponse} + */ +proto.cln.ListsendpaysResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListsendpaysPayments; + reader.readMessage(value,proto.cln.ListsendpaysPayments.deserializeBinaryFromReader); + msg.addPayments(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListsendpaysResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListsendpaysResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListsendpaysResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListsendpaysPayments.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListsendpaysPayments payments = 1; + * @return {!Array} + */ +proto.cln.ListsendpaysResponse.prototype.getPaymentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListsendpaysPayments, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListsendpaysResponse} returns this +*/ +proto.cln.ListsendpaysResponse.prototype.setPaymentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListsendpaysPayments=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListsendpaysPayments} + */ +proto.cln.ListsendpaysResponse.prototype.addPayments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListsendpaysPayments, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListsendpaysResponse} returns this + */ +proto.cln.ListsendpaysResponse.prototype.clearPaymentsList = function() { + return this.setPaymentsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListsendpaysPayments.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListsendpaysPayments.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListsendpaysPayments} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListsendpaysPayments.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + groupid: jspb.Message.getFieldWithDefault(msg, 2, 0), + partid: jspb.Message.getFieldWithDefault(msg, 15, 0), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + destination: msg.getDestination_asB64(), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + amountSentMsat: (f = msg.getAmountSentMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + label: jspb.Message.getFieldWithDefault(msg, 9, ""), + bolt11: jspb.Message.getFieldWithDefault(msg, 10, ""), + description: jspb.Message.getFieldWithDefault(msg, 14, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 11, ""), + paymentPreimage: msg.getPaymentPreimage_asB64(), + erroronion: msg.getErroronion_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.cln.ListsendpaysPayments} + */ +proto.cln.ListsendpaysPayments.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListsendpaysPayments; + return proto.cln.ListsendpaysPayments.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListsendpaysPayments} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListsendpaysPayments} + */ +proto.cln.ListsendpaysPayments.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupid(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPartid(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {!proto.cln.ListsendpaysPayments.ListsendpaysPaymentsStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 8: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountSentMsat(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setErroronion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysPayments.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListsendpaysPayments.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListsendpaysPayments} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListsendpaysPayments.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getGroupid(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeUint64( + 15, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getAmountSentMsat(); + if (f != null) { + writer.writeMessage( + 8, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeString( + 14, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBytes( + 12, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListsendpaysPayments.ListsendpaysPaymentsStatus = { + PENDING: 0, + FAILED: 1, + COMPLETE: 2 +}; + +/** + * optional uint64 id = 1; + * @return {number} + */ +proto.cln.ListsendpaysPayments.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 groupid = 2; + * @return {number} + */ +proto.cln.ListsendpaysPayments.prototype.getGroupid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setGroupid = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 partid = 15; + * @return {number} + */ +proto.cln.ListsendpaysPayments.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearPartid = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasPartid = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListsendpaysPayments.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysPayments.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ListsendpaysPaymentsStatus status = 4; + * @return {!proto.cln.ListsendpaysPayments.ListsendpaysPaymentsStatus} + */ +proto.cln.ListsendpaysPayments.prototype.getStatus = function() { + return /** @type {!proto.cln.ListsendpaysPayments.ListsendpaysPaymentsStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.ListsendpaysPayments.ListsendpaysPaymentsStatus} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.ListsendpaysPayments.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListsendpaysPayments} returns this +*/ +proto.cln.ListsendpaysPayments.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes destination = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListsendpaysPayments.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes destination = 6; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysPayments.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearDestination = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasDestination = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint64 created_at = 7; + * @return {number} + */ +proto.cln.ListsendpaysPayments.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional Amount amount_sent_msat = 8; + * @return {?proto.cln.Amount} + */ +proto.cln.ListsendpaysPayments.prototype.getAmountSentMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 8)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListsendpaysPayments} returns this +*/ +proto.cln.ListsendpaysPayments.prototype.setAmountSentMsat = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearAmountSentMsat = function() { + return this.setAmountSentMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasAmountSentMsat = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string label = 9; + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearLabel = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasLabel = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string bolt11 = 10; + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string description = 14; + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearDescription = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasDescription = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional string bolt12 = 11; + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bytes payment_preimage = 12; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListsendpaysPayments.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes payment_preimage = 12; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysPayments.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes erroronion = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListsendpaysPayments.prototype.getErroronion = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes erroronion = 13; + * This is a type-conversion wrapper around `getErroronion()` + * @return {string} + */ +proto.cln.ListsendpaysPayments.prototype.getErroronion_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getErroronion())); +}; + + +/** + * optional bytes erroronion = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getErroronion()` + * @return {!Uint8Array} + */ +proto.cln.ListsendpaysPayments.prototype.getErroronion_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErroronion())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.setErroronion = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListsendpaysPayments} returns this + */ +proto.cln.ListsendpaysPayments.prototype.clearErroronion = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListsendpaysPayments.prototype.hasErroronion = function() { + return jspb.Message.getField(this, 13) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListtransactionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListtransactionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListtransactionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListtransactionsRequest} + */ +proto.cln.ListtransactionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListtransactionsRequest; + return proto.cln.ListtransactionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListtransactionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListtransactionsRequest} + */ +proto.cln.ListtransactionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListtransactionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListtransactionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListtransactionsResponse.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.cln.ListtransactionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListtransactionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListtransactionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + transactionsList: jspb.Message.toObjectList(msg.getTransactionsList(), + proto.cln.ListtransactionsTransactions.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.cln.ListtransactionsResponse} + */ +proto.cln.ListtransactionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListtransactionsResponse; + return proto.cln.ListtransactionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListtransactionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListtransactionsResponse} + */ +proto.cln.ListtransactionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListtransactionsTransactions; + reader.readMessage(value,proto.cln.ListtransactionsTransactions.deserializeBinaryFromReader); + msg.addTransactions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListtransactionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListtransactionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListtransactionsTransactions.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListtransactionsTransactions transactions = 1; + * @return {!Array} + */ +proto.cln.ListtransactionsResponse.prototype.getTransactionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListtransactionsTransactions, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListtransactionsResponse} returns this +*/ +proto.cln.ListtransactionsResponse.prototype.setTransactionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListtransactionsTransactions=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListtransactionsTransactions} + */ +proto.cln.ListtransactionsResponse.prototype.addTransactions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListtransactionsTransactions, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListtransactionsResponse} returns this + */ +proto.cln.ListtransactionsResponse.prototype.clearTransactionsList = function() { + return this.setTransactionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListtransactionsTransactions.repeatedFields_ = [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.cln.ListtransactionsTransactions.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListtransactionsTransactions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListtransactionsTransactions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsTransactions.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + rawtx: msg.getRawtx_asB64(), + blockheight: jspb.Message.getFieldWithDefault(msg, 3, 0), + txindex: jspb.Message.getFieldWithDefault(msg, 4, 0), + locktime: jspb.Message.getFieldWithDefault(msg, 7, 0), + version: jspb.Message.getFieldWithDefault(msg, 8, 0), + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + proto.cln.ListtransactionsTransactionsInputs.toObject, includeInstance), + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + proto.cln.ListtransactionsTransactionsOutputs.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.cln.ListtransactionsTransactions} + */ +proto.cln.ListtransactionsTransactions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListtransactionsTransactions; + return proto.cln.ListtransactionsTransactions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListtransactionsTransactions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListtransactionsTransactions} + */ +proto.cln.ListtransactionsTransactions.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 = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRawtx(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockheight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTxindex(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLocktime(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setVersion(value); + break; + case 9: + var value = new proto.cln.ListtransactionsTransactionsInputs; + reader.readMessage(value,proto.cln.ListtransactionsTransactionsInputs.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 10: + var value = new proto.cln.ListtransactionsTransactionsOutputs; + reader.readMessage(value,proto.cln.ListtransactionsTransactionsOutputs.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsTransactions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListtransactionsTransactions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListtransactionsTransactions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsTransactions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRawtx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getBlockheight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getTxindex(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getLocktime(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.cln.ListtransactionsTransactionsInputs.serializeBinaryToWriter + ); + } + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + proto.cln.ListtransactionsTransactionsOutputs.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListtransactionsTransactions.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.cln.ListtransactionsTransactions.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.cln.ListtransactionsTransactions.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes rawtx = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListtransactionsTransactions.prototype.getRawtx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes rawtx = 2; + * This is a type-conversion wrapper around `getRawtx()` + * @return {string} + */ +proto.cln.ListtransactionsTransactions.prototype.getRawtx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRawtx())); +}; + + +/** + * optional bytes rawtx = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRawtx()` + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsTransactions.prototype.getRawtx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRawtx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.setRawtx = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 blockheight = 3; + * @return {number} + */ +proto.cln.ListtransactionsTransactions.prototype.getBlockheight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.setBlockheight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 txindex = 4; + * @return {number} + */ +proto.cln.ListtransactionsTransactions.prototype.getTxindex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.setTxindex = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 locktime = 7; + * @return {number} + */ +proto.cln.ListtransactionsTransactions.prototype.getLocktime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.setLocktime = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 version = 8; + * @return {number} + */ +proto.cln.ListtransactionsTransactions.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * repeated ListtransactionsTransactionsInputs inputs = 9; + * @return {!Array} + */ +proto.cln.ListtransactionsTransactions.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListtransactionsTransactionsInputs, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListtransactionsTransactions} returns this +*/ +proto.cln.ListtransactionsTransactions.prototype.setInputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cln.ListtransactionsTransactionsInputs=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListtransactionsTransactionsInputs} + */ +proto.cln.ListtransactionsTransactions.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cln.ListtransactionsTransactionsInputs, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.prototype.clearInputsList = function() { + return this.setInputsList([]); +}; + + +/** + * repeated ListtransactionsTransactionsOutputs outputs = 10; + * @return {!Array} + */ +proto.cln.ListtransactionsTransactions.prototype.getOutputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListtransactionsTransactionsOutputs, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListtransactionsTransactions} returns this +*/ +proto.cln.ListtransactionsTransactions.prototype.setOutputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.cln.ListtransactionsTransactionsOutputs=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListtransactionsTransactionsOutputs} + */ +proto.cln.ListtransactionsTransactions.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cln.ListtransactionsTransactionsOutputs, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListtransactionsTransactions} returns this + */ +proto.cln.ListtransactionsTransactions.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.cln.ListtransactionsTransactionsInputs.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListtransactionsTransactionsInputs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListtransactionsTransactionsInputs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsTransactionsInputs.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + index: jspb.Message.getFieldWithDefault(msg, 2, 0), + sequence: jspb.Message.getFieldWithDefault(msg, 3, 0), + itemType: jspb.Message.getFieldWithDefault(msg, 4, 0), + channel: 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.cln.ListtransactionsTransactionsInputs} + */ +proto.cln.ListtransactionsTransactionsInputs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListtransactionsTransactionsInputs; + return proto.cln.ListtransactionsTransactionsInputs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListtransactionsTransactionsInputs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListtransactionsTransactionsInputs} + */ +proto.cln.ListtransactionsTransactionsInputs.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.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSequence(value); + break; + case 4: + var value = /** @type {!proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setChannel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListtransactionsTransactionsInputs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListtransactionsTransactionsInputs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsTransactionsInputs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {!proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType = { + THEIRS: 0, + DEPOSIT: 1, + WITHDRAW: 2, + CHANNEL_FUNDING: 3, + CHANNEL_MUTUAL_CLOSE: 4, + CHANNEL_UNILATERAL_CLOSE: 5, + CHANNEL_SWEEP: 6, + CHANNEL_HTLC_SUCCESS: 7, + CHANNEL_HTLC_TIMEOUT: 8, + CHANNEL_PENALTY: 9, + CHANNEL_UNILATERAL_CHEAT: 10 +}; + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 index = 2; + * @return {number} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 sequence = 3; + * @return {number} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional ListtransactionsTransactionsInputsType item_type = 4; + * @return {!proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getItemType = function() { + return /** @type {!proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.ListtransactionsTransactionsInputs.ListtransactionsTransactionsInputsType} value + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.setItemType = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.clearItemType = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.hasItemType = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string channel = 5; + * @return {string} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.getChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.setChannel = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListtransactionsTransactionsInputs} returns this + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.clearChannel = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListtransactionsTransactionsInputs.prototype.hasChannel = 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.cln.ListtransactionsTransactionsOutputs.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListtransactionsTransactionsOutputs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListtransactionsTransactionsOutputs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsTransactionsOutputs.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + scriptpubkey: msg.getScriptpubkey_asB64(), + itemType: jspb.Message.getFieldWithDefault(msg, 4, 0), + channel: 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.cln.ListtransactionsTransactionsOutputs} + */ +proto.cln.ListtransactionsTransactionsOutputs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListtransactionsTransactionsOutputs; + return proto.cln.ListtransactionsTransactionsOutputs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListtransactionsTransactionsOutputs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListtransactionsTransactionsOutputs} + */ +proto.cln.ListtransactionsTransactionsOutputs.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 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScriptpubkey(value); + break; + case 4: + var value = /** @type {!proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setChannel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListtransactionsTransactionsOutputs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListtransactionsTransactionsOutputs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListtransactionsTransactionsOutputs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getScriptpubkey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = /** @type {!proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType = { + THEIRS: 0, + DEPOSIT: 1, + WITHDRAW: 2, + CHANNEL_FUNDING: 3, + CHANNEL_MUTUAL_CLOSE: 4, + CHANNEL_UNILATERAL_CLOSE: 5, + CHANNEL_SWEEP: 6, + CHANNEL_HTLC_SUCCESS: 7, + CHANNEL_HTLC_TIMEOUT: 8, + CHANNEL_PENALTY: 9, + CHANNEL_UNILATERAL_CHEAT: 10 +}; + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional Amount amount_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this +*/ +proto.cln.ListtransactionsTransactionsOutputs.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes scriptPubKey = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getScriptpubkey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes scriptPubKey = 3; + * This is a type-conversion wrapper around `getScriptpubkey()` + * @return {string} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getScriptpubkey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScriptpubkey())); +}; + + +/** + * optional bytes scriptPubKey = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScriptpubkey()` + * @return {!Uint8Array} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getScriptpubkey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScriptpubkey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.setScriptpubkey = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ListtransactionsTransactionsOutputsType item_type = 4; + * @return {!proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getItemType = function() { + return /** @type {!proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.ListtransactionsTransactionsOutputs.ListtransactionsTransactionsOutputsType} value + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.setItemType = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.clearItemType = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.hasItemType = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string channel = 5; + * @return {string} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.getChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.setChannel = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListtransactionsTransactionsOutputs} returns this + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.clearChannel = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListtransactionsTransactionsOutputs.prototype.hasChannel = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.PayRequest.repeatedFields_ = [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.cln.PayRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.PayRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.PayRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PayRequest.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + riskfactor: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0), + maxfeepercent: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + retryFor: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxdelay: jspb.Message.getFieldWithDefault(msg, 6, 0), + exemptfee: (f = msg.getExemptfee()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + localinvreqid: msg.getLocalinvreqid_asB64(), + excludeList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + maxfee: (f = msg.getMaxfee()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + description: 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.cln.PayRequest} + */ +proto.cln.PayRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.PayRequest; + return proto.cln.PayRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.PayRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.PayRequest} + */ +proto.cln.PayRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 13: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 8: + var value = /** @type {number} */ (reader.readDouble()); + msg.setRiskfactor(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMaxfeepercent(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRetryFor(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxdelay(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setExemptfee(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLocalinvreqid(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addExclude(value); + break; + case 11: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaxfee(value); + break; + case 12: + 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.cln.PayRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.PayRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.PayRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PayRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 13, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeDouble( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = message.getExemptfee(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeBytes( + 14, + f + ); + } + f = message.getExcludeList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getMaxfee(); + if (f != null) { + writer.writeMessage( + 11, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.cln.PayRequest.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setBolt11 = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Amount amount_msat = 13; + * @return {?proto.cln.Amount} + */ +proto.cln.PayRequest.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 13)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.PayRequest} returns this +*/ +proto.cln.PayRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional string label = 3; + * @return {string} + */ +proto.cln.PayRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearLabel = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasLabel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional double riskfactor = 8; + * @return {number} + */ +proto.cln.PayRequest.prototype.getRiskfactor = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 8, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setRiskfactor = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearRiskfactor = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasRiskfactor = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional double maxfeepercent = 4; + * @return {number} + */ +proto.cln.PayRequest.prototype.getMaxfeepercent = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setMaxfeepercent = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearMaxfeepercent = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasMaxfeepercent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 retry_for = 5; + * @return {number} + */ +proto.cln.PayRequest.prototype.getRetryFor = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setRetryFor = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearRetryFor = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasRetryFor = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 maxdelay = 6; + * @return {number} + */ +proto.cln.PayRequest.prototype.getMaxdelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setMaxdelay = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearMaxdelay = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasMaxdelay = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Amount exemptfee = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.PayRequest.prototype.getExemptfee = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.PayRequest} returns this +*/ +proto.cln.PayRequest.prototype.setExemptfee = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearExemptfee = function() { + return this.setExemptfee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasExemptfee = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bytes localinvreqid = 14; + * @return {!(string|Uint8Array)} + */ +proto.cln.PayRequest.prototype.getLocalinvreqid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes localinvreqid = 14; + * This is a type-conversion wrapper around `getLocalinvreqid()` + * @return {string} + */ +proto.cln.PayRequest.prototype.getLocalinvreqid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLocalinvreqid())); +}; + + +/** + * optional bytes localinvreqid = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLocalinvreqid()` + * @return {!Uint8Array} + */ +proto.cln.PayRequest.prototype.getLocalinvreqid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLocalinvreqid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setLocalinvreqid = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearLocalinvreqid = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasLocalinvreqid = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * repeated string exclude = 10; + * @return {!Array} + */ +proto.cln.PayRequest.prototype.getExcludeList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setExcludeList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.addExclude = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearExcludeList = function() { + return this.setExcludeList([]); +}; + + +/** + * optional Amount maxfee = 11; + * @return {?proto.cln.Amount} + */ +proto.cln.PayRequest.prototype.getMaxfee = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 11)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.PayRequest} returns this +*/ +proto.cln.PayRequest.prototype.setMaxfee = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearMaxfee = function() { + return this.setMaxfee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasMaxfee = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string description = 12; + * @return {string} + */ +proto.cln.PayRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayRequest} returns this + */ +proto.cln.PayRequest.prototype.clearDescription = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayRequest.prototype.hasDescription = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.PayResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.PayResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.PayResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PayResponse.toObject = function(includeInstance, msg) { + var f, obj = { + paymentPreimage: msg.getPaymentPreimage_asB64(), + destination: msg.getDestination_asB64(), + paymentHash: msg.getPaymentHash_asB64(), + createdAt: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + parts: jspb.Message.getFieldWithDefault(msg, 5, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + amountSentMsat: (f = msg.getAmountSentMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + warningPartialCompletion: jspb.Message.getFieldWithDefault(msg, 8, ""), + status: 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.cln.PayResponse} + */ +proto.cln.PayResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.PayResponse; + return proto.cln.PayResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.PayResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.PayResponse} + */ +proto.cln.PayResponse.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.setPaymentPreimage(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCreatedAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setParts(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountSentMsat(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningPartialCompletion(value); + break; + case 9: + var value = /** @type {!proto.cln.PayResponse.PayStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.PayResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.PayResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.PayResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PayResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getParts(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getAmountSentMsat(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.PayResponse.PayStatus = { + COMPLETE: 0, + PENDING: 1, + FAILED: 2 +}; + +/** + * optional bytes payment_preimage = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.PayResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payment_preimage = 1; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.PayResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.PayResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes destination = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.PayResponse.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes destination = 2; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.PayResponse.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.PayResponse.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.clearDestination = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayResponse.prototype.hasDestination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.PayResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.PayResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.PayResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional double created_at = 4; + * @return {number} + */ +proto.cln.PayResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional uint32 parts = 5; + * @return {number} + */ +proto.cln.PayResponse.prototype.getParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setParts = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional Amount amount_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.PayResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.PayResponse} returns this +*/ +proto.cln.PayResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Amount amount_sent_msat = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.PayResponse.prototype.getAmountSentMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.PayResponse} returns this +*/ +proto.cln.PayResponse.prototype.setAmountSentMsat = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.clearAmountSentMsat = function() { + return this.setAmountSentMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayResponse.prototype.hasAmountSentMsat = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string warning_partial_completion = 8; + * @return {string} + */ +proto.cln.PayResponse.prototype.getWarningPartialCompletion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setWarningPartialCompletion = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.clearWarningPartialCompletion = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PayResponse.prototype.hasWarningPartialCompletion = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional PayStatus status = 9; + * @return {!proto.cln.PayResponse.PayStatus} + */ +proto.cln.PayResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.PayResponse.PayStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.cln.PayResponse.PayStatus} value + * @return {!proto.cln.PayResponse} returns this + */ +proto.cln.PayResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListnodesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListnodesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListnodesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_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.cln.ListnodesRequest} + */ +proto.cln.ListnodesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListnodesRequest; + return proto.cln.ListnodesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListnodesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListnodesRequest} + */ +proto.cln.ListnodesRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListnodesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListnodesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListnodesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListnodesRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.ListnodesRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.ListnodesRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListnodesRequest} returns this + */ +proto.cln.ListnodesRequest.prototype.setId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListnodesRequest} returns this + */ +proto.cln.ListnodesRequest.prototype.clearId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListnodesRequest.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListnodesResponse.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.cln.ListnodesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListnodesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListnodesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.cln.ListnodesNodes.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.cln.ListnodesResponse} + */ +proto.cln.ListnodesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListnodesResponse; + return proto.cln.ListnodesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListnodesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListnodesResponse} + */ +proto.cln.ListnodesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListnodesNodes; + reader.readMessage(value,proto.cln.ListnodesNodes.deserializeBinaryFromReader); + msg.addNodes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListnodesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListnodesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListnodesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListnodesNodes.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListnodesNodes nodes = 1; + * @return {!Array} + */ +proto.cln.ListnodesResponse.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListnodesNodes, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListnodesResponse} returns this +*/ +proto.cln.ListnodesResponse.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListnodesNodes=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListnodesNodes} + */ +proto.cln.ListnodesResponse.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListnodesNodes, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListnodesResponse} returns this + */ +proto.cln.ListnodesResponse.prototype.clearNodesList = function() { + return this.setNodesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListnodesNodes.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.cln.ListnodesNodes.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListnodesNodes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListnodesNodes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesNodes.toObject = function(includeInstance, msg) { + var f, obj = { + nodeid: msg.getNodeid_asB64(), + lastTimestamp: jspb.Message.getFieldWithDefault(msg, 2, 0), + alias: jspb.Message.getFieldWithDefault(msg, 3, ""), + color: msg.getColor_asB64(), + features: msg.getFeatures_asB64(), + addressesList: jspb.Message.toObjectList(msg.getAddressesList(), + proto.cln.ListnodesNodesAddresses.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.cln.ListnodesNodes} + */ +proto.cln.ListnodesNodes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListnodesNodes; + return proto.cln.ListnodesNodes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListnodesNodes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListnodesNodes} + */ +proto.cln.ListnodesNodes.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.setNodeid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastTimestamp(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAlias(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setColor(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFeatures(value); + break; + case 6: + var value = new proto.cln.ListnodesNodesAddresses; + reader.readMessage(value,proto.cln.ListnodesNodesAddresses.deserializeBinaryFromReader); + msg.addAddresses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListnodesNodes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListnodesNodes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListnodesNodes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesNodes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBytes( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cln.ListnodesNodesAddresses.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes nodeid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListnodesNodes.prototype.getNodeid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes nodeid = 1; + * This is a type-conversion wrapper around `getNodeid()` + * @return {string} + */ +proto.cln.ListnodesNodes.prototype.getNodeid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodeid())); +}; + + +/** + * optional bytes nodeid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodeid()` + * @return {!Uint8Array} + */ +proto.cln.ListnodesNodes.prototype.getNodeid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodeid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.setNodeid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 last_timestamp = 2; + * @return {number} + */ +proto.cln.ListnodesNodes.prototype.getLastTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.setLastTimestamp = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.clearLastTimestamp = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListnodesNodes.prototype.hasLastTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string alias = 3; + * @return {string} + */ +proto.cln.ListnodesNodes.prototype.getAlias = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.setAlias = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.clearAlias = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListnodesNodes.prototype.hasAlias = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes color = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListnodesNodes.prototype.getColor = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes color = 4; + * This is a type-conversion wrapper around `getColor()` + * @return {string} + */ +proto.cln.ListnodesNodes.prototype.getColor_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getColor())); +}; + + +/** + * optional bytes color = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getColor()` + * @return {!Uint8Array} + */ +proto.cln.ListnodesNodes.prototype.getColor_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getColor())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.setColor = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.clearColor = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListnodesNodes.prototype.hasColor = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes features = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListnodesNodes.prototype.getFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes features = 5; + * This is a type-conversion wrapper around `getFeatures()` + * @return {string} + */ +proto.cln.ListnodesNodes.prototype.getFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFeatures())); +}; + + +/** + * optional bytes features = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFeatures()` + * @return {!Uint8Array} + */ +proto.cln.ListnodesNodes.prototype.getFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.setFeatures = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.prototype.clearFeatures = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListnodesNodes.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated ListnodesNodesAddresses addresses = 6; + * @return {!Array} + */ +proto.cln.ListnodesNodes.prototype.getAddressesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListnodesNodesAddresses, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListnodesNodes} returns this +*/ +proto.cln.ListnodesNodes.prototype.setAddressesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cln.ListnodesNodesAddresses=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListnodesNodesAddresses} + */ +proto.cln.ListnodesNodes.prototype.addAddresses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cln.ListnodesNodesAddresses, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListnodesNodes} returns this + */ +proto.cln.ListnodesNodes.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.cln.ListnodesNodesAddresses.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListnodesNodesAddresses.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListnodesNodesAddresses} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesNodesAddresses.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + port: jspb.Message.getFieldWithDefault(msg, 2, 0), + address: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListnodesNodesAddresses} + */ +proto.cln.ListnodesNodesAddresses.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListnodesNodesAddresses; + return proto.cln.ListnodesNodesAddresses.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListnodesNodesAddresses} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListnodesNodesAddresses} + */ +proto.cln.ListnodesNodesAddresses.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ListnodesNodesAddresses.ListnodesNodesAddressesType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPort(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListnodesNodesAddresses.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListnodesNodesAddresses.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListnodesNodesAddresses} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListnodesNodesAddresses.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListnodesNodesAddresses.ListnodesNodesAddressesType = { + DNS: 0, + IPV4: 1, + IPV6: 2, + TORV2: 3, + TORV3: 4, + WEBSOCKET: 5 +}; + +/** + * optional ListnodesNodesAddressesType item_type = 1; + * @return {!proto.cln.ListnodesNodesAddresses.ListnodesNodesAddressesType} + */ +proto.cln.ListnodesNodesAddresses.prototype.getItemType = function() { + return /** @type {!proto.cln.ListnodesNodesAddresses.ListnodesNodesAddressesType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ListnodesNodesAddresses.ListnodesNodesAddressesType} value + * @return {!proto.cln.ListnodesNodesAddresses} returns this + */ +proto.cln.ListnodesNodesAddresses.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint32 port = 2; + * @return {number} + */ +proto.cln.ListnodesNodesAddresses.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListnodesNodesAddresses} returns this + */ +proto.cln.ListnodesNodesAddresses.prototype.setPort = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.cln.ListnodesNodesAddresses.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListnodesNodesAddresses} returns this + */ +proto.cln.ListnodesNodesAddresses.prototype.setAddress = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListnodesNodesAddresses} returns this + */ +proto.cln.ListnodesNodesAddresses.prototype.clearAddress = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListnodesNodesAddresses.prototype.hasAddress = 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.cln.WaitanyinvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WaitanyinvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WaitanyinvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitanyinvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + lastpayIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + timeout: 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.cln.WaitanyinvoiceRequest} + */ +proto.cln.WaitanyinvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WaitanyinvoiceRequest; + return proto.cln.WaitanyinvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WaitanyinvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WaitanyinvoiceRequest} + */ +proto.cln.WaitanyinvoiceRequest.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.setLastpayIndex(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeout(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WaitanyinvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WaitanyinvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WaitanyinvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitanyinvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 lastpay_index = 1; + * @return {number} + */ +proto.cln.WaitanyinvoiceRequest.prototype.getLastpayIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitanyinvoiceRequest} returns this + */ +proto.cln.WaitanyinvoiceRequest.prototype.setLastpayIndex = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceRequest} returns this + */ +proto.cln.WaitanyinvoiceRequest.prototype.clearLastpayIndex = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceRequest.prototype.hasLastpayIndex = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 timeout = 2; + * @return {number} + */ +proto.cln.WaitanyinvoiceRequest.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitanyinvoiceRequest} returns this + */ +proto.cln.WaitanyinvoiceRequest.prototype.setTimeout = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceRequest} returns this + */ +proto.cln.WaitanyinvoiceRequest.prototype.clearTimeout = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceRequest.prototype.hasTimeout = 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.cln.WaitanyinvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WaitanyinvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WaitanyinvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitanyinvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiresAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + bolt11: jspb.Message.getFieldWithDefault(msg, 7, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 8, ""), + payIndex: jspb.Message.getFieldWithDefault(msg, 9, 0), + amountReceivedMsat: (f = msg.getAmountReceivedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + paidAt: jspb.Message.getFieldWithDefault(msg, 11, 0), + paymentPreimage: msg.getPaymentPreimage_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.cln.WaitanyinvoiceResponse} + */ +proto.cln.WaitanyinvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WaitanyinvoiceResponse; + return proto.cln.WaitanyinvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WaitanyinvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WaitanyinvoiceResponse} + */ +proto.cln.WaitanyinvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {!proto.cln.WaitanyinvoiceResponse.WaitanyinvoiceStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPayIndex(value); + break; + case 10: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountReceivedMsat(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPaidAt(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WaitanyinvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WaitanyinvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WaitanyinvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitanyinvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeUint64( + 9, + f + ); + } + f = message.getAmountReceivedMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint64( + 11, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBytes( + 12, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.WaitanyinvoiceResponse.WaitanyinvoiceStatus = { + PAID: 0, + EXPIRED: 1 +}; + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional WaitanyinvoiceStatus status = 4; + * @return {!proto.cln.WaitanyinvoiceResponse.WaitanyinvoiceStatus} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.WaitanyinvoiceResponse.WaitanyinvoiceStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.WaitanyinvoiceResponse.WaitanyinvoiceStatus} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional uint64 expires_at = 5; + * @return {number} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getExpiresAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional Amount amount_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this +*/ +proto.cln.WaitanyinvoiceResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string bolt11 = 7; + * @return {string} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string bolt12 = 8; + * @return {string} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint64 pay_index = 9; + * @return {number} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPayIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setPayIndex = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearPayIndex = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasPayIndex = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Amount amount_received_msat = 10; + * @return {?proto.cln.Amount} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getAmountReceivedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 10)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this +*/ +proto.cln.WaitanyinvoiceResponse.prototype.setAmountReceivedMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearAmountReceivedMsat = function() { + return this.setAmountReceivedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasAmountReceivedMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional uint64 paid_at = 11; + * @return {number} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaidAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setPaidAt = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearPaidAt = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasPaidAt = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bytes payment_preimage = 12; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes payment_preimage = 12; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.WaitanyinvoiceResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitanyinvoiceResponse} returns this + */ +proto.cln.WaitanyinvoiceResponse.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitanyinvoiceResponse.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.WaitinvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WaitinvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WaitinvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitinvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + label: 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.cln.WaitinvoiceRequest} + */ +proto.cln.WaitinvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WaitinvoiceRequest; + return proto.cln.WaitinvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WaitinvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WaitinvoiceRequest} + */ +proto.cln.WaitinvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WaitinvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WaitinvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WaitinvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitinvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.WaitinvoiceRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitinvoiceRequest} returns this + */ +proto.cln.WaitinvoiceRequest.prototype.setLabel = 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.cln.WaitinvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WaitinvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WaitinvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitinvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + label: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiresAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + bolt11: jspb.Message.getFieldWithDefault(msg, 7, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 8, ""), + payIndex: jspb.Message.getFieldWithDefault(msg, 9, 0), + amountReceivedMsat: (f = msg.getAmountReceivedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + paidAt: jspb.Message.getFieldWithDefault(msg, 11, 0), + paymentPreimage: msg.getPaymentPreimage_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.cln.WaitinvoiceResponse} + */ +proto.cln.WaitinvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WaitinvoiceResponse; + return proto.cln.WaitinvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WaitinvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WaitinvoiceResponse} + */ +proto.cln.WaitinvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {!proto.cln.WaitinvoiceResponse.WaitinvoiceStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPayIndex(value); + break; + case 10: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountReceivedMsat(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPaidAt(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WaitinvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WaitinvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WaitinvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitinvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeUint64( + 9, + f + ); + } + f = message.getAmountReceivedMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint64( + 11, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBytes( + 12, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.WaitinvoiceResponse.WaitinvoiceStatus = { + PAID: 0, + EXPIRED: 1 +}; + +/** + * optional string label = 1; + * @return {string} + */ +proto.cln.WaitinvoiceResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cln.WaitinvoiceResponse.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional WaitinvoiceStatus status = 4; + * @return {!proto.cln.WaitinvoiceResponse.WaitinvoiceStatus} + */ +proto.cln.WaitinvoiceResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.WaitinvoiceResponse.WaitinvoiceStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.WaitinvoiceResponse.WaitinvoiceStatus} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional uint64 expires_at = 5; + * @return {number} + */ +proto.cln.WaitinvoiceResponse.prototype.getExpiresAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setExpiresAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional Amount amount_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.WaitinvoiceResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.WaitinvoiceResponse} returns this +*/ +proto.cln.WaitinvoiceResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string bolt11 = 7; + * @return {string} + */ +proto.cln.WaitinvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string bolt12 = 8; + * @return {string} + */ +proto.cln.WaitinvoiceResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint64 pay_index = 9; + * @return {number} + */ +proto.cln.WaitinvoiceResponse.prototype.getPayIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setPayIndex = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearPayIndex = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasPayIndex = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Amount amount_received_msat = 10; + * @return {?proto.cln.Amount} + */ +proto.cln.WaitinvoiceResponse.prototype.getAmountReceivedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 10)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.WaitinvoiceResponse} returns this +*/ +proto.cln.WaitinvoiceResponse.prototype.setAmountReceivedMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearAmountReceivedMsat = function() { + return this.setAmountReceivedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasAmountReceivedMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional uint64 paid_at = 11; + * @return {number} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaidAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setPaidAt = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearPaidAt = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasPaidAt = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bytes payment_preimage = 12; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes payment_preimage = 12; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.WaitinvoiceResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitinvoiceResponse} returns this + */ +proto.cln.WaitinvoiceResponse.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitinvoiceResponse.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 12) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.WaitsendpayRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WaitsendpayRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WaitsendpayRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitsendpayRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + timeout: jspb.Message.getFieldWithDefault(msg, 3, 0), + partid: jspb.Message.getFieldWithDefault(msg, 2, 0), + groupid: 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.cln.WaitsendpayRequest} + */ +proto.cln.WaitsendpayRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WaitsendpayRequest; + return proto.cln.WaitsendpayRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WaitsendpayRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WaitsendpayRequest} + */ +proto.cln.WaitsendpayRequest.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.setPaymentHash(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTimeout(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPartid(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WaitsendpayRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WaitsendpayRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WaitsendpayRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitsendpayRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitsendpayRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.WaitsendpayRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.WaitsendpayRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 timeout = 3; + * @return {number} + */ +proto.cln.WaitsendpayRequest.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.setTimeout = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.clearTimeout = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayRequest.prototype.hasTimeout = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 partid = 2; + * @return {number} + */ +proto.cln.WaitsendpayRequest.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.clearPartid = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayRequest.prototype.hasPartid = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 groupid = 4; + * @return {number} + */ +proto.cln.WaitsendpayRequest.prototype.getGroupid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.setGroupid = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayRequest} returns this + */ +proto.cln.WaitsendpayRequest.prototype.clearGroupid = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayRequest.prototype.hasGroupid = 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.cln.WaitsendpayResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WaitsendpayResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WaitsendpayResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitsendpayResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, 0), + groupid: jspb.Message.getFieldWithDefault(msg, 2, 0), + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + destination: msg.getDestination_asB64(), + createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + completedAt: jspb.Message.getFloatingPointFieldWithDefault(msg, 14, 0.0), + amountSentMsat: (f = msg.getAmountSentMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + label: jspb.Message.getFieldWithDefault(msg, 9, ""), + partid: jspb.Message.getFieldWithDefault(msg, 10, 0), + bolt11: jspb.Message.getFieldWithDefault(msg, 11, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 12, ""), + paymentPreimage: msg.getPaymentPreimage_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.cln.WaitsendpayResponse} + */ +proto.cln.WaitsendpayResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WaitsendpayResponse; + return proto.cln.WaitsendpayResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WaitsendpayResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WaitsendpayResponse} + */ +proto.cln.WaitsendpayResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGroupid(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {!proto.cln.WaitsendpayResponse.WaitsendpayStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 14: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCompletedAt(value); + break; + case 8: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountSentMsat(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPartid(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WaitsendpayResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WaitsendpayResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WaitsendpayResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WaitsendpayResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeDouble( + 14, + f + ); + } + f = message.getAmountSentMsat(); + if (f != null) { + writer.writeMessage( + 8, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint64( + 10, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.WaitsendpayResponse.WaitsendpayStatus = { + COMPLETE: 0 +}; + +/** + * optional uint64 id = 1; + * @return {number} + */ +proto.cln.WaitsendpayResponse.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 groupid = 2; + * @return {number} + */ +proto.cln.WaitsendpayResponse.prototype.getGroupid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setGroupid = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearGroupid = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasGroupid = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitsendpayResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.WaitsendpayResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.WaitsendpayResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional WaitsendpayStatus status = 4; + * @return {!proto.cln.WaitsendpayResponse.WaitsendpayStatus} + */ +proto.cln.WaitsendpayResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.WaitsendpayResponse.WaitsendpayStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cln.WaitsendpayResponse.WaitsendpayStatus} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.WaitsendpayResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.WaitsendpayResponse} returns this +*/ +proto.cln.WaitsendpayResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes destination = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitsendpayResponse.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes destination = 6; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.WaitsendpayResponse.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.WaitsendpayResponse.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearDestination = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasDestination = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint64 created_at = 7; + * @return {number} + */ +proto.cln.WaitsendpayResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional double completed_at = 14; + * @return {number} + */ +proto.cln.WaitsendpayResponse.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 14, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setCompletedAt = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearCompletedAt = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasCompletedAt = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional Amount amount_sent_msat = 8; + * @return {?proto.cln.Amount} + */ +proto.cln.WaitsendpayResponse.prototype.getAmountSentMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 8)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.WaitsendpayResponse} returns this +*/ +proto.cln.WaitsendpayResponse.prototype.setAmountSentMsat = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearAmountSentMsat = function() { + return this.setAmountSentMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasAmountSentMsat = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string label = 9; + * @return {string} + */ +proto.cln.WaitsendpayResponse.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearLabel = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasLabel = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional uint64 partid = 10; + * @return {number} + */ +proto.cln.WaitsendpayResponse.prototype.getPartid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setPartid = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearPartid = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasPartid = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string bolt11 = 11; + * @return {string} + */ +proto.cln.WaitsendpayResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string bolt12 = 12; + * @return {string} + */ +proto.cln.WaitsendpayResponse.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes payment_preimage = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.WaitsendpayResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes payment_preimage = 13; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.WaitsendpayResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.WaitsendpayResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WaitsendpayResponse} returns this + */ +proto.cln.WaitsendpayResponse.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WaitsendpayResponse.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 13) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.NewaddrRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.NewaddrRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.NewaddrRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.NewaddrRequest.toObject = function(includeInstance, msg) { + var f, obj = { + addresstype: 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.cln.NewaddrRequest} + */ +proto.cln.NewaddrRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.NewaddrRequest; + return proto.cln.NewaddrRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.NewaddrRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.NewaddrRequest} + */ +proto.cln.NewaddrRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.NewaddrRequest.NewaddrAddresstype} */ (reader.readEnum()); + msg.setAddresstype(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.NewaddrRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.NewaddrRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.NewaddrRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.NewaddrRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.cln.NewaddrRequest.NewaddrAddresstype} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.NewaddrRequest.NewaddrAddresstype = { + BECH32: 0, + ALL: 2 +}; + +/** + * optional NewaddrAddresstype addresstype = 1; + * @return {!proto.cln.NewaddrRequest.NewaddrAddresstype} + */ +proto.cln.NewaddrRequest.prototype.getAddresstype = function() { + return /** @type {!proto.cln.NewaddrRequest.NewaddrAddresstype} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.NewaddrRequest.NewaddrAddresstype} value + * @return {!proto.cln.NewaddrRequest} returns this + */ +proto.cln.NewaddrRequest.prototype.setAddresstype = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.NewaddrRequest} returns this + */ +proto.cln.NewaddrRequest.prototype.clearAddresstype = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.NewaddrRequest.prototype.hasAddresstype = 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.cln.NewaddrResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.NewaddrResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.NewaddrResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.NewaddrResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bech32: jspb.Message.getFieldWithDefault(msg, 1, ""), + p2shSegwit: 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.cln.NewaddrResponse} + */ +proto.cln.NewaddrResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.NewaddrResponse; + return proto.cln.NewaddrResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.NewaddrResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.NewaddrResponse} + */ +proto.cln.NewaddrResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBech32(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setP2shSegwit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.NewaddrResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.NewaddrResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.NewaddrResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.NewaddrResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string bech32 = 1; + * @return {string} + */ +proto.cln.NewaddrResponse.prototype.getBech32 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.NewaddrResponse} returns this + */ +proto.cln.NewaddrResponse.prototype.setBech32 = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.NewaddrResponse} returns this + */ +proto.cln.NewaddrResponse.prototype.clearBech32 = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.NewaddrResponse.prototype.hasBech32 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string p2sh_segwit = 2; + * @return {string} + */ +proto.cln.NewaddrResponse.prototype.getP2shSegwit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.NewaddrResponse} returns this + */ +proto.cln.NewaddrResponse.prototype.setP2shSegwit = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.NewaddrResponse} returns this + */ +proto.cln.NewaddrResponse.prototype.clearP2shSegwit = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.NewaddrResponse.prototype.hasP2shSegwit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.WithdrawRequest.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.cln.WithdrawRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WithdrawRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WithdrawRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WithdrawRequest.toObject = function(includeInstance, msg) { + var f, obj = { + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + satoshi: (f = msg.getSatoshi()) && cln_primitives_pb.AmountOrAll.toObject(includeInstance, f), + feerate: (f = msg.getFeerate()) && cln_primitives_pb.Feerate.toObject(includeInstance, f), + minconf: jspb.Message.getFieldWithDefault(msg, 3, 0), + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + cln_primitives_pb.Outpoint.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.cln.WithdrawRequest} + */ +proto.cln.WithdrawRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WithdrawRequest; + return proto.cln.WithdrawRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WithdrawRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WithdrawRequest} + */ +proto.cln.WithdrawRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDestination(value); + break; + case 2: + var value = new cln_primitives_pb.AmountOrAll; + reader.readMessage(value,cln_primitives_pb.AmountOrAll.deserializeBinaryFromReader); + msg.setSatoshi(value); + break; + case 5: + var value = new cln_primitives_pb.Feerate; + reader.readMessage(value,cln_primitives_pb.Feerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinconf(value); + break; + case 4: + var value = new cln_primitives_pb.Outpoint; + reader.readMessage(value,cln_primitives_pb.Outpoint.deserializeBinaryFromReader); + msg.addUtxos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WithdrawRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WithdrawRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WithdrawRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WithdrawRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDestination(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSatoshi(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.AmountOrAll.serializeBinaryToWriter + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Feerate.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getUtxosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cln_primitives_pb.Outpoint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string destination = 1; + * @return {string} + */ +proto.cln.WithdrawRequest.prototype.getDestination = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WithdrawRequest} returns this + */ +proto.cln.WithdrawRequest.prototype.setDestination = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional AmountOrAll satoshi = 2; + * @return {?proto.cln.AmountOrAll} + */ +proto.cln.WithdrawRequest.prototype.getSatoshi = function() { + return /** @type{?proto.cln.AmountOrAll} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.AmountOrAll, 2)); +}; + + +/** + * @param {?proto.cln.AmountOrAll|undefined} value + * @return {!proto.cln.WithdrawRequest} returns this +*/ +proto.cln.WithdrawRequest.prototype.setSatoshi = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WithdrawRequest} returns this + */ +proto.cln.WithdrawRequest.prototype.clearSatoshi = function() { + return this.setSatoshi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WithdrawRequest.prototype.hasSatoshi = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Feerate feerate = 5; + * @return {?proto.cln.Feerate} + */ +proto.cln.WithdrawRequest.prototype.getFeerate = function() { + return /** @type{?proto.cln.Feerate} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Feerate, 5)); +}; + + +/** + * @param {?proto.cln.Feerate|undefined} value + * @return {!proto.cln.WithdrawRequest} returns this +*/ +proto.cln.WithdrawRequest.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.WithdrawRequest} returns this + */ +proto.cln.WithdrawRequest.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WithdrawRequest.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 minconf = 3; + * @return {number} + */ +proto.cln.WithdrawRequest.prototype.getMinconf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.WithdrawRequest} returns this + */ +proto.cln.WithdrawRequest.prototype.setMinconf = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.WithdrawRequest} returns this + */ +proto.cln.WithdrawRequest.prototype.clearMinconf = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.WithdrawRequest.prototype.hasMinconf = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Outpoint utxos = 4; + * @return {!Array} + */ +proto.cln.WithdrawRequest.prototype.getUtxosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cln_primitives_pb.Outpoint, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.WithdrawRequest} returns this +*/ +proto.cln.WithdrawRequest.prototype.setUtxosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cln.Outpoint=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.Outpoint} + */ +proto.cln.WithdrawRequest.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cln.Outpoint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.WithdrawRequest} returns this + */ +proto.cln.WithdrawRequest.prototype.clearUtxosList = function() { + return this.setUtxosList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.WithdrawResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.WithdrawResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.WithdrawResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WithdrawResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64(), + txid: msg.getTxid_asB64(), + psbt: 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.cln.WithdrawResponse} + */ +proto.cln.WithdrawResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.WithdrawResponse; + return proto.cln.WithdrawResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.WithdrawResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.WithdrawResponse} + */ +proto.cln.WithdrawResponse.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 {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.WithdrawResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.WithdrawResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.WithdrawResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.WithdrawResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.WithdrawResponse.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.cln.WithdrawResponse.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.cln.WithdrawResponse.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WithdrawResponse} returns this + */ +proto.cln.WithdrawResponse.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.WithdrawResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.WithdrawResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.WithdrawResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.WithdrawResponse} returns this + */ +proto.cln.WithdrawResponse.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string psbt = 3; + * @return {string} + */ +proto.cln.WithdrawResponse.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.WithdrawResponse} returns this + */ +proto.cln.WithdrawResponse.prototype.setPsbt = 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.cln.KeysendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.KeysendRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.KeysendRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.KeysendRequest.toObject = function(includeInstance, msg) { + var f, obj = { + destination: msg.getDestination_asB64(), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + maxfeepercent: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + retryFor: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxdelay: jspb.Message.getFieldWithDefault(msg, 6, 0), + exemptfee: (f = msg.getExemptfee()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + routehints: (f = msg.getRoutehints()) && cln_primitives_pb.RoutehintList.toObject(includeInstance, f), + extratlvs: (f = msg.getExtratlvs()) && cln_primitives_pb.TlvStream.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.KeysendRequest} + */ +proto.cln.KeysendRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.KeysendRequest; + return proto.cln.KeysendRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.KeysendRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.KeysendRequest} + */ +proto.cln.KeysendRequest.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.setDestination(value); + break; + case 10: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMaxfeepercent(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRetryFor(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxdelay(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setExemptfee(value); + break; + case 8: + var value = new cln_primitives_pb.RoutehintList; + reader.readMessage(value,cln_primitives_pb.RoutehintList.deserializeBinaryFromReader); + msg.setRoutehints(value); + break; + case 9: + var value = new cln_primitives_pb.TlvStream; + reader.readMessage(value,cln_primitives_pb.TlvStream.deserializeBinaryFromReader); + msg.setExtratlvs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.KeysendRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.KeysendRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.KeysendRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.KeysendRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDestination_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = message.getExemptfee(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getRoutehints(); + if (f != null) { + writer.writeMessage( + 8, + f, + cln_primitives_pb.RoutehintList.serializeBinaryToWriter + ); + } + f = message.getExtratlvs(); + if (f != null) { + writer.writeMessage( + 9, + f, + cln_primitives_pb.TlvStream.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes destination = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.KeysendRequest.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes destination = 1; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.KeysendRequest.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.KeysendRequest.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.setDestination = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Amount amount_msat = 10; + * @return {?proto.cln.Amount} + */ +proto.cln.KeysendRequest.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 10)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.KeysendRequest} returns this +*/ +proto.cln.KeysendRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string label = 3; + * @return {string} + */ +proto.cln.KeysendRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearLabel = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasLabel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional double maxfeepercent = 4; + * @return {number} + */ +proto.cln.KeysendRequest.prototype.getMaxfeepercent = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.setMaxfeepercent = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearMaxfeepercent = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasMaxfeepercent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 retry_for = 5; + * @return {number} + */ +proto.cln.KeysendRequest.prototype.getRetryFor = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.setRetryFor = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearRetryFor = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasRetryFor = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 maxdelay = 6; + * @return {number} + */ +proto.cln.KeysendRequest.prototype.getMaxdelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.setMaxdelay = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearMaxdelay = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasMaxdelay = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Amount exemptfee = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.KeysendRequest.prototype.getExemptfee = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.KeysendRequest} returns this +*/ +proto.cln.KeysendRequest.prototype.setExemptfee = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearExemptfee = function() { + return this.setExemptfee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasExemptfee = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional RoutehintList routehints = 8; + * @return {?proto.cln.RoutehintList} + */ +proto.cln.KeysendRequest.prototype.getRoutehints = function() { + return /** @type{?proto.cln.RoutehintList} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.RoutehintList, 8)); +}; + + +/** + * @param {?proto.cln.RoutehintList|undefined} value + * @return {!proto.cln.KeysendRequest} returns this +*/ +proto.cln.KeysendRequest.prototype.setRoutehints = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearRoutehints = function() { + return this.setRoutehints(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasRoutehints = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional TlvStream extratlvs = 9; + * @return {?proto.cln.TlvStream} + */ +proto.cln.KeysendRequest.prototype.getExtratlvs = function() { + return /** @type{?proto.cln.TlvStream} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.TlvStream, 9)); +}; + + +/** + * @param {?proto.cln.TlvStream|undefined} value + * @return {!proto.cln.KeysendRequest} returns this +*/ +proto.cln.KeysendRequest.prototype.setExtratlvs = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.KeysendRequest} returns this + */ +proto.cln.KeysendRequest.prototype.clearExtratlvs = function() { + return this.setExtratlvs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendRequest.prototype.hasExtratlvs = 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.cln.KeysendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.KeysendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.KeysendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.KeysendResponse.toObject = function(includeInstance, msg) { + var f, obj = { + paymentPreimage: msg.getPaymentPreimage_asB64(), + destination: msg.getDestination_asB64(), + paymentHash: msg.getPaymentHash_asB64(), + createdAt: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + parts: jspb.Message.getFieldWithDefault(msg, 5, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + amountSentMsat: (f = msg.getAmountSentMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + warningPartialCompletion: jspb.Message.getFieldWithDefault(msg, 8, ""), + status: 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.cln.KeysendResponse} + */ +proto.cln.KeysendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.KeysendResponse; + return proto.cln.KeysendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.KeysendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.KeysendResponse} + */ +proto.cln.KeysendResponse.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.setPaymentPreimage(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCreatedAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setParts(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountSentMsat(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningPartialCompletion(value); + break; + case 9: + var value = /** @type {!proto.cln.KeysendResponse.KeysendStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.KeysendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.KeysendResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.KeysendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.KeysendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentPreimage_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = message.getParts(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getAmountSentMsat(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.KeysendResponse.KeysendStatus = { + COMPLETE: 0 +}; + +/** + * optional bytes payment_preimage = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.KeysendResponse.prototype.getPaymentPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payment_preimage = 1; + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {string} + */ +proto.cln.KeysendResponse.prototype.getPaymentPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentPreimage())); +}; + + +/** + * optional bytes payment_preimage = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentPreimage()` + * @return {!Uint8Array} + */ +proto.cln.KeysendResponse.prototype.getPaymentPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes destination = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.KeysendResponse.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes destination = 2; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.KeysendResponse.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.KeysendResponse.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.clearDestination = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendResponse.prototype.hasDestination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes payment_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.KeysendResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payment_hash = 3; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.KeysendResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.KeysendResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional double created_at = 4; + * @return {number} + */ +proto.cln.KeysendResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional uint32 parts = 5; + * @return {number} + */ +proto.cln.KeysendResponse.prototype.getParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setParts = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional Amount amount_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.KeysendResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.KeysendResponse} returns this +*/ +proto.cln.KeysendResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Amount amount_sent_msat = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.KeysendResponse.prototype.getAmountSentMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.KeysendResponse} returns this +*/ +proto.cln.KeysendResponse.prototype.setAmountSentMsat = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.clearAmountSentMsat = function() { + return this.setAmountSentMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendResponse.prototype.hasAmountSentMsat = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string warning_partial_completion = 8; + * @return {string} + */ +proto.cln.KeysendResponse.prototype.getWarningPartialCompletion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setWarningPartialCompletion = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.clearWarningPartialCompletion = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.KeysendResponse.prototype.hasWarningPartialCompletion = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional KeysendStatus status = 9; + * @return {!proto.cln.KeysendResponse.KeysendStatus} + */ +proto.cln.KeysendResponse.prototype.getStatus = function() { + return /** @type {!proto.cln.KeysendResponse.KeysendStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.cln.KeysendResponse.KeysendStatus} value + * @return {!proto.cln.KeysendResponse} returns this + */ +proto.cln.KeysendResponse.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.FundpsbtRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FundpsbtRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FundpsbtRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundpsbtRequest.toObject = function(includeInstance, msg) { + var f, obj = { + satoshi: (f = msg.getSatoshi()) && cln_primitives_pb.AmountOrAll.toObject(includeInstance, f), + feerate: (f = msg.getFeerate()) && cln_primitives_pb.Feerate.toObject(includeInstance, f), + startweight: jspb.Message.getFieldWithDefault(msg, 3, 0), + minconf: jspb.Message.getFieldWithDefault(msg, 4, 0), + reserve: jspb.Message.getFieldWithDefault(msg, 5, 0), + locktime: jspb.Message.getFieldWithDefault(msg, 6, 0), + minWitnessWeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + excessAsChange: 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.cln.FundpsbtRequest} + */ +proto.cln.FundpsbtRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FundpsbtRequest; + return proto.cln.FundpsbtRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FundpsbtRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FundpsbtRequest} + */ +proto.cln.FundpsbtRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cln_primitives_pb.AmountOrAll; + reader.readMessage(value,cln_primitives_pb.AmountOrAll.deserializeBinaryFromReader); + msg.setSatoshi(value); + break; + case 2: + var value = new cln_primitives_pb.Feerate; + reader.readMessage(value,cln_primitives_pb.Feerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStartweight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinconf(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setReserve(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLocktime(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinWitnessWeight(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExcessAsChange(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FundpsbtRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FundpsbtRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FundpsbtRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundpsbtRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSatoshi(); + if (f != null) { + writer.writeMessage( + 1, + f, + cln_primitives_pb.AmountOrAll.serializeBinaryToWriter + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Feerate.serializeBinaryToWriter + ); + } + f = message.getStartweight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional AmountOrAll satoshi = 1; + * @return {?proto.cln.AmountOrAll} + */ +proto.cln.FundpsbtRequest.prototype.getSatoshi = function() { + return /** @type{?proto.cln.AmountOrAll} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.AmountOrAll, 1)); +}; + + +/** + * @param {?proto.cln.AmountOrAll|undefined} value + * @return {!proto.cln.FundpsbtRequest} returns this +*/ +proto.cln.FundpsbtRequest.prototype.setSatoshi = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearSatoshi = function() { + return this.setSatoshi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasSatoshi = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Feerate feerate = 2; + * @return {?proto.cln.Feerate} + */ +proto.cln.FundpsbtRequest.prototype.getFeerate = function() { + return /** @type{?proto.cln.Feerate} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Feerate, 2)); +}; + + +/** + * @param {?proto.cln.Feerate|undefined} value + * @return {!proto.cln.FundpsbtRequest} returns this +*/ +proto.cln.FundpsbtRequest.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 startweight = 3; + * @return {number} + */ +proto.cln.FundpsbtRequest.prototype.getStartweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.setStartweight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 minconf = 4; + * @return {number} + */ +proto.cln.FundpsbtRequest.prototype.getMinconf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.setMinconf = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearMinconf = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasMinconf = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 reserve = 5; + * @return {number} + */ +proto.cln.FundpsbtRequest.prototype.getReserve = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.setReserve = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearReserve = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasReserve = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 locktime = 6; + * @return {number} + */ +proto.cln.FundpsbtRequest.prototype.getLocktime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.setLocktime = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearLocktime = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasLocktime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint32 min_witness_weight = 7; + * @return {number} + */ +proto.cln.FundpsbtRequest.prototype.getMinWitnessWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.setMinWitnessWeight = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearMinWitnessWeight = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasMinWitnessWeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool excess_as_change = 8; + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.getExcessAsChange = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.setExcessAsChange = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundpsbtRequest} returns this + */ +proto.cln.FundpsbtRequest.prototype.clearExcessAsChange = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtRequest.prototype.hasExcessAsChange = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.FundpsbtResponse.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.cln.FundpsbtResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FundpsbtResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FundpsbtResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundpsbtResponse.toObject = function(includeInstance, msg) { + var f, obj = { + psbt: jspb.Message.getFieldWithDefault(msg, 1, ""), + feeratePerKw: jspb.Message.getFieldWithDefault(msg, 2, 0), + estimatedFinalWeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + excessMsat: (f = msg.getExcessMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + changeOutnum: jspb.Message.getFieldWithDefault(msg, 5, 0), + reservationsList: jspb.Message.toObjectList(msg.getReservationsList(), + proto.cln.FundpsbtReservations.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.cln.FundpsbtResponse} + */ +proto.cln.FundpsbtResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FundpsbtResponse; + return proto.cln.FundpsbtResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FundpsbtResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FundpsbtResponse} + */ +proto.cln.FundpsbtResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeratePerKw(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEstimatedFinalWeight(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setExcessMsat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChangeOutnum(value); + break; + case 6: + var value = new proto.cln.FundpsbtReservations; + reader.readMessage(value,proto.cln.FundpsbtReservations.deserializeBinaryFromReader); + msg.addReservations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FundpsbtResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FundpsbtResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FundpsbtResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundpsbtResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFeeratePerKw(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getEstimatedFinalWeight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getExcessMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = message.getReservationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cln.FundpsbtReservations.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string psbt = 1; + * @return {string} + */ +proto.cln.FundpsbtResponse.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.setPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 feerate_per_kw = 2; + * @return {number} + */ +proto.cln.FundpsbtResponse.prototype.getFeeratePerKw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.setFeeratePerKw = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 estimated_final_weight = 3; + * @return {number} + */ +proto.cln.FundpsbtResponse.prototype.getEstimatedFinalWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.setEstimatedFinalWeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional Amount excess_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.FundpsbtResponse.prototype.getExcessMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.FundpsbtResponse} returns this +*/ +proto.cln.FundpsbtResponse.prototype.setExcessMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.clearExcessMsat = function() { + return this.setExcessMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtResponse.prototype.hasExcessMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 change_outnum = 5; + * @return {number} + */ +proto.cln.FundpsbtResponse.prototype.getChangeOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.setChangeOutnum = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.clearChangeOutnum = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundpsbtResponse.prototype.hasChangeOutnum = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated FundpsbtReservations reservations = 6; + * @return {!Array} + */ +proto.cln.FundpsbtResponse.prototype.getReservationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.FundpsbtReservations, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.FundpsbtResponse} returns this +*/ +proto.cln.FundpsbtResponse.prototype.setReservationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cln.FundpsbtReservations=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.FundpsbtReservations} + */ +proto.cln.FundpsbtResponse.prototype.addReservations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cln.FundpsbtReservations, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.FundpsbtResponse} returns this + */ +proto.cln.FundpsbtResponse.prototype.clearReservationsList = function() { + return this.setReservationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.FundpsbtReservations.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FundpsbtReservations.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FundpsbtReservations} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundpsbtReservations.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + vout: jspb.Message.getFieldWithDefault(msg, 2, 0), + wasReserved: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + reserved: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + reservedToBlock: 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.cln.FundpsbtReservations} + */ +proto.cln.FundpsbtReservations.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FundpsbtReservations; + return proto.cln.FundpsbtReservations.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FundpsbtReservations} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FundpsbtReservations} + */ +proto.cln.FundpsbtReservations.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.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setVout(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWasReserved(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReserved(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setReservedToBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FundpsbtReservations.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FundpsbtReservations.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FundpsbtReservations} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundpsbtReservations.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getVout(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getWasReserved(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getReserved(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getReservedToBlock(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } +}; + + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.FundpsbtReservations.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.FundpsbtReservations.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.FundpsbtReservations.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.FundpsbtReservations} returns this + */ +proto.cln.FundpsbtReservations.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 vout = 2; + * @return {number} + */ +proto.cln.FundpsbtReservations.prototype.getVout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtReservations} returns this + */ +proto.cln.FundpsbtReservations.prototype.setVout = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bool was_reserved = 3; + * @return {boolean} + */ +proto.cln.FundpsbtReservations.prototype.getWasReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.FundpsbtReservations} returns this + */ +proto.cln.FundpsbtReservations.prototype.setWasReserved = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bool reserved = 4; + * @return {boolean} + */ +proto.cln.FundpsbtReservations.prototype.getReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.FundpsbtReservations} returns this + */ +proto.cln.FundpsbtReservations.prototype.setReserved = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional uint32 reserved_to_block = 5; + * @return {number} + */ +proto.cln.FundpsbtReservations.prototype.getReservedToBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundpsbtReservations} returns this + */ +proto.cln.FundpsbtReservations.prototype.setReservedToBlock = 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.cln.SendpsbtRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendpsbtRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendpsbtRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpsbtRequest.toObject = function(includeInstance, msg) { + var f, obj = { + psbt: jspb.Message.getFieldWithDefault(msg, 1, ""), + reserve: 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.cln.SendpsbtRequest} + */ +proto.cln.SendpsbtRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendpsbtRequest; + return proto.cln.SendpsbtRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendpsbtRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendpsbtRequest} + */ +proto.cln.SendpsbtRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReserve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendpsbtRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendpsbtRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendpsbtRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpsbtRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string psbt = 1; + * @return {string} + */ +proto.cln.SendpsbtRequest.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendpsbtRequest} returns this + */ +proto.cln.SendpsbtRequest.prototype.setPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool reserve = 2; + * @return {boolean} + */ +proto.cln.SendpsbtRequest.prototype.getReserve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.SendpsbtRequest} returns this + */ +proto.cln.SendpsbtRequest.prototype.setReserve = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SendpsbtRequest} returns this + */ +proto.cln.SendpsbtRequest.prototype.clearReserve = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SendpsbtRequest.prototype.hasReserve = 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.cln.SendpsbtResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendpsbtResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendpsbtResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpsbtResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64(), + txid: msg.getTxid_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.cln.SendpsbtResponse} + */ +proto.cln.SendpsbtResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendpsbtResponse; + return proto.cln.SendpsbtResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendpsbtResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendpsbtResponse} + */ +proto.cln.SendpsbtResponse.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 {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendpsbtResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendpsbtResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendpsbtResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendpsbtResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpsbtResponse.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.cln.SendpsbtResponse.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.cln.SendpsbtResponse.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpsbtResponse} returns this + */ +proto.cln.SendpsbtResponse.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendpsbtResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.SendpsbtResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.SendpsbtResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendpsbtResponse} returns this + */ +proto.cln.SendpsbtResponse.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.SignpsbtRequest.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.cln.SignpsbtRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SignpsbtRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SignpsbtRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignpsbtRequest.toObject = function(includeInstance, msg) { + var f, obj = { + psbt: jspb.Message.getFieldWithDefault(msg, 1, ""), + signonlyList: (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.cln.SignpsbtRequest} + */ +proto.cln.SignpsbtRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SignpsbtRequest; + return proto.cln.SignpsbtRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SignpsbtRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SignpsbtRequest} + */ +proto.cln.SignpsbtRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addSignonly(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SignpsbtRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SignpsbtRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SignpsbtRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignpsbtRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignonlyList(); + if (f.length > 0) { + writer.writePackedUint32( + 2, + f + ); + } +}; + + +/** + * optional string psbt = 1; + * @return {string} + */ +proto.cln.SignpsbtRequest.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SignpsbtRequest} returns this + */ +proto.cln.SignpsbtRequest.prototype.setPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated uint32 signonly = 2; + * @return {!Array} + */ +proto.cln.SignpsbtRequest.prototype.getSignonlyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.SignpsbtRequest} returns this + */ +proto.cln.SignpsbtRequest.prototype.setSignonlyList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.cln.SignpsbtRequest} returns this + */ +proto.cln.SignpsbtRequest.prototype.addSignonly = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.SignpsbtRequest} returns this + */ +proto.cln.SignpsbtRequest.prototype.clearSignonlyList = function() { + return this.setSignonlyList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.SignpsbtResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SignpsbtResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SignpsbtResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignpsbtResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signedPsbt: 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.cln.SignpsbtResponse} + */ +proto.cln.SignpsbtResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SignpsbtResponse; + return proto.cln.SignpsbtResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SignpsbtResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SignpsbtResponse} + */ +proto.cln.SignpsbtResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSignedPsbt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SignpsbtResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SignpsbtResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SignpsbtResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignpsbtResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string signed_psbt = 1; + * @return {string} + */ +proto.cln.SignpsbtResponse.prototype.getSignedPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SignpsbtResponse} returns this + */ +proto.cln.SignpsbtResponse.prototype.setSignedPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.UtxopsbtRequest.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.cln.UtxopsbtRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.UtxopsbtRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.UtxopsbtRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.UtxopsbtRequest.toObject = function(includeInstance, msg) { + var f, obj = { + satoshi: (f = msg.getSatoshi()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feerate: (f = msg.getFeerate()) && cln_primitives_pb.Feerate.toObject(includeInstance, f), + startweight: jspb.Message.getFieldWithDefault(msg, 3, 0), + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + cln_primitives_pb.Outpoint.toObject, includeInstance), + reserve: jspb.Message.getFieldWithDefault(msg, 5, 0), + reservedok: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + locktime: jspb.Message.getFieldWithDefault(msg, 6, 0), + minWitnessWeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + excessAsChange: jspb.Message.getBooleanFieldWithDefault(msg, 9, 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.cln.UtxopsbtRequest} + */ +proto.cln.UtxopsbtRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.UtxopsbtRequest; + return proto.cln.UtxopsbtRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.UtxopsbtRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.UtxopsbtRequest} + */ +proto.cln.UtxopsbtRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setSatoshi(value); + break; + case 2: + var value = new cln_primitives_pb.Feerate; + reader.readMessage(value,cln_primitives_pb.Feerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setStartweight(value); + break; + case 4: + var value = new cln_primitives_pb.Outpoint; + reader.readMessage(value,cln_primitives_pb.Outpoint.deserializeBinaryFromReader); + msg.addUtxos(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setReserve(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReservedok(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLocktime(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinWitnessWeight(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExcessAsChange(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.UtxopsbtRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.UtxopsbtRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.UtxopsbtRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.UtxopsbtRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSatoshi(); + if (f != null) { + writer.writeMessage( + 1, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Feerate.serializeBinaryToWriter + ); + } + f = message.getStartweight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getUtxosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cln_primitives_pb.Outpoint.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBool( + 9, + f + ); + } +}; + + +/** + * optional Amount satoshi = 1; + * @return {?proto.cln.Amount} + */ +proto.cln.UtxopsbtRequest.prototype.getSatoshi = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 1)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.UtxopsbtRequest} returns this +*/ +proto.cln.UtxopsbtRequest.prototype.setSatoshi = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearSatoshi = function() { + return this.setSatoshi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasSatoshi = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Feerate feerate = 2; + * @return {?proto.cln.Feerate} + */ +proto.cln.UtxopsbtRequest.prototype.getFeerate = function() { + return /** @type{?proto.cln.Feerate} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Feerate, 2)); +}; + + +/** + * @param {?proto.cln.Feerate|undefined} value + * @return {!proto.cln.UtxopsbtRequest} returns this +*/ +proto.cln.UtxopsbtRequest.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 startweight = 3; + * @return {number} + */ +proto.cln.UtxopsbtRequest.prototype.getStartweight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.setStartweight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated Outpoint utxos = 4; + * @return {!Array} + */ +proto.cln.UtxopsbtRequest.prototype.getUtxosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cln_primitives_pb.Outpoint, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.UtxopsbtRequest} returns this +*/ +proto.cln.UtxopsbtRequest.prototype.setUtxosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cln.Outpoint=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.Outpoint} + */ +proto.cln.UtxopsbtRequest.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cln.Outpoint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearUtxosList = function() { + return this.setUtxosList([]); +}; + + +/** + * optional uint32 reserve = 5; + * @return {number} + */ +proto.cln.UtxopsbtRequest.prototype.getReserve = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.setReserve = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearReserve = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasReserve = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool reservedok = 8; + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.getReservedok = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.setReservedok = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearReservedok = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasReservedok = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint32 locktime = 6; + * @return {number} + */ +proto.cln.UtxopsbtRequest.prototype.getLocktime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.setLocktime = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearLocktime = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasLocktime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint32 min_witness_weight = 7; + * @return {number} + */ +proto.cln.UtxopsbtRequest.prototype.getMinWitnessWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.setMinWitnessWeight = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearMinWitnessWeight = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasMinWitnessWeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool excess_as_change = 9; + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.getExcessAsChange = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.setExcessAsChange = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.UtxopsbtRequest} returns this + */ +proto.cln.UtxopsbtRequest.prototype.clearExcessAsChange = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtRequest.prototype.hasExcessAsChange = function() { + return jspb.Message.getField(this, 9) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.UtxopsbtResponse.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.cln.UtxopsbtResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.UtxopsbtResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.UtxopsbtResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.UtxopsbtResponse.toObject = function(includeInstance, msg) { + var f, obj = { + psbt: jspb.Message.getFieldWithDefault(msg, 1, ""), + feeratePerKw: jspb.Message.getFieldWithDefault(msg, 2, 0), + estimatedFinalWeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + excessMsat: (f = msg.getExcessMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + changeOutnum: jspb.Message.getFieldWithDefault(msg, 5, 0), + reservationsList: jspb.Message.toObjectList(msg.getReservationsList(), + proto.cln.UtxopsbtReservations.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.cln.UtxopsbtResponse} + */ +proto.cln.UtxopsbtResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.UtxopsbtResponse; + return proto.cln.UtxopsbtResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.UtxopsbtResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.UtxopsbtResponse} + */ +proto.cln.UtxopsbtResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeratePerKw(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEstimatedFinalWeight(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setExcessMsat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setChangeOutnum(value); + break; + case 6: + var value = new proto.cln.UtxopsbtReservations; + reader.readMessage(value,proto.cln.UtxopsbtReservations.deserializeBinaryFromReader); + msg.addReservations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.UtxopsbtResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.UtxopsbtResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.UtxopsbtResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.UtxopsbtResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFeeratePerKw(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getEstimatedFinalWeight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getExcessMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = message.getReservationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cln.UtxopsbtReservations.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string psbt = 1; + * @return {string} + */ +proto.cln.UtxopsbtResponse.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.setPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 feerate_per_kw = 2; + * @return {number} + */ +proto.cln.UtxopsbtResponse.prototype.getFeeratePerKw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.setFeeratePerKw = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 estimated_final_weight = 3; + * @return {number} + */ +proto.cln.UtxopsbtResponse.prototype.getEstimatedFinalWeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.setEstimatedFinalWeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional Amount excess_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.UtxopsbtResponse.prototype.getExcessMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.UtxopsbtResponse} returns this +*/ +proto.cln.UtxopsbtResponse.prototype.setExcessMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.clearExcessMsat = function() { + return this.setExcessMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtResponse.prototype.hasExcessMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 change_outnum = 5; + * @return {number} + */ +proto.cln.UtxopsbtResponse.prototype.getChangeOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.setChangeOutnum = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.clearChangeOutnum = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.UtxopsbtResponse.prototype.hasChangeOutnum = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated UtxopsbtReservations reservations = 6; + * @return {!Array} + */ +proto.cln.UtxopsbtResponse.prototype.getReservationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.UtxopsbtReservations, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.UtxopsbtResponse} returns this +*/ +proto.cln.UtxopsbtResponse.prototype.setReservationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cln.UtxopsbtReservations=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.UtxopsbtReservations} + */ +proto.cln.UtxopsbtResponse.prototype.addReservations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cln.UtxopsbtReservations, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.UtxopsbtResponse} returns this + */ +proto.cln.UtxopsbtResponse.prototype.clearReservationsList = function() { + return this.setReservationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.UtxopsbtReservations.prototype.toObject = function(opt_includeInstance) { + return proto.cln.UtxopsbtReservations.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.UtxopsbtReservations} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.UtxopsbtReservations.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + vout: jspb.Message.getFieldWithDefault(msg, 2, 0), + wasReserved: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + reserved: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + reservedToBlock: 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.cln.UtxopsbtReservations} + */ +proto.cln.UtxopsbtReservations.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.UtxopsbtReservations; + return proto.cln.UtxopsbtReservations.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.UtxopsbtReservations} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.UtxopsbtReservations} + */ +proto.cln.UtxopsbtReservations.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.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setVout(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWasReserved(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReserved(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setReservedToBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.UtxopsbtReservations.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.UtxopsbtReservations.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.UtxopsbtReservations} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.UtxopsbtReservations.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getVout(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getWasReserved(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getReserved(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getReservedToBlock(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } +}; + + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.UtxopsbtReservations.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.UtxopsbtReservations.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.UtxopsbtReservations.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.UtxopsbtReservations} returns this + */ +proto.cln.UtxopsbtReservations.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 vout = 2; + * @return {number} + */ +proto.cln.UtxopsbtReservations.prototype.getVout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtReservations} returns this + */ +proto.cln.UtxopsbtReservations.prototype.setVout = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bool was_reserved = 3; + * @return {boolean} + */ +proto.cln.UtxopsbtReservations.prototype.getWasReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.UtxopsbtReservations} returns this + */ +proto.cln.UtxopsbtReservations.prototype.setWasReserved = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bool reserved = 4; + * @return {boolean} + */ +proto.cln.UtxopsbtReservations.prototype.getReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.UtxopsbtReservations} returns this + */ +proto.cln.UtxopsbtReservations.prototype.setReserved = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional uint32 reserved_to_block = 5; + * @return {number} + */ +proto.cln.UtxopsbtReservations.prototype.getReservedToBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.UtxopsbtReservations} returns this + */ +proto.cln.UtxopsbtReservations.prototype.setReservedToBlock = 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.cln.TxdiscardRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TxdiscardRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TxdiscardRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxdiscardRequest.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_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.cln.TxdiscardRequest} + */ +proto.cln.TxdiscardRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TxdiscardRequest; + return proto.cln.TxdiscardRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TxdiscardRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TxdiscardRequest} + */ +proto.cln.TxdiscardRequest.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.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TxdiscardRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TxdiscardRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TxdiscardRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxdiscardRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxdiscardRequest.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.TxdiscardRequest.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.TxdiscardRequest.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxdiscardRequest} returns this + */ +proto.cln.TxdiscardRequest.prototype.setTxid = 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.cln.TxdiscardResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TxdiscardResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TxdiscardResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxdiscardResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unsignedTx: msg.getUnsignedTx_asB64(), + txid: msg.getTxid_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.cln.TxdiscardResponse} + */ +proto.cln.TxdiscardResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TxdiscardResponse; + return proto.cln.TxdiscardResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TxdiscardResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TxdiscardResponse} + */ +proto.cln.TxdiscardResponse.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.setUnsignedTx(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TxdiscardResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TxdiscardResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TxdiscardResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxdiscardResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnsignedTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes unsigned_tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxdiscardResponse.prototype.getUnsignedTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes unsigned_tx = 1; + * This is a type-conversion wrapper around `getUnsignedTx()` + * @return {string} + */ +proto.cln.TxdiscardResponse.prototype.getUnsignedTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getUnsignedTx())); +}; + + +/** + * optional bytes unsigned_tx = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getUnsignedTx()` + * @return {!Uint8Array} + */ +proto.cln.TxdiscardResponse.prototype.getUnsignedTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getUnsignedTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxdiscardResponse} returns this + */ +proto.cln.TxdiscardResponse.prototype.setUnsignedTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxdiscardResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.TxdiscardResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.TxdiscardResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxdiscardResponse} returns this + */ +proto.cln.TxdiscardResponse.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.TxprepareRequest.repeatedFields_ = [5,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.cln.TxprepareRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TxprepareRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TxprepareRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxprepareRequest.toObject = function(includeInstance, msg) { + var f, obj = { + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + cln_primitives_pb.OutputDesc.toObject, includeInstance), + feerate: (f = msg.getFeerate()) && cln_primitives_pb.Feerate.toObject(includeInstance, f), + minconf: jspb.Message.getFieldWithDefault(msg, 3, 0), + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + cln_primitives_pb.Outpoint.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.cln.TxprepareRequest} + */ +proto.cln.TxprepareRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TxprepareRequest; + return proto.cln.TxprepareRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TxprepareRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TxprepareRequest} + */ +proto.cln.TxprepareRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = new cln_primitives_pb.OutputDesc; + reader.readMessage(value,cln_primitives_pb.OutputDesc.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + case 2: + var value = new cln_primitives_pb.Feerate; + reader.readMessage(value,cln_primitives_pb.Feerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinconf(value); + break; + case 4: + var value = new cln_primitives_pb.Outpoint; + reader.readMessage(value,cln_primitives_pb.Outpoint.deserializeBinaryFromReader); + msg.addUtxos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TxprepareRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TxprepareRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TxprepareRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxprepareRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cln_primitives_pb.OutputDesc.serializeBinaryToWriter + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Feerate.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getUtxosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cln_primitives_pb.Outpoint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated OutputDesc outputs = 5; + * @return {!Array} + */ +proto.cln.TxprepareRequest.prototype.getOutputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cln_primitives_pb.OutputDesc, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.TxprepareRequest} returns this +*/ +proto.cln.TxprepareRequest.prototype.setOutputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cln.OutputDesc=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.OutputDesc} + */ +proto.cln.TxprepareRequest.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cln.OutputDesc, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.TxprepareRequest} returns this + */ +proto.cln.TxprepareRequest.prototype.clearOutputsList = function() { + return this.setOutputsList([]); +}; + + +/** + * optional Feerate feerate = 2; + * @return {?proto.cln.Feerate} + */ +proto.cln.TxprepareRequest.prototype.getFeerate = function() { + return /** @type{?proto.cln.Feerate} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Feerate, 2)); +}; + + +/** + * @param {?proto.cln.Feerate|undefined} value + * @return {!proto.cln.TxprepareRequest} returns this +*/ +proto.cln.TxprepareRequest.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.TxprepareRequest} returns this + */ +proto.cln.TxprepareRequest.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.TxprepareRequest.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 minconf = 3; + * @return {number} + */ +proto.cln.TxprepareRequest.prototype.getMinconf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.TxprepareRequest} returns this + */ +proto.cln.TxprepareRequest.prototype.setMinconf = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.TxprepareRequest} returns this + */ +proto.cln.TxprepareRequest.prototype.clearMinconf = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.TxprepareRequest.prototype.hasMinconf = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Outpoint utxos = 4; + * @return {!Array} + */ +proto.cln.TxprepareRequest.prototype.getUtxosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cln_primitives_pb.Outpoint, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.TxprepareRequest} returns this +*/ +proto.cln.TxprepareRequest.prototype.setUtxosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cln.Outpoint=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.Outpoint} + */ +proto.cln.TxprepareRequest.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cln.Outpoint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.TxprepareRequest} returns this + */ +proto.cln.TxprepareRequest.prototype.clearUtxosList = function() { + return this.setUtxosList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.TxprepareResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TxprepareResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TxprepareResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxprepareResponse.toObject = function(includeInstance, msg) { + var f, obj = { + psbt: jspb.Message.getFieldWithDefault(msg, 1, ""), + unsignedTx: msg.getUnsignedTx_asB64(), + txid: msg.getTxid_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.cln.TxprepareResponse} + */ +proto.cln.TxprepareResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TxprepareResponse; + return proto.cln.TxprepareResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TxprepareResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TxprepareResponse} + */ +proto.cln.TxprepareResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setUnsignedTx(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TxprepareResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TxprepareResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TxprepareResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxprepareResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUnsignedTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string psbt = 1; + * @return {string} + */ +proto.cln.TxprepareResponse.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.TxprepareResponse} returns this + */ +proto.cln.TxprepareResponse.prototype.setPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes unsigned_tx = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxprepareResponse.prototype.getUnsignedTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes unsigned_tx = 2; + * This is a type-conversion wrapper around `getUnsignedTx()` + * @return {string} + */ +proto.cln.TxprepareResponse.prototype.getUnsignedTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getUnsignedTx())); +}; + + +/** + * optional bytes unsigned_tx = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getUnsignedTx()` + * @return {!Uint8Array} + */ +proto.cln.TxprepareResponse.prototype.getUnsignedTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getUnsignedTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxprepareResponse} returns this + */ +proto.cln.TxprepareResponse.prototype.setUnsignedTx = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes txid = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxprepareResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes txid = 3; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.TxprepareResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.TxprepareResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxprepareResponse} returns this + */ +proto.cln.TxprepareResponse.prototype.setTxid = 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.cln.TxsendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TxsendRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TxsendRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxsendRequest.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_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.cln.TxsendRequest} + */ +proto.cln.TxsendRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TxsendRequest; + return proto.cln.TxsendRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TxsendRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TxsendRequest} + */ +proto.cln.TxsendRequest.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.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TxsendRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TxsendRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TxsendRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxsendRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxsendRequest.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.TxsendRequest.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.TxsendRequest.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxsendRequest} returns this + */ +proto.cln.TxsendRequest.prototype.setTxid = 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.cln.TxsendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TxsendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TxsendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxsendResponse.toObject = function(includeInstance, msg) { + var f, obj = { + psbt: jspb.Message.getFieldWithDefault(msg, 1, ""), + tx: msg.getTx_asB64(), + txid: msg.getTxid_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.cln.TxsendResponse} + */ +proto.cln.TxsendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TxsendResponse; + return proto.cln.TxsendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TxsendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TxsendResponse} + */ +proto.cln.TxsendResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPsbt(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TxsendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TxsendResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TxsendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TxsendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPsbt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string psbt = 1; + * @return {string} + */ +proto.cln.TxsendResponse.prototype.getPsbt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.TxsendResponse} returns this + */ +proto.cln.TxsendResponse.prototype.setPsbt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes tx = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxsendResponse.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes tx = 2; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.cln.TxsendResponse.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 2; + * 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.cln.TxsendResponse.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxsendResponse} returns this + */ +proto.cln.TxsendResponse.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes txid = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.TxsendResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes txid = 3; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.TxsendResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.TxsendResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TxsendResponse} returns this + */ +proto.cln.TxsendResponse.prototype.setTxid = 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.cln.ListpeerchannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_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.cln.ListpeerchannelsRequest} + */ +proto.cln.ListpeerchannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsRequest; + return proto.cln.ListpeerchannelsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsRequest} + */ +proto.cln.ListpeerchannelsRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.ListpeerchannelsRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsRequest} returns this + */ +proto.cln.ListpeerchannelsRequest.prototype.setId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsRequest} returns this + */ +proto.cln.ListpeerchannelsRequest.prototype.clearId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsRequest.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListpeerchannelsResponse.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.cln.ListpeerchannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.cln.ListpeerchannelsChannels.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.cln.ListpeerchannelsResponse} + */ +proto.cln.ListpeerchannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsResponse; + return proto.cln.ListpeerchannelsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsResponse} + */ +proto.cln.ListpeerchannelsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListpeerchannelsChannels; + reader.readMessage(value,proto.cln.ListpeerchannelsChannels.deserializeBinaryFromReader); + msg.addChannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListpeerchannelsChannels.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListpeerchannelsChannels channels = 1; + * @return {!Array} + */ +proto.cln.ListpeerchannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeerchannelsChannels, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeerchannelsResponse} returns this +*/ +proto.cln.ListpeerchannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListpeerchannelsChannels=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeerchannelsChannels} + */ +proto.cln.ListpeerchannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListpeerchannelsChannels, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeerchannelsResponse} returns this + */ +proto.cln.ListpeerchannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListpeerchannelsChannels.repeatedFields_ = [16,43,52]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeerchannelsChannels.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsChannels.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsChannels} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannels.toObject = function(includeInstance, msg) { + var f, obj = { + peerId: msg.getPeerId_asB64(), + peerConnected: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + state: jspb.Message.getFieldWithDefault(msg, 3, 0), + scratchTxid: msg.getScratchTxid_asB64(), + feerate: (f = msg.getFeerate()) && proto.cln.ListpeerchannelsChannelsFeerate.toObject(includeInstance, f), + owner: jspb.Message.getFieldWithDefault(msg, 7, ""), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 8, ""), + channelId: msg.getChannelId_asB64(), + fundingTxid: msg.getFundingTxid_asB64(), + fundingOutnum: jspb.Message.getFieldWithDefault(msg, 11, 0), + initialFeerate: jspb.Message.getFieldWithDefault(msg, 12, ""), + lastFeerate: jspb.Message.getFieldWithDefault(msg, 13, ""), + nextFeerate: jspb.Message.getFieldWithDefault(msg, 14, ""), + nextFeeStep: jspb.Message.getFieldWithDefault(msg, 15, 0), + inflightList: jspb.Message.toObjectList(msg.getInflightList(), + proto.cln.ListpeerchannelsChannelsInflight.toObject, includeInstance), + closeTo: msg.getCloseTo_asB64(), + pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + opener: jspb.Message.getFieldWithDefault(msg, 19, 0), + closer: jspb.Message.getFieldWithDefault(msg, 20, 0), + funding: (f = msg.getFunding()) && proto.cln.ListpeerchannelsChannelsFunding.toObject(includeInstance, f), + toUsMsat: (f = msg.getToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minToUsMsat: (f = msg.getMinToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maxToUsMsat: (f = msg.getMaxToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + totalMsat: (f = msg.getTotalMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeBaseMsat: (f = msg.getFeeBaseMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 28, 0), + dustLimitMsat: (f = msg.getDustLimitMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maxTotalHtlcInMsat: (f = msg.getMaxTotalHtlcInMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + theirReserveMsat: (f = msg.getTheirReserveMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + ourReserveMsat: (f = msg.getOurReserveMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + spendableMsat: (f = msg.getSpendableMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + receivableMsat: (f = msg.getReceivableMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minimumHtlcInMsat: (f = msg.getMinimumHtlcInMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minimumHtlcOutMsat: (f = msg.getMinimumHtlcOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maximumHtlcOutMsat: (f = msg.getMaximumHtlcOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + theirToSelfDelay: jspb.Message.getFieldWithDefault(msg, 38, 0), + ourToSelfDelay: jspb.Message.getFieldWithDefault(msg, 39, 0), + maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 40, 0), + alias: (f = msg.getAlias()) && proto.cln.ListpeerchannelsChannelsAlias.toObject(includeInstance, f), + statusList: (f = jspb.Message.getRepeatedField(msg, 43)) == null ? undefined : f, + inPaymentsOffered: jspb.Message.getFieldWithDefault(msg, 44, 0), + inOfferedMsat: (f = msg.getInOfferedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + inPaymentsFulfilled: jspb.Message.getFieldWithDefault(msg, 46, 0), + inFulfilledMsat: (f = msg.getInFulfilledMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + outPaymentsOffered: jspb.Message.getFieldWithDefault(msg, 48, 0), + outOfferedMsat: (f = msg.getOutOfferedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + outPaymentsFulfilled: jspb.Message.getFieldWithDefault(msg, 50, 0), + outFulfilledMsat: (f = msg.getOutFulfilledMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + proto.cln.ListpeerchannelsChannelsHtlcs.toObject, includeInstance), + closeToAddr: jspb.Message.getFieldWithDefault(msg, 53, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListpeerchannelsChannels} + */ +proto.cln.ListpeerchannelsChannels.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsChannels; + return proto.cln.ListpeerchannelsChannels.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsChannels} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsChannels} + */ +proto.cln.ListpeerchannelsChannels.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.setPeerId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPeerConnected(value); + break; + case 3: + var value = /** @type {!proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState} */ (reader.readEnum()); + msg.setState(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScratchTxid(value); + break; + case 6: + var value = new proto.cln.ListpeerchannelsChannelsFeerate; + reader.readMessage(value,proto.cln.ListpeerchannelsChannelsFeerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannelId(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundingTxid(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFundingOutnum(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setInitialFeerate(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setLastFeerate(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setNextFeerate(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNextFeeStep(value); + break; + case 16: + var value = new proto.cln.ListpeerchannelsChannelsInflight; + reader.readMessage(value,proto.cln.ListpeerchannelsChannelsInflight.deserializeBinaryFromReader); + msg.addInflight(value); + break; + case 17: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCloseTo(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 19: + var value = /** @type {!proto.cln.ChannelSide} */ (reader.readEnum()); + msg.setOpener(value); + break; + case 20: + var value = /** @type {!proto.cln.ChannelSide} */ (reader.readEnum()); + msg.setCloser(value); + break; + case 22: + var value = new proto.cln.ListpeerchannelsChannelsFunding; + reader.readMessage(value,proto.cln.ListpeerchannelsChannelsFunding.deserializeBinaryFromReader); + msg.setFunding(value); + break; + case 23: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setToUsMsat(value); + break; + case 24: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinToUsMsat(value); + break; + case 25: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaxToUsMsat(value); + break; + case 26: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTotalMsat(value); + break; + case 27: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeeBaseMsat(value); + break; + case 28: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeProportionalMillionths(value); + break; + case 29: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setDustLimitMsat(value); + break; + case 30: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaxTotalHtlcInMsat(value); + break; + case 31: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTheirReserveMsat(value); + break; + case 32: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOurReserveMsat(value); + break; + case 33: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setSpendableMsat(value); + break; + case 34: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setReceivableMsat(value); + break; + case 35: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinimumHtlcInMsat(value); + break; + case 36: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinimumHtlcOutMsat(value); + break; + case 37: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaximumHtlcOutMsat(value); + break; + case 38: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTheirToSelfDelay(value); + break; + case 39: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOurToSelfDelay(value); + break; + case 40: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptedHtlcs(value); + break; + case 41: + var value = new proto.cln.ListpeerchannelsChannelsAlias; + reader.readMessage(value,proto.cln.ListpeerchannelsChannelsAlias.deserializeBinaryFromReader); + msg.setAlias(value); + break; + case 43: + var value = /** @type {string} */ (reader.readString()); + msg.addStatus(value); + break; + case 44: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInPaymentsOffered(value); + break; + case 45: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInOfferedMsat(value); + break; + case 46: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInPaymentsFulfilled(value); + break; + case 47: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInFulfilledMsat(value); + break; + case 48: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutPaymentsOffered(value); + break; + case 49: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOutOfferedMsat(value); + break; + case 50: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutPaymentsFulfilled(value); + break; + case 51: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOutFulfilledMsat(value); + break; + case 52: + var value = new proto.cln.ListpeerchannelsChannelsHtlcs; + reader.readMessage(value,proto.cln.ListpeerchannelsChannelsHtlcs.deserializeBinaryFromReader); + msg.addHtlcs(value); + break; + case 53: + var value = /** @type {string} */ (reader.readString()); + msg.setCloseToAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsChannels.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsChannels} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannels.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 {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {!proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBytes( + 4, + f + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.cln.ListpeerchannelsChannelsFeerate.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBytes( + 9, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBytes( + 10, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint32( + 11, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeString( + 13, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeString( + 14, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeUint32( + 15, + f + ); + } + f = message.getInflightList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.cln.ListpeerchannelsChannelsInflight.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBytes( + 17, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); + if (f != null) { + writer.writeBool( + 18, + f + ); + } + f = /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getField(message, 19)); + if (f != null) { + writer.writeEnum( + 19, + f + ); + } + f = /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeEnum( + 20, + f + ); + } + f = message.getFunding(); + if (f != null) { + writer.writeMessage( + 22, + f, + proto.cln.ListpeerchannelsChannelsFunding.serializeBinaryToWriter + ); + } + f = message.getToUsMsat(); + if (f != null) { + writer.writeMessage( + 23, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinToUsMsat(); + if (f != null) { + writer.writeMessage( + 24, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaxToUsMsat(); + if (f != null) { + writer.writeMessage( + 25, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getTotalMsat(); + if (f != null) { + writer.writeMessage( + 26, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeeBaseMsat(); + if (f != null) { + writer.writeMessage( + 27, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 28)); + if (f != null) { + writer.writeUint32( + 28, + f + ); + } + f = message.getDustLimitMsat(); + if (f != null) { + writer.writeMessage( + 29, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaxTotalHtlcInMsat(); + if (f != null) { + writer.writeMessage( + 30, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getTheirReserveMsat(); + if (f != null) { + writer.writeMessage( + 31, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getOurReserveMsat(); + if (f != null) { + writer.writeMessage( + 32, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getSpendableMsat(); + if (f != null) { + writer.writeMessage( + 33, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getReceivableMsat(); + if (f != null) { + writer.writeMessage( + 34, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinimumHtlcInMsat(); + if (f != null) { + writer.writeMessage( + 35, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinimumHtlcOutMsat(); + if (f != null) { + writer.writeMessage( + 36, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaximumHtlcOutMsat(); + if (f != null) { + writer.writeMessage( + 37, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 38)); + if (f != null) { + writer.writeUint32( + 38, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 39)); + if (f != null) { + writer.writeUint32( + 39, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 40)); + if (f != null) { + writer.writeUint32( + 40, + f + ); + } + f = message.getAlias(); + if (f != null) { + writer.writeMessage( + 41, + f, + proto.cln.ListpeerchannelsChannelsAlias.serializeBinaryToWriter + ); + } + f = message.getStatusList(); + if (f.length > 0) { + writer.writeRepeatedString( + 43, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 44)); + if (f != null) { + writer.writeUint64( + 44, + f + ); + } + f = message.getInOfferedMsat(); + if (f != null) { + writer.writeMessage( + 45, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 46)); + if (f != null) { + writer.writeUint64( + 46, + f + ); + } + f = message.getInFulfilledMsat(); + if (f != null) { + writer.writeMessage( + 47, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 48)); + if (f != null) { + writer.writeUint64( + 48, + f + ); + } + f = message.getOutOfferedMsat(); + if (f != null) { + writer.writeMessage( + 49, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 50)); + if (f != null) { + writer.writeUint64( + 50, + f + ); + } + f = message.getOutFulfilledMsat(); + if (f != null) { + writer.writeMessage( + 51, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 52, + f, + proto.cln.ListpeerchannelsChannelsHtlcs.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 53)); + if (f != null) { + writer.writeString( + 53, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState = { + OPENINGD: 0, + CHANNELD_AWAITING_LOCKIN: 1, + CHANNELD_NORMAL: 2, + CHANNELD_SHUTTING_DOWN: 3, + CLOSINGD_SIGEXCHANGE: 4, + CLOSINGD_COMPLETE: 5, + AWAITING_UNILATERAL: 6, + FUNDING_SPEND_SEEN: 7, + ONCHAIN: 8, + DUALOPEND_OPEN_INIT: 9, + DUALOPEND_AWAITING_LOCKIN: 10 +}; + +/** + * optional bytes peer_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannels.prototype.getPeerId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes peer_id = 1; + * This is a type-conversion wrapper around `getPeerId()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getPeerId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeerId())); +}; + + +/** + * optional bytes peer_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPeerId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getPeerId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeerId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setPeerId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearPeerId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasPeerId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool peer_connected = 2; + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.getPeerConnected = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setPeerConnected = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearPeerConnected = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasPeerConnected = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ListpeerchannelsChannelsState state = 3; + * @return {!proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState} + */ +proto.cln.ListpeerchannelsChannels.prototype.getState = function() { + return /** @type {!proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.ListpeerchannelsChannels.ListpeerchannelsChannelsState} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setState = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearState = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes scratch_txid = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannels.prototype.getScratchTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes scratch_txid = 4; + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getScratchTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScratchTxid())); +}; + + +/** + * optional bytes scratch_txid = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getScratchTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScratchTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setScratchTxid = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearScratchTxid = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasScratchTxid = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ListpeerchannelsChannelsFeerate feerate = 6; + * @return {?proto.cln.ListpeerchannelsChannelsFeerate} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFeerate = function() { + return /** @type{?proto.cln.ListpeerchannelsChannelsFeerate} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListpeerchannelsChannelsFeerate, 6)); +}; + + +/** + * @param {?proto.cln.ListpeerchannelsChannelsFeerate|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setOwner = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOwner = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOwner = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string short_channel_id = 8; + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setShortChannelId = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearShortChannelId = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasShortChannelId = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bytes channel_id = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannels.prototype.getChannelId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes channel_id = 9; + * This is a type-conversion wrapper around `getChannelId()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getChannelId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannelId())); +}; + + +/** + * optional bytes channel_id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannelId()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getChannelId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannelId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setChannelId = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearChannelId = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasChannelId = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional bytes funding_txid = 10; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFundingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes funding_txid = 10; + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFundingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxid())); +}; + + +/** + * optional bytes funding_txid = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFundingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setFundingTxid = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearFundingTxid = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasFundingTxid = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional uint32 funding_outnum = 11; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFundingOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setFundingOutnum = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearFundingOutnum = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasFundingOutnum = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string initial_feerate = 12; + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getInitialFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setInitialFeerate = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearInitialFeerate = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasInitialFeerate = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional string last_feerate = 13; + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getLastFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setLastFeerate = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearLastFeerate = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasLastFeerate = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional string next_feerate = 14; + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getNextFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setNextFeerate = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearNextFeerate = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasNextFeerate = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional uint32 next_fee_step = 15; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getNextFeeStep = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setNextFeeStep = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearNextFeeStep = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasNextFeeStep = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * repeated ListpeerchannelsChannelsInflight inflight = 16; + * @return {!Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getInflightList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeerchannelsChannelsInflight, 16)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setInflightList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 16, value); +}; + + +/** + * @param {!proto.cln.ListpeerchannelsChannelsInflight=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeerchannelsChannelsInflight} + */ +proto.cln.ListpeerchannelsChannels.prototype.addInflight = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.cln.ListpeerchannelsChannelsInflight, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearInflightList = function() { + return this.setInflightList([]); +}; + + +/** + * optional bytes close_to = 17; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannels.prototype.getCloseTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * optional bytes close_to = 17; + * This is a type-conversion wrapper around `getCloseTo()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getCloseTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCloseTo())); +}; + + +/** + * optional bytes close_to = 17; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCloseTo()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getCloseTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCloseTo())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setCloseTo = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearCloseTo = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasCloseTo = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional bool private = 18; + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setPrivate = function(value) { + return jspb.Message.setField(this, 18, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearPrivate = function() { + return jspb.Message.setField(this, 18, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasPrivate = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional ChannelSide opener = 19; + * @return {!proto.cln.ChannelSide} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOpener = function() { + return /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {!proto.cln.ChannelSide} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setOpener = function(value) { + return jspb.Message.setField(this, 19, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOpener = function() { + return jspb.Message.setField(this, 19, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOpener = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional ChannelSide closer = 20; + * @return {!proto.cln.ChannelSide} + */ +proto.cln.ListpeerchannelsChannels.prototype.getCloser = function() { + return /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {!proto.cln.ChannelSide} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setCloser = function(value) { + return jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearCloser = function() { + return jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasCloser = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional ListpeerchannelsChannelsFunding funding = 22; + * @return {?proto.cln.ListpeerchannelsChannelsFunding} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFunding = function() { + return /** @type{?proto.cln.ListpeerchannelsChannelsFunding} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListpeerchannelsChannelsFunding, 22)); +}; + + +/** + * @param {?proto.cln.ListpeerchannelsChannelsFunding|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setFunding = function(value) { + return jspb.Message.setWrapperField(this, 22, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearFunding = function() { + return this.setFunding(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasFunding = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional Amount to_us_msat = 23; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 23)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 23, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearToUsMsat = function() { + return this.setToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasToUsMsat = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional Amount min_to_us_msat = 24; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMinToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 24)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setMinToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 24, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMinToUsMsat = function() { + return this.setMinToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMinToUsMsat = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional Amount max_to_us_msat = 25; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMaxToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 25)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setMaxToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 25, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMaxToUsMsat = function() { + return this.setMaxToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMaxToUsMsat = function() { + return jspb.Message.getField(this, 25) != null; +}; + + +/** + * optional Amount total_msat = 26; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getTotalMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 26)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setTotalMsat = function(value) { + return jspb.Message.setWrapperField(this, 26, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearTotalMsat = function() { + return this.setTotalMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasTotalMsat = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional Amount fee_base_msat = 27; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFeeBaseMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 27)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setFeeBaseMsat = function(value) { + return jspb.Message.setWrapperField(this, 27, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearFeeBaseMsat = function() { + return this.setFeeBaseMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasFeeBaseMsat = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional uint32 fee_proportional_millionths = 28; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getFeeProportionalMillionths = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 28, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setFeeProportionalMillionths = function(value) { + return jspb.Message.setField(this, 28, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearFeeProportionalMillionths = function() { + return jspb.Message.setField(this, 28, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasFeeProportionalMillionths = function() { + return jspb.Message.getField(this, 28) != null; +}; + + +/** + * optional Amount dust_limit_msat = 29; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getDustLimitMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 29)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setDustLimitMsat = function(value) { + return jspb.Message.setWrapperField(this, 29, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearDustLimitMsat = function() { + return this.setDustLimitMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasDustLimitMsat = function() { + return jspb.Message.getField(this, 29) != null; +}; + + +/** + * optional Amount max_total_htlc_in_msat = 30; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMaxTotalHtlcInMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 30)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setMaxTotalHtlcInMsat = function(value) { + return jspb.Message.setWrapperField(this, 30, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMaxTotalHtlcInMsat = function() { + return this.setMaxTotalHtlcInMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMaxTotalHtlcInMsat = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +/** + * optional Amount their_reserve_msat = 31; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getTheirReserveMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 31)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setTheirReserveMsat = function(value) { + return jspb.Message.setWrapperField(this, 31, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearTheirReserveMsat = function() { + return this.setTheirReserveMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasTheirReserveMsat = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional Amount our_reserve_msat = 32; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOurReserveMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 32)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setOurReserveMsat = function(value) { + return jspb.Message.setWrapperField(this, 32, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOurReserveMsat = function() { + return this.setOurReserveMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOurReserveMsat = function() { + return jspb.Message.getField(this, 32) != null; +}; + + +/** + * optional Amount spendable_msat = 33; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getSpendableMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 33)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setSpendableMsat = function(value) { + return jspb.Message.setWrapperField(this, 33, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearSpendableMsat = function() { + return this.setSpendableMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasSpendableMsat = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional Amount receivable_msat = 34; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getReceivableMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 34)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setReceivableMsat = function(value) { + return jspb.Message.setWrapperField(this, 34, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearReceivableMsat = function() { + return this.setReceivableMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasReceivableMsat = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * optional Amount minimum_htlc_in_msat = 35; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMinimumHtlcInMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 35)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setMinimumHtlcInMsat = function(value) { + return jspb.Message.setWrapperField(this, 35, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMinimumHtlcInMsat = function() { + return this.setMinimumHtlcInMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMinimumHtlcInMsat = function() { + return jspb.Message.getField(this, 35) != null; +}; + + +/** + * optional Amount minimum_htlc_out_msat = 36; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMinimumHtlcOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 36)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setMinimumHtlcOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 36, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMinimumHtlcOutMsat = function() { + return this.setMinimumHtlcOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMinimumHtlcOutMsat = function() { + return jspb.Message.getField(this, 36) != null; +}; + + +/** + * optional Amount maximum_htlc_out_msat = 37; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMaximumHtlcOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 37)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setMaximumHtlcOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 37, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMaximumHtlcOutMsat = function() { + return this.setMaximumHtlcOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMaximumHtlcOutMsat = function() { + return jspb.Message.getField(this, 37) != null; +}; + + +/** + * optional uint32 their_to_self_delay = 38; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getTheirToSelfDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 38, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setTheirToSelfDelay = function(value) { + return jspb.Message.setField(this, 38, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearTheirToSelfDelay = function() { + return jspb.Message.setField(this, 38, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasTheirToSelfDelay = function() { + return jspb.Message.getField(this, 38) != null; +}; + + +/** + * optional uint32 our_to_self_delay = 39; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOurToSelfDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 39, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setOurToSelfDelay = function(value) { + return jspb.Message.setField(this, 39, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOurToSelfDelay = function() { + return jspb.Message.setField(this, 39, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOurToSelfDelay = function() { + return jspb.Message.getField(this, 39) != null; +}; + + +/** + * optional uint32 max_accepted_htlcs = 40; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getMaxAcceptedHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 40, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setMaxAcceptedHtlcs = function(value) { + return jspb.Message.setField(this, 40, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearMaxAcceptedHtlcs = function() { + return jspb.Message.setField(this, 40, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasMaxAcceptedHtlcs = function() { + return jspb.Message.getField(this, 40) != null; +}; + + +/** + * optional ListpeerchannelsChannelsAlias alias = 41; + * @return {?proto.cln.ListpeerchannelsChannelsAlias} + */ +proto.cln.ListpeerchannelsChannels.prototype.getAlias = function() { + return /** @type{?proto.cln.ListpeerchannelsChannelsAlias} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListpeerchannelsChannelsAlias, 41)); +}; + + +/** + * @param {?proto.cln.ListpeerchannelsChannelsAlias|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setAlias = function(value) { + return jspb.Message.setWrapperField(this, 41, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearAlias = function() { + return this.setAlias(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasAlias = function() { + return jspb.Message.getField(this, 41) != null; +}; + + +/** + * repeated string status = 43; + * @return {!Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getStatusList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 43)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setStatusList = function(value) { + return jspb.Message.setField(this, 43, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.addStatus = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 43, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearStatusList = function() { + return this.setStatusList([]); +}; + + +/** + * optional uint64 in_payments_offered = 44; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getInPaymentsOffered = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 44, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setInPaymentsOffered = function(value) { + return jspb.Message.setField(this, 44, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearInPaymentsOffered = function() { + return jspb.Message.setField(this, 44, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasInPaymentsOffered = function() { + return jspb.Message.getField(this, 44) != null; +}; + + +/** + * optional Amount in_offered_msat = 45; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getInOfferedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 45)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setInOfferedMsat = function(value) { + return jspb.Message.setWrapperField(this, 45, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearInOfferedMsat = function() { + return this.setInOfferedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasInOfferedMsat = function() { + return jspb.Message.getField(this, 45) != null; +}; + + +/** + * optional uint64 in_payments_fulfilled = 46; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getInPaymentsFulfilled = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 46, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setInPaymentsFulfilled = function(value) { + return jspb.Message.setField(this, 46, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearInPaymentsFulfilled = function() { + return jspb.Message.setField(this, 46, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasInPaymentsFulfilled = function() { + return jspb.Message.getField(this, 46) != null; +}; + + +/** + * optional Amount in_fulfilled_msat = 47; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getInFulfilledMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 47)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setInFulfilledMsat = function(value) { + return jspb.Message.setWrapperField(this, 47, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearInFulfilledMsat = function() { + return this.setInFulfilledMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasInFulfilledMsat = function() { + return jspb.Message.getField(this, 47) != null; +}; + + +/** + * optional uint64 out_payments_offered = 48; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOutPaymentsOffered = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 48, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setOutPaymentsOffered = function(value) { + return jspb.Message.setField(this, 48, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOutPaymentsOffered = function() { + return jspb.Message.setField(this, 48, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOutPaymentsOffered = function() { + return jspb.Message.getField(this, 48) != null; +}; + + +/** + * optional Amount out_offered_msat = 49; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOutOfferedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 49)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setOutOfferedMsat = function(value) { + return jspb.Message.setWrapperField(this, 49, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOutOfferedMsat = function() { + return this.setOutOfferedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOutOfferedMsat = function() { + return jspb.Message.getField(this, 49) != null; +}; + + +/** + * optional uint64 out_payments_fulfilled = 50; + * @return {number} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOutPaymentsFulfilled = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 50, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setOutPaymentsFulfilled = function(value) { + return jspb.Message.setField(this, 50, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOutPaymentsFulfilled = function() { + return jspb.Message.setField(this, 50, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOutPaymentsFulfilled = function() { + return jspb.Message.getField(this, 50) != null; +}; + + +/** + * optional Amount out_fulfilled_msat = 51; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannels.prototype.getOutFulfilledMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 51)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setOutFulfilledMsat = function(value) { + return jspb.Message.setWrapperField(this, 51, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearOutFulfilledMsat = function() { + return this.setOutFulfilledMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasOutFulfilledMsat = function() { + return jspb.Message.getField(this, 51) != null; +}; + + +/** + * repeated ListpeerchannelsChannelsHtlcs htlcs = 52; + * @return {!Array} + */ +proto.cln.ListpeerchannelsChannels.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpeerchannelsChannelsHtlcs, 52)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this +*/ +proto.cln.ListpeerchannelsChannels.prototype.setHtlcsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 52, value); +}; + + +/** + * @param {!proto.cln.ListpeerchannelsChannelsHtlcs=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} + */ +proto.cln.ListpeerchannelsChannels.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 52, opt_value, proto.cln.ListpeerchannelsChannelsHtlcs, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearHtlcsList = function() { + return this.setHtlcsList([]); +}; + + +/** + * optional string close_to_addr = 53; + * @return {string} + */ +proto.cln.ListpeerchannelsChannels.prototype.getCloseToAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 53, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.setCloseToAddr = function(value) { + return jspb.Message.setField(this, 53, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannels} returns this + */ +proto.cln.ListpeerchannelsChannels.prototype.clearCloseToAddr = function() { + return jspb.Message.setField(this, 53, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannels.prototype.hasCloseToAddr = function() { + return jspb.Message.getField(this, 53) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsChannelsFeerate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsChannelsFeerate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsFeerate.toObject = function(includeInstance, msg) { + var f, obj = { + perkw: jspb.Message.getFieldWithDefault(msg, 1, 0), + perkb: 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.cln.ListpeerchannelsChannelsFeerate} + */ +proto.cln.ListpeerchannelsChannelsFeerate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsChannelsFeerate; + return proto.cln.ListpeerchannelsChannelsFeerate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsChannelsFeerate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsChannelsFeerate} + */ +proto.cln.ListpeerchannelsChannelsFeerate.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.setPerkw(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPerkb(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsChannelsFeerate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsChannelsFeerate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsFeerate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional uint32 perkw = 1; + * @return {number} + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.getPerkw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannelsFeerate} returns this + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.setPerkw = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFeerate} returns this + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.clearPerkw = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.hasPerkw = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 perkb = 2; + * @return {number} + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.getPerkb = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannelsFeerate} returns this + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.setPerkb = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFeerate} returns this + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.clearPerkb = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFeerate.prototype.hasPerkb = 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.cln.ListpeerchannelsChannelsInflight.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsChannelsInflight.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsChannelsInflight} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsInflight.toObject = function(includeInstance, msg) { + var f, obj = { + fundingTxid: msg.getFundingTxid_asB64(), + fundingOutnum: jspb.Message.getFieldWithDefault(msg, 2, 0), + feerate: jspb.Message.getFieldWithDefault(msg, 3, ""), + totalFundingMsat: (f = msg.getTotalFundingMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + ourFundingMsat: (f = msg.getOurFundingMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + scratchTxid: msg.getScratchTxid_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.cln.ListpeerchannelsChannelsInflight} + */ +proto.cln.ListpeerchannelsChannelsInflight.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsChannelsInflight; + return proto.cln.ListpeerchannelsChannelsInflight.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsChannelsInflight} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} + */ +proto.cln.ListpeerchannelsChannelsInflight.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.setFundingTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFundingOutnum(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFeerate(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTotalFundingMsat(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOurFundingMsat(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setScratchTxid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsChannelsInflight.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsChannelsInflight} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsInflight.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 {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getTotalFundingMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getOurFundingMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } +}; + + +/** + * optional bytes funding_txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getFundingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes funding_txid = 1; + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getFundingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxid())); +}; + + +/** + * optional bytes funding_txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getFundingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.setFundingTxid = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.clearFundingTxid = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.hasFundingTxid = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 funding_outnum = 2; + * @return {number} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getFundingOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.setFundingOutnum = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.clearFundingOutnum = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.hasFundingOutnum = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string feerate = 3; + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getFeerate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.setFeerate = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.clearFeerate = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount total_funding_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getTotalFundingMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this +*/ +proto.cln.ListpeerchannelsChannelsInflight.prototype.setTotalFundingMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.clearTotalFundingMsat = function() { + return this.setTotalFundingMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.hasTotalFundingMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Amount our_funding_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getOurFundingMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this +*/ +proto.cln.ListpeerchannelsChannelsInflight.prototype.setOurFundingMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.clearOurFundingMsat = function() { + return this.setOurFundingMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.hasOurFundingMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes scratch_txid = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getScratchTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes scratch_txid = 6; + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getScratchTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getScratchTxid())); +}; + + +/** + * optional bytes scratch_txid = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getScratchTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.getScratchTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getScratchTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.setScratchTxid = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsInflight} returns this + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.clearScratchTxid = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsInflight.prototype.hasScratchTxid = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsChannelsFunding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsChannelsFunding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsFunding.toObject = function(includeInstance, msg) { + var f, obj = { + pushedMsat: (f = msg.getPushedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + localFundsMsat: (f = msg.getLocalFundsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + remoteFundsMsat: (f = msg.getRemoteFundsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feePaidMsat: (f = msg.getFeePaidMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeRcvdMsat: (f = msg.getFeeRcvdMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} + */ +proto.cln.ListpeerchannelsChannelsFunding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsChannelsFunding; + return proto.cln.ListpeerchannelsChannelsFunding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsChannelsFunding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} + */ +proto.cln.ListpeerchannelsChannelsFunding.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setPushedMsat(value); + break; + case 2: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setLocalFundsMsat(value); + break; + case 3: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setRemoteFundsMsat(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeePaidMsat(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeeRcvdMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsChannelsFunding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsChannelsFunding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsFunding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPushedMsat(); + if (f != null) { + writer.writeMessage( + 1, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getLocalFundsMsat(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getRemoteFundsMsat(); + if (f != null) { + writer.writeMessage( + 3, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeePaidMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeeRcvdMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Amount pushed_msat = 1; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.getPushedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 1)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this +*/ +proto.cln.ListpeerchannelsChannelsFunding.prototype.setPushedMsat = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.clearPushedMsat = function() { + return this.setPushedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.hasPushedMsat = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Amount local_funds_msat = 2; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.getLocalFundsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 2)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this +*/ +proto.cln.ListpeerchannelsChannelsFunding.prototype.setLocalFundsMsat = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.clearLocalFundsMsat = function() { + return this.setLocalFundsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.hasLocalFundsMsat = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Amount remote_funds_msat = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.getRemoteFundsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this +*/ +proto.cln.ListpeerchannelsChannelsFunding.prototype.setRemoteFundsMsat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.clearRemoteFundsMsat = function() { + return this.setRemoteFundsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.hasRemoteFundsMsat = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount fee_paid_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.getFeePaidMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this +*/ +proto.cln.ListpeerchannelsChannelsFunding.prototype.setFeePaidMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.clearFeePaidMsat = function() { + return this.setFeePaidMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.hasFeePaidMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Amount fee_rcvd_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.getFeeRcvdMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this +*/ +proto.cln.ListpeerchannelsChannelsFunding.prototype.setFeeRcvdMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsFunding} returns this + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.clearFeeRcvdMsat = function() { + return this.setFeeRcvdMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsFunding.prototype.hasFeeRcvdMsat = 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.cln.ListpeerchannelsChannelsAlias.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsChannelsAlias.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsChannelsAlias} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsAlias.toObject = function(includeInstance, msg) { + var f, obj = { + local: jspb.Message.getFieldWithDefault(msg, 1, ""), + remote: 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.cln.ListpeerchannelsChannelsAlias} + */ +proto.cln.ListpeerchannelsChannelsAlias.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsChannelsAlias; + return proto.cln.ListpeerchannelsChannelsAlias.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsChannelsAlias} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsChannelsAlias} + */ +proto.cln.ListpeerchannelsChannelsAlias.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocal(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRemote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsChannelsAlias.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsChannelsAlias} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsAlias.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string local = 1; + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.getLocal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannelsAlias} returns this + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.setLocal = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsAlias} returns this + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.clearLocal = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.hasLocal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string remote = 2; + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.getRemote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannelsAlias} returns this + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.setRemote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsAlias} returns this + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.clearRemote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsAlias.prototype.hasRemote = 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.cln.ListpeerchannelsChannelsHtlcs.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpeerchannelsChannelsHtlcs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpeerchannelsChannelsHtlcs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsHtlcs.toObject = function(includeInstance, msg) { + var f, obj = { + direction: jspb.Message.getFieldWithDefault(msg, 1, 0), + id: jspb.Message.getFieldWithDefault(msg, 2, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + expiry: jspb.Message.getFieldWithDefault(msg, 4, 0), + paymentHash: msg.getPaymentHash_asB64(), + localTrimmed: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + status: jspb.Message.getFieldWithDefault(msg, 7, ""), + 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.cln.ListpeerchannelsChannelsHtlcs} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpeerchannelsChannelsHtlcs; + return proto.cln.ListpeerchannelsChannelsHtlcs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpeerchannelsChannelsHtlcs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection} */ (reader.readEnum()); + msg.setDirection(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setId(value); + break; + case 3: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpiry(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLocalTrimmed(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); + break; + case 8: + var value = /** @type {!proto.cln.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.cln.ListpeerchannelsChannelsHtlcs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpeerchannelsChannelsHtlcs.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpeerchannelsChannelsHtlcs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpeerchannelsChannelsHtlcs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 3, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {!proto.cln.HtlcState} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeEnum( + 8, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection = { + IN: 0, + OUT: 1 +}; + +/** + * optional ListpeerchannelsChannelsHtlcsDirection direction = 1; + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getDirection = function() { + return /** @type {!proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ListpeerchannelsChannelsHtlcs.ListpeerchannelsChannelsHtlcsDirection} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setDirection = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearDirection = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasDirection = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 id = 2; + * @return {number} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setId = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Amount amount_msat = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this +*/ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 expiry = 4; + * @return {number} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setExpiry = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearExpiry = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasExpiry = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes payment_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes payment_hash = 5; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setPaymentHash = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearPaymentHash = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasPaymentHash = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool local_trimmed = 6; + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getLocalTrimmed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setLocalTrimmed = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearLocalTrimmed = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasLocalTrimmed = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string status = 7; + * @return {string} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setStatus = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearStatus = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasStatus = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional HtlcState state = 8; + * @return {!proto.cln.HtlcState} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.getState = function() { + return /** @type {!proto.cln.HtlcState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {!proto.cln.HtlcState} value + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.setState = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpeerchannelsChannelsHtlcs} returns this + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.clearState = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpeerchannelsChannelsHtlcs.prototype.hasState = 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.cln.ListclosedchannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListclosedchannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListclosedchannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_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.cln.ListclosedchannelsRequest} + */ +proto.cln.ListclosedchannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListclosedchannelsRequest; + return proto.cln.ListclosedchannelsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListclosedchannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListclosedchannelsRequest} + */ +proto.cln.ListclosedchannelsRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListclosedchannelsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListclosedchannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListclosedchannelsRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.ListclosedchannelsRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListclosedchannelsRequest} returns this + */ +proto.cln.ListclosedchannelsRequest.prototype.setId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsRequest} returns this + */ +proto.cln.ListclosedchannelsRequest.prototype.clearId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsRequest.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListclosedchannelsResponse.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.cln.ListclosedchannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListclosedchannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListclosedchannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + closedchannelsList: jspb.Message.toObjectList(msg.getClosedchannelsList(), + proto.cln.ListclosedchannelsClosedchannels.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.cln.ListclosedchannelsResponse} + */ +proto.cln.ListclosedchannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListclosedchannelsResponse; + return proto.cln.ListclosedchannelsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListclosedchannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListclosedchannelsResponse} + */ +proto.cln.ListclosedchannelsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListclosedchannelsClosedchannels; + reader.readMessage(value,proto.cln.ListclosedchannelsClosedchannels.deserializeBinaryFromReader); + msg.addClosedchannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListclosedchannelsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListclosedchannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClosedchannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListclosedchannelsClosedchannels.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListclosedchannelsClosedchannels closedchannels = 1; + * @return {!Array} + */ +proto.cln.ListclosedchannelsResponse.prototype.getClosedchannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListclosedchannelsClosedchannels, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListclosedchannelsResponse} returns this +*/ +proto.cln.ListclosedchannelsResponse.prototype.setClosedchannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListclosedchannelsClosedchannels=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListclosedchannelsClosedchannels} + */ +proto.cln.ListclosedchannelsResponse.prototype.addClosedchannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListclosedchannelsClosedchannels, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListclosedchannelsResponse} returns this + */ +proto.cln.ListclosedchannelsResponse.prototype.clearClosedchannelsList = function() { + return this.setClosedchannelsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListclosedchannelsClosedchannels.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListclosedchannelsClosedchannels} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsClosedchannels.toObject = function(includeInstance, msg) { + var f, obj = { + peerId: msg.getPeerId_asB64(), + channelId: msg.getChannelId_asB64(), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + alias: (f = msg.getAlias()) && proto.cln.ListclosedchannelsClosedchannelsAlias.toObject(includeInstance, f), + opener: jspb.Message.getFieldWithDefault(msg, 5, 0), + closer: jspb.Message.getFieldWithDefault(msg, 6, 0), + pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + totalLocalCommitments: jspb.Message.getFieldWithDefault(msg, 9, 0), + totalRemoteCommitments: jspb.Message.getFieldWithDefault(msg, 10, 0), + totalHtlcsSent: jspb.Message.getFieldWithDefault(msg, 11, 0), + fundingTxid: msg.getFundingTxid_asB64(), + fundingOutnum: jspb.Message.getFieldWithDefault(msg, 13, 0), + leased: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + fundingFeePaidMsat: (f = msg.getFundingFeePaidMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + fundingFeeRcvdMsat: (f = msg.getFundingFeeRcvdMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + fundingPushedMsat: (f = msg.getFundingPushedMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + totalMsat: (f = msg.getTotalMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + finalToUsMsat: (f = msg.getFinalToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + minToUsMsat: (f = msg.getMinToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + maxToUsMsat: (f = msg.getMaxToUsMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + lastCommitmentTxid: msg.getLastCommitmentTxid_asB64(), + lastCommitmentFeeMsat: (f = msg.getLastCommitmentFeeMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + closeCause: jspb.Message.getFieldWithDefault(msg, 24, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListclosedchannelsClosedchannels} + */ +proto.cln.ListclosedchannelsClosedchannels.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListclosedchannelsClosedchannels; + return proto.cln.ListclosedchannelsClosedchannels.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListclosedchannelsClosedchannels} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListclosedchannelsClosedchannels} + */ +proto.cln.ListclosedchannelsClosedchannels.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.setPeerId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 4: + var value = new proto.cln.ListclosedchannelsClosedchannelsAlias; + reader.readMessage(value,proto.cln.ListclosedchannelsClosedchannelsAlias.deserializeBinaryFromReader); + msg.setAlias(value); + break; + case 5: + var value = /** @type {!proto.cln.ChannelSide} */ (reader.readEnum()); + msg.setOpener(value); + break; + case 6: + var value = /** @type {!proto.cln.ChannelSide} */ (reader.readEnum()); + msg.setCloser(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPrivate(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalLocalCommitments(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalRemoteCommitments(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalHtlcsSent(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFundingTxid(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFundingOutnum(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLeased(value); + break; + case 15: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFundingFeePaidMsat(value); + break; + case 16: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFundingFeeRcvdMsat(value); + break; + case 17: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFundingPushedMsat(value); + break; + case 18: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setTotalMsat(value); + break; + case 19: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFinalToUsMsat(value); + break; + case 20: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinToUsMsat(value); + break; + case 21: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaxToUsMsat(value); + break; + case 22: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastCommitmentTxid(value); + break; + case 23: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setLastCommitmentFeeMsat(value); + break; + case 24: + var value = /** @type {!proto.cln.ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause} */ (reader.readEnum()); + msg.setCloseCause(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListclosedchannelsClosedchannels.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListclosedchannelsClosedchannels} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsClosedchannels.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChannelId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getAlias(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cln.ListclosedchannelsClosedchannelsAlias.serializeBinaryToWriter + ); + } + f = message.getOpener(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeEnum( + 6, + f + ); + } + f = message.getPrivate(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getTotalLocalCommitments(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getTotalRemoteCommitments(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getTotalHtlcsSent(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } + f = message.getFundingTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } + f = message.getFundingOutnum(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } + f = message.getLeased(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getFundingFeePaidMsat(); + if (f != null) { + writer.writeMessage( + 15, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFundingFeeRcvdMsat(); + if (f != null) { + writer.writeMessage( + 16, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFundingPushedMsat(); + if (f != null) { + writer.writeMessage( + 17, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getTotalMsat(); + if (f != null) { + writer.writeMessage( + 18, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFinalToUsMsat(); + if (f != null) { + writer.writeMessage( + 19, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMinToUsMsat(); + if (f != null) { + writer.writeMessage( + 20, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getMaxToUsMsat(); + if (f != null) { + writer.writeMessage( + 21, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 22)); + if (f != null) { + writer.writeBytes( + 22, + f + ); + } + f = message.getLastCommitmentFeeMsat(); + if (f != null) { + writer.writeMessage( + 23, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getCloseCause(); + if (f !== 0.0) { + writer.writeEnum( + 24, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause = { + UNKNOWN: 0, + LOCAL: 1, + USER: 2, + REMOTE: 3, + PROTOCOL: 4, + ONCHAIN: 5 +}; + +/** + * optional bytes peer_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getPeerId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes peer_id = 1; + * This is a type-conversion wrapper around `getPeerId()` + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getPeerId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeerId())); +}; + + +/** + * optional bytes peer_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPeerId()` + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getPeerId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeerId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setPeerId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearPeerId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasPeerId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes channel_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getChannelId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes channel_id = 2; + * This is a type-conversion wrapper around `getChannelId()` + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getChannelId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannelId())); +}; + + +/** + * optional bytes channel_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannelId()` + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getChannelId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannelId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setChannelId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string short_channel_id = 3; + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setShortChannelId = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearShortChannelId = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasShortChannelId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ListclosedchannelsClosedchannelsAlias alias = 4; + * @return {?proto.cln.ListclosedchannelsClosedchannelsAlias} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getAlias = function() { + return /** @type{?proto.cln.ListclosedchannelsClosedchannelsAlias} */ ( + jspb.Message.getWrapperField(this, proto.cln.ListclosedchannelsClosedchannelsAlias, 4)); +}; + + +/** + * @param {?proto.cln.ListclosedchannelsClosedchannelsAlias|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setAlias = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearAlias = function() { + return this.setAlias(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasAlias = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ChannelSide opener = 5; + * @return {!proto.cln.ChannelSide} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getOpener = function() { + return /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.cln.ChannelSide} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setOpener = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional ChannelSide closer = 6; + * @return {!proto.cln.ChannelSide} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getCloser = function() { + return /** @type {!proto.cln.ChannelSide} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.cln.ChannelSide} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setCloser = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearCloser = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasCloser = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool private = 7; + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getPrivate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setPrivate = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional uint64 total_local_commitments = 9; + * @return {number} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getTotalLocalCommitments = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setTotalLocalCommitments = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional uint64 total_remote_commitments = 10; + * @return {number} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getTotalRemoteCommitments = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setTotalRemoteCommitments = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint64 total_htlcs_sent = 11; + * @return {number} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getTotalHtlcsSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setTotalHtlcsSent = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional bytes funding_txid = 12; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes funding_txid = 12; + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFundingTxid())); +}; + + +/** + * optional bytes funding_txid = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFundingTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFundingTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setFundingTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); +}; + + +/** + * optional uint32 funding_outnum = 13; + * @return {number} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setFundingOutnum = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional bool leased = 14; + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getLeased = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setLeased = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional Amount funding_fee_paid_msat = 15; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingFeePaidMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 15)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setFundingFeePaidMsat = function(value) { + return jspb.Message.setWrapperField(this, 15, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearFundingFeePaidMsat = function() { + return this.setFundingFeePaidMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasFundingFeePaidMsat = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional Amount funding_fee_rcvd_msat = 16; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingFeeRcvdMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 16)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setFundingFeeRcvdMsat = function(value) { + return jspb.Message.setWrapperField(this, 16, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearFundingFeeRcvdMsat = function() { + return this.setFundingFeeRcvdMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasFundingFeeRcvdMsat = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional Amount funding_pushed_msat = 17; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFundingPushedMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 17)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setFundingPushedMsat = function(value) { + return jspb.Message.setWrapperField(this, 17, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearFundingPushedMsat = function() { + return this.setFundingPushedMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasFundingPushedMsat = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional Amount total_msat = 18; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getTotalMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 18)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setTotalMsat = function(value) { + return jspb.Message.setWrapperField(this, 18, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearTotalMsat = function() { + return this.setTotalMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasTotalMsat = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional Amount final_to_us_msat = 19; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getFinalToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 19)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setFinalToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 19, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearFinalToUsMsat = function() { + return this.setFinalToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasFinalToUsMsat = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional Amount min_to_us_msat = 20; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getMinToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 20)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setMinToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 20, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearMinToUsMsat = function() { + return this.setMinToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasMinToUsMsat = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional Amount max_to_us_msat = 21; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getMaxToUsMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 21)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setMaxToUsMsat = function(value) { + return jspb.Message.setWrapperField(this, 21, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearMaxToUsMsat = function() { + return this.setMaxToUsMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasMaxToUsMsat = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional bytes last_commitment_txid = 22; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getLastCommitmentTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 22, "")); +}; + + +/** + * optional bytes last_commitment_txid = 22; + * This is a type-conversion wrapper around `getLastCommitmentTxid()` + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getLastCommitmentTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastCommitmentTxid())); +}; + + +/** + * optional bytes last_commitment_txid = 22; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastCommitmentTxid()` + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getLastCommitmentTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastCommitmentTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setLastCommitmentTxid = function(value) { + return jspb.Message.setField(this, 22, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearLastCommitmentTxid = function() { + return jspb.Message.setField(this, 22, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasLastCommitmentTxid = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional Amount last_commitment_fee_msat = 23; + * @return {?proto.cln.Amount} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getLastCommitmentFeeMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 23)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this +*/ +proto.cln.ListclosedchannelsClosedchannels.prototype.setLastCommitmentFeeMsat = function(value) { + return jspb.Message.setWrapperField(this, 23, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.clearLastCommitmentFeeMsat = function() { + return this.setLastCommitmentFeeMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.hasLastCommitmentFeeMsat = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional ListclosedchannelsClosedchannelsClose_cause close_cause = 24; + * @return {!proto.cln.ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause} + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.getCloseCause = function() { + return /** @type {!proto.cln.ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {!proto.cln.ListclosedchannelsClosedchannels.ListclosedchannelsClosedchannelsClose_cause} value + * @return {!proto.cln.ListclosedchannelsClosedchannels} returns this + */ +proto.cln.ListclosedchannelsClosedchannels.prototype.setCloseCause = function(value) { + return jspb.Message.setProto3EnumField(this, 24, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListclosedchannelsClosedchannelsAlias.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListclosedchannelsClosedchannelsAlias} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.toObject = function(includeInstance, msg) { + var f, obj = { + local: jspb.Message.getFieldWithDefault(msg, 1, ""), + remote: 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.cln.ListclosedchannelsClosedchannelsAlias} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListclosedchannelsClosedchannelsAlias; + return proto.cln.ListclosedchannelsClosedchannelsAlias.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListclosedchannelsClosedchannelsAlias} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListclosedchannelsClosedchannelsAlias} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setLocal(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRemote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListclosedchannelsClosedchannelsAlias.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListclosedchannelsClosedchannelsAlias} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string local = 1; + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.getLocal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListclosedchannelsClosedchannelsAlias} returns this + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.setLocal = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannelsAlias} returns this + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.clearLocal = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.hasLocal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string remote = 2; + * @return {string} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.getRemote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListclosedchannelsClosedchannelsAlias} returns this + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.setRemote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListclosedchannelsClosedchannelsAlias} returns this + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.clearRemote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListclosedchannelsClosedchannelsAlias.prototype.hasRemote = 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.cln.DecodepayRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodepayRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodepayRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayRequest.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: 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.cln.DecodepayRequest} + */ +proto.cln.DecodepayRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodepayRequest; + return proto.cln.DecodepayRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodepayRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodepayRequest} + */ +proto.cln.DecodepayRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(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.cln.DecodepayRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodepayRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodepayRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.cln.DecodepayRequest.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayRequest} returns this + */ +proto.cln.DecodepayRequest.prototype.setBolt11 = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cln.DecodepayRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayRequest} returns this + */ +proto.cln.DecodepayRequest.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayRequest} returns this + */ +proto.cln.DecodepayRequest.prototype.clearDescription = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayRequest.prototype.hasDescription = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DecodepayResponse.repeatedFields_ = [14,16]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.DecodepayResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodepayResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodepayResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayResponse.toObject = function(includeInstance, msg) { + var f, obj = { + currency: jspb.Message.getFieldWithDefault(msg, 1, ""), + createdAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiry: jspb.Message.getFieldWithDefault(msg, 3, 0), + payee: msg.getPayee_asB64(), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + paymentHash: msg.getPaymentHash_asB64(), + signature: jspb.Message.getFieldWithDefault(msg, 7, ""), + description: jspb.Message.getFieldWithDefault(msg, 8, ""), + descriptionHash: msg.getDescriptionHash_asB64(), + minFinalCltvExpiry: jspb.Message.getFieldWithDefault(msg, 10, 0), + paymentSecret: msg.getPaymentSecret_asB64(), + features: msg.getFeatures_asB64(), + paymentMetadata: msg.getPaymentMetadata_asB64(), + fallbacksList: jspb.Message.toObjectList(msg.getFallbacksList(), + proto.cln.DecodepayFallbacks.toObject, includeInstance), + extraList: jspb.Message.toObjectList(msg.getExtraList(), + proto.cln.DecodepayExtra.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.cln.DecodepayResponse} + */ +proto.cln.DecodepayResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodepayResponse; + return proto.cln.DecodepayResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodepayResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodepayResponse} + */ +proto.cln.DecodepayResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCurrency(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiry(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayee(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDescriptionHash(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinFinalCltvExpiry(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentSecret(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFeatures(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentMetadata(value); + break; + case 14: + var value = new proto.cln.DecodepayFallbacks; + reader.readMessage(value,proto.cln.DecodepayFallbacks.deserializeBinaryFromReader); + msg.addFallbacks(value); + break; + case 16: + var value = new proto.cln.DecodepayExtra; + reader.readMessage(value,proto.cln.DecodepayExtra.deserializeBinaryFromReader); + msg.addExtra(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodepayResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodepayResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCurrency(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getExpiry(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPayee_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeBytes( + 9, + f + ); + } + f = message.getMinFinalCltvExpiry(); + if (f !== 0) { + writer.writeUint32( + 10, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeBytes( + 11, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBytes( + 12, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } + f = message.getFallbacksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 14, + f, + proto.cln.DecodepayFallbacks.serializeBinaryToWriter + ); + } + f = message.getExtraList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.cln.DecodepayExtra.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string currency = 1; + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getCurrency = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setCurrency = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 created_at = 2; + * @return {number} + */ +proto.cln.DecodepayResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 expiry = 3; + * @return {number} + */ +proto.cln.DecodepayResponse.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes payee = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayResponse.prototype.getPayee = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes payee = 4; + * This is a type-conversion wrapper around `getPayee()` + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getPayee_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayee())); +}; + + +/** + * optional bytes payee = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayee()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.getPayee_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayee())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setPayee = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional Amount amount_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.DecodepayResponse.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.DecodepayResponse} returns this +*/ +proto.cln.DecodepayResponse.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayResponse.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes payment_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes payment_hash = 6; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional string signature = 7; + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string description = 8; + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearDescription = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayResponse.prototype.hasDescription = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bytes description_hash = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayResponse.prototype.getDescriptionHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes description_hash = 9; + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getDescriptionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDescriptionHash())); +}; + + +/** + * optional bytes description_hash = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.getDescriptionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDescriptionHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setDescriptionHash = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearDescriptionHash = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayResponse.prototype.hasDescriptionHash = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional uint32 min_final_cltv_expiry = 10; + * @return {number} + */ +proto.cln.DecodepayResponse.prototype.getMinFinalCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setMinFinalCltvExpiry = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional bytes payment_secret = 11; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayResponse.prototype.getPaymentSecret = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes payment_secret = 11; + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getPaymentSecret_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentSecret())); +}; + + +/** + * optional bytes payment_secret = 11; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.getPaymentSecret_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentSecret())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setPaymentSecret = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearPaymentSecret = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayResponse.prototype.hasPaymentSecret = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bytes features = 12; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayResponse.prototype.getFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes features = 12; + * This is a type-conversion wrapper around `getFeatures()` + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFeatures())); +}; + + +/** + * optional bytes features = 12; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFeatures()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.getFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setFeatures = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearFeatures = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayResponse.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes payment_metadata = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayResponse.prototype.getPaymentMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes payment_metadata = 13; + * This is a type-conversion wrapper around `getPaymentMetadata()` + * @return {string} + */ +proto.cln.DecodepayResponse.prototype.getPaymentMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentMetadata())); +}; + + +/** + * optional bytes payment_metadata = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentMetadata()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayResponse.prototype.getPaymentMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.setPaymentMetadata = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearPaymentMetadata = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayResponse.prototype.hasPaymentMetadata = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * repeated DecodepayFallbacks fallbacks = 14; + * @return {!Array} + */ +proto.cln.DecodepayResponse.prototype.getFallbacksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodepayFallbacks, 14)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodepayResponse} returns this +*/ +proto.cln.DecodepayResponse.prototype.setFallbacksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 14, value); +}; + + +/** + * @param {!proto.cln.DecodepayFallbacks=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodepayFallbacks} + */ +proto.cln.DecodepayResponse.prototype.addFallbacks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.cln.DecodepayFallbacks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearFallbacksList = function() { + return this.setFallbacksList([]); +}; + + +/** + * repeated DecodepayExtra extra = 16; + * @return {!Array} + */ +proto.cln.DecodepayResponse.prototype.getExtraList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodepayExtra, 16)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodepayResponse} returns this +*/ +proto.cln.DecodepayResponse.prototype.setExtraList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 16, value); +}; + + +/** + * @param {!proto.cln.DecodepayExtra=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodepayExtra} + */ +proto.cln.DecodepayResponse.prototype.addExtra = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.cln.DecodepayExtra, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodepayResponse} returns this + */ +proto.cln.DecodepayResponse.prototype.clearExtraList = function() { + return this.setExtraList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.DecodepayFallbacks.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodepayFallbacks.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodepayFallbacks} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayFallbacks.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + addr: jspb.Message.getFieldWithDefault(msg, 2, ""), + hex: msg.getHex_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.cln.DecodepayFallbacks} + */ +proto.cln.DecodepayFallbacks.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodepayFallbacks; + return proto.cln.DecodepayFallbacks.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodepayFallbacks} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodepayFallbacks} + */ +proto.cln.DecodepayFallbacks.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.DecodepayFallbacks.DecodepayFallbacksType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddr(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodepayFallbacks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodepayFallbacks.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodepayFallbacks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayFallbacks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getHex_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.DecodepayFallbacks.DecodepayFallbacksType = { + P2PKH: 0, + P2SH: 1, + P2WPKH: 2, + P2WSH: 3 +}; + +/** + * optional DecodepayFallbacksType item_type = 1; + * @return {!proto.cln.DecodepayFallbacks.DecodepayFallbacksType} + */ +proto.cln.DecodepayFallbacks.prototype.getItemType = function() { + return /** @type {!proto.cln.DecodepayFallbacks.DecodepayFallbacksType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.DecodepayFallbacks.DecodepayFallbacksType} value + * @return {!proto.cln.DecodepayFallbacks} returns this + */ +proto.cln.DecodepayFallbacks.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string addr = 2; + * @return {string} + */ +proto.cln.DecodepayFallbacks.prototype.getAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayFallbacks} returns this + */ +proto.cln.DecodepayFallbacks.prototype.setAddr = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodepayFallbacks} returns this + */ +proto.cln.DecodepayFallbacks.prototype.clearAddr = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodepayFallbacks.prototype.hasAddr = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes hex = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodepayFallbacks.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes hex = 3; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.DecodepayFallbacks.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.DecodepayFallbacks.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodepayFallbacks} returns this + */ +proto.cln.DecodepayFallbacks.prototype.setHex = 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.cln.DecodepayExtra.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodepayExtra.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodepayExtra} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayExtra.toObject = function(includeInstance, msg) { + var f, obj = { + tag: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: 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.cln.DecodepayExtra} + */ +proto.cln.DecodepayExtra.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodepayExtra; + return proto.cln.DecodepayExtra.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodepayExtra} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodepayExtra} + */ +proto.cln.DecodepayExtra.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTag(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodepayExtra.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodepayExtra.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodepayExtra} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodepayExtra.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTag(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string tag = 1; + * @return {string} + */ +proto.cln.DecodepayExtra.prototype.getTag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayExtra} returns this + */ +proto.cln.DecodepayExtra.prototype.setTag = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data = 2; + * @return {string} + */ +proto.cln.DecodepayExtra.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodepayExtra} returns this + */ +proto.cln.DecodepayExtra.prototype.setData = 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.cln.DecodeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + string: 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.cln.DecodeRequest} + */ +proto.cln.DecodeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeRequest; + return proto.cln.DecodeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeRequest} + */ +proto.cln.DecodeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setString(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getString(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string string = 1; + * @return {string} + */ +proto.cln.DecodeRequest.prototype.getString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeRequest} returns this + */ +proto.cln.DecodeRequest.prototype.setString = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DecodeResponse.repeatedFields_ = [4,16,45,59,69,73]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.DecodeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + itemType: jspb.Message.getFieldWithDefault(msg, 1, 0), + valid: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + offerId: msg.getOfferId_asB64(), + offerChainsList: msg.getOfferChainsList_asB64(), + offerMetadata: msg.getOfferMetadata_asB64(), + offerCurrency: jspb.Message.getFieldWithDefault(msg, 6, ""), + warningUnknownOfferCurrency: jspb.Message.getFieldWithDefault(msg, 7, ""), + currencyMinorUnit: jspb.Message.getFieldWithDefault(msg, 8, 0), + offerAmount: jspb.Message.getFieldWithDefault(msg, 9, 0), + offerAmountMsat: (f = msg.getOfferAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + offerDescription: jspb.Message.getFieldWithDefault(msg, 11, ""), + offerIssuer: jspb.Message.getFieldWithDefault(msg, 12, ""), + offerFeatures: msg.getOfferFeatures_asB64(), + offerAbsoluteExpiry: jspb.Message.getFieldWithDefault(msg, 14, 0), + offerQuantityMax: jspb.Message.getFieldWithDefault(msg, 15, 0), + offerPathsList: jspb.Message.toObjectList(msg.getOfferPathsList(), + proto.cln.DecodeOffer_paths.toObject, includeInstance), + offerNodeId: msg.getOfferNodeId_asB64(), + warningMissingOfferNodeId: jspb.Message.getFieldWithDefault(msg, 20, ""), + warningInvalidOfferDescription: jspb.Message.getFieldWithDefault(msg, 21, ""), + warningMissingOfferDescription: jspb.Message.getFieldWithDefault(msg, 22, ""), + warningInvalidOfferCurrency: jspb.Message.getFieldWithDefault(msg, 23, ""), + warningInvalidOfferIssuer: jspb.Message.getFieldWithDefault(msg, 24, ""), + invreqMetadata: msg.getInvreqMetadata_asB64(), + invreqPayerId: msg.getInvreqPayerId_asB64(), + invreqChain: msg.getInvreqChain_asB64(), + invreqAmountMsat: (f = msg.getInvreqAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + invreqFeatures: msg.getInvreqFeatures_asB64(), + invreqQuantity: jspb.Message.getFieldWithDefault(msg, 30, 0), + invreqPayerNote: jspb.Message.getFieldWithDefault(msg, 31, ""), + invreqRecurrenceCounter: jspb.Message.getFieldWithDefault(msg, 32, 0), + invreqRecurrenceStart: jspb.Message.getFieldWithDefault(msg, 33, 0), + warningMissingInvreqMetadata: jspb.Message.getFieldWithDefault(msg, 35, ""), + warningMissingInvreqPayerId: jspb.Message.getFieldWithDefault(msg, 36, ""), + warningInvalidInvreqPayerNote: jspb.Message.getFieldWithDefault(msg, 37, ""), + warningMissingInvoiceRequestSignature: jspb.Message.getFieldWithDefault(msg, 38, ""), + warningInvalidInvoiceRequestSignature: jspb.Message.getFieldWithDefault(msg, 39, ""), + invoiceCreatedAt: jspb.Message.getFieldWithDefault(msg, 41, 0), + invoiceRelativeExpiry: jspb.Message.getFieldWithDefault(msg, 42, 0), + invoicePaymentHash: msg.getInvoicePaymentHash_asB64(), + invoiceAmountMsat: (f = msg.getInvoiceAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + invoiceFallbacksList: jspb.Message.toObjectList(msg.getInvoiceFallbacksList(), + proto.cln.DecodeInvoice_fallbacks.toObject, includeInstance), + invoiceFeatures: msg.getInvoiceFeatures_asB64(), + invoiceNodeId: msg.getInvoiceNodeId_asB64(), + invoiceRecurrenceBasetime: jspb.Message.getFieldWithDefault(msg, 48, 0), + warningMissingInvoicePaths: jspb.Message.getFieldWithDefault(msg, 50, ""), + warningMissingInvoiceBlindedpay: jspb.Message.getFieldWithDefault(msg, 51, ""), + warningMissingInvoiceCreatedAt: jspb.Message.getFieldWithDefault(msg, 52, ""), + warningMissingInvoicePaymentHash: jspb.Message.getFieldWithDefault(msg, 53, ""), + warningMissingInvoiceAmount: jspb.Message.getFieldWithDefault(msg, 54, ""), + warningMissingInvoiceRecurrenceBasetime: jspb.Message.getFieldWithDefault(msg, 55, ""), + warningMissingInvoiceNodeId: jspb.Message.getFieldWithDefault(msg, 56, ""), + warningMissingInvoiceSignature: jspb.Message.getFieldWithDefault(msg, 57, ""), + warningInvalidInvoiceSignature: jspb.Message.getFieldWithDefault(msg, 58, ""), + fallbacksList: jspb.Message.toObjectList(msg.getFallbacksList(), + proto.cln.DecodeFallbacks.toObject, includeInstance), + createdAt: jspb.Message.getFieldWithDefault(msg, 60, 0), + expiry: jspb.Message.getFieldWithDefault(msg, 61, 0), + payee: msg.getPayee_asB64(), + paymentHash: msg.getPaymentHash_asB64(), + descriptionHash: msg.getDescriptionHash_asB64(), + minFinalCltvExpiry: jspb.Message.getFieldWithDefault(msg, 65, 0), + paymentSecret: msg.getPaymentSecret_asB64(), + paymentMetadata: msg.getPaymentMetadata_asB64(), + extraList: jspb.Message.toObjectList(msg.getExtraList(), + proto.cln.DecodeExtra.toObject, includeInstance), + uniqueId: jspb.Message.getFieldWithDefault(msg, 70, ""), + version: jspb.Message.getFieldWithDefault(msg, 71, ""), + string: jspb.Message.getFieldWithDefault(msg, 72, ""), + restrictionsList: jspb.Message.toObjectList(msg.getRestrictionsList(), + proto.cln.DecodeRestrictions.toObject, includeInstance), + warningRuneInvalidUtf8: jspb.Message.getFieldWithDefault(msg, 74, ""), + hex: msg.getHex_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.cln.DecodeResponse} + */ +proto.cln.DecodeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeResponse; + return proto.cln.DecodeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeResponse} + */ +proto.cln.DecodeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.DecodeResponse.DecodeType} */ (reader.readEnum()); + msg.setItemType(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setValid(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOfferId(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addOfferChains(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOfferMetadata(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOfferCurrency(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningUnknownOfferCurrency(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCurrencyMinorUnit(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOfferAmount(value); + break; + case 10: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOfferAmountMsat(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setOfferDescription(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setOfferIssuer(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOfferFeatures(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOfferAbsoluteExpiry(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOfferQuantityMax(value); + break; + case 16: + var value = new proto.cln.DecodeOffer_paths; + reader.readMessage(value,proto.cln.DecodeOffer_paths.deserializeBinaryFromReader); + msg.addOfferPaths(value); + break; + case 17: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOfferNodeId(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingOfferNodeId(value); + break; + case 21: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvalidOfferDescription(value); + break; + case 22: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingOfferDescription(value); + break; + case 23: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvalidOfferCurrency(value); + break; + case 24: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvalidOfferIssuer(value); + break; + case 25: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvreqMetadata(value); + break; + case 26: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvreqPayerId(value); + break; + case 27: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvreqChain(value); + break; + case 28: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInvreqAmountMsat(value); + break; + case 29: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvreqFeatures(value); + break; + case 30: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInvreqQuantity(value); + break; + case 31: + var value = /** @type {string} */ (reader.readString()); + msg.setInvreqPayerNote(value); + break; + case 32: + var value = /** @type {number} */ (reader.readUint32()); + msg.setInvreqRecurrenceCounter(value); + break; + case 33: + var value = /** @type {number} */ (reader.readUint32()); + msg.setInvreqRecurrenceStart(value); + break; + case 35: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvreqMetadata(value); + break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvreqPayerId(value); + break; + case 37: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvalidInvreqPayerNote(value); + break; + case 38: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceRequestSignature(value); + break; + case 39: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvalidInvoiceRequestSignature(value); + break; + case 41: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInvoiceCreatedAt(value); + break; + case 42: + var value = /** @type {number} */ (reader.readUint32()); + msg.setInvoiceRelativeExpiry(value); + break; + case 43: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvoicePaymentHash(value); + break; + case 44: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInvoiceAmountMsat(value); + break; + case 45: + var value = new proto.cln.DecodeInvoice_fallbacks; + reader.readMessage(value,proto.cln.DecodeInvoice_fallbacks.deserializeBinaryFromReader); + msg.addInvoiceFallbacks(value); + break; + case 46: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvoiceFeatures(value); + break; + case 47: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setInvoiceNodeId(value); + break; + case 48: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInvoiceRecurrenceBasetime(value); + break; + case 50: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoicePaths(value); + break; + case 51: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceBlindedpay(value); + break; + case 52: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceCreatedAt(value); + break; + case 53: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoicePaymentHash(value); + break; + case 54: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceAmount(value); + break; + case 55: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceRecurrenceBasetime(value); + break; + case 56: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceNodeId(value); + break; + case 57: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingInvoiceSignature(value); + break; + case 58: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvalidInvoiceSignature(value); + break; + case 59: + var value = new proto.cln.DecodeFallbacks; + reader.readMessage(value,proto.cln.DecodeFallbacks.deserializeBinaryFromReader); + msg.addFallbacks(value); + break; + case 60: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 61: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiry(value); + break; + case 62: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayee(value); + break; + case 63: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 64: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDescriptionHash(value); + break; + case 65: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinFinalCltvExpiry(value); + break; + case 66: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentSecret(value); + break; + case 67: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentMetadata(value); + break; + case 69: + var value = new proto.cln.DecodeExtra; + reader.readMessage(value,proto.cln.DecodeExtra.deserializeBinaryFromReader); + msg.addExtra(value); + break; + case 70: + var value = /** @type {string} */ (reader.readString()); + msg.setUniqueId(value); + break; + case 71: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 72: + var value = /** @type {string} */ (reader.readString()); + msg.setString(value); + break; + case 73: + var value = new proto.cln.DecodeRestrictions; + reader.readMessage(value,proto.cln.DecodeRestrictions.deserializeBinaryFromReader); + msg.addRestrictions(value); + break; + case 74: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningRuneInvalidUtf8(value); + break; + case 75: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getItemType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValid(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOfferChainsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeUint64( + 9, + f + ); + } + f = message.getOfferAmountMsat(); + if (f != null) { + writer.writeMessage( + 10, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeUint64( + 14, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeUint64( + 15, + f + ); + } + f = message.getOfferPathsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 16, + f, + proto.cln.DecodeOffer_paths.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBytes( + 17, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeString( + 20, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 21)); + if (f != null) { + writer.writeString( + 21, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 22)); + if (f != null) { + writer.writeString( + 22, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 23)); + if (f != null) { + writer.writeString( + 23, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 24)); + if (f != null) { + writer.writeString( + 24, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 25)); + if (f != null) { + writer.writeBytes( + 25, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 26)); + if (f != null) { + writer.writeBytes( + 26, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 27)); + if (f != null) { + writer.writeBytes( + 27, + f + ); + } + f = message.getInvreqAmountMsat(); + if (f != null) { + writer.writeMessage( + 28, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 29)); + if (f != null) { + writer.writeBytes( + 29, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 30)); + if (f != null) { + writer.writeUint64( + 30, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 31)); + if (f != null) { + writer.writeString( + 31, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 32)); + if (f != null) { + writer.writeUint32( + 32, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeUint32( + 33, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 35)); + if (f != null) { + writer.writeString( + 35, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 36)); + if (f != null) { + writer.writeString( + 36, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 37)); + if (f != null) { + writer.writeString( + 37, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 38)); + if (f != null) { + writer.writeString( + 38, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 39)); + if (f != null) { + writer.writeString( + 39, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 41)); + if (f != null) { + writer.writeUint64( + 41, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 42)); + if (f != null) { + writer.writeUint32( + 42, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 43)); + if (f != null) { + writer.writeBytes( + 43, + f + ); + } + f = message.getInvoiceAmountMsat(); + if (f != null) { + writer.writeMessage( + 44, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getInvoiceFallbacksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 45, + f, + proto.cln.DecodeInvoice_fallbacks.serializeBinaryToWriter + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 46)); + if (f != null) { + writer.writeBytes( + 46, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 47)); + if (f != null) { + writer.writeBytes( + 47, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 48)); + if (f != null) { + writer.writeUint64( + 48, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 50)); + if (f != null) { + writer.writeString( + 50, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 51)); + if (f != null) { + writer.writeString( + 51, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 52)); + if (f != null) { + writer.writeString( + 52, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 53)); + if (f != null) { + writer.writeString( + 53, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 54)); + if (f != null) { + writer.writeString( + 54, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 55)); + if (f != null) { + writer.writeString( + 55, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 56)); + if (f != null) { + writer.writeString( + 56, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 57)); + if (f != null) { + writer.writeString( + 57, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 58)); + if (f != null) { + writer.writeString( + 58, + f + ); + } + f = message.getFallbacksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 59, + f, + proto.cln.DecodeFallbacks.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 60)); + if (f != null) { + writer.writeUint64( + 60, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 61)); + if (f != null) { + writer.writeUint64( + 61, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 62)); + if (f != null) { + writer.writeBytes( + 62, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 63)); + if (f != null) { + writer.writeBytes( + 63, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 64)); + if (f != null) { + writer.writeBytes( + 64, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 65)); + if (f != null) { + writer.writeUint32( + 65, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 66)); + if (f != null) { + writer.writeBytes( + 66, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 67)); + if (f != null) { + writer.writeBytes( + 67, + f + ); + } + f = message.getExtraList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 69, + f, + proto.cln.DecodeExtra.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 70)); + if (f != null) { + writer.writeString( + 70, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 71)); + if (f != null) { + writer.writeString( + 71, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 72)); + if (f != null) { + writer.writeString( + 72, + f + ); + } + f = message.getRestrictionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 73, + f, + proto.cln.DecodeRestrictions.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 74)); + if (f != null) { + writer.writeString( + 74, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 75)); + if (f != null) { + writer.writeBytes( + 75, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.DecodeResponse.DecodeType = { + BOLT12_OFFER: 0, + BOLT12_INVOICE: 1, + BOLT12_INVOICE_REQUEST: 2, + BOLT11_INVOICE: 3, + RUNE: 4 +}; + +/** + * optional DecodeType item_type = 1; + * @return {!proto.cln.DecodeResponse.DecodeType} + */ +proto.cln.DecodeResponse.prototype.getItemType = function() { + return /** @type {!proto.cln.DecodeResponse.DecodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.DecodeResponse.DecodeType} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setItemType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bool valid = 2; + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.getValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes offer_id = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getOfferId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes offer_id = 3; + * This is a type-conversion wrapper around `getOfferId()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOfferId())); +}; + + +/** + * optional bytes offer_id = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOfferId()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getOfferId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOfferId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferId = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferId = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated bytes offer_chains = 4; + * @return {!(Array|Array)} + */ +proto.cln.DecodeResponse.prototype.getOfferChainsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes offer_chains = 4; + * This is a type-conversion wrapper around `getOfferChainsList()` + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getOfferChainsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getOfferChainsList())); +}; + + +/** + * repeated bytes offer_chains = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOfferChainsList()` + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getOfferChainsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getOfferChainsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferChainsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.addOfferChains = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferChainsList = function() { + return this.setOfferChainsList([]); +}; + + +/** + * optional bytes offer_metadata = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getOfferMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes offer_metadata = 5; + * This is a type-conversion wrapper around `getOfferMetadata()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOfferMetadata())); +}; + + +/** + * optional bytes offer_metadata = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOfferMetadata()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getOfferMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOfferMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferMetadata = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferMetadata = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferMetadata = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string offer_currency = 6; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferCurrency = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferCurrency = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferCurrency = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferCurrency = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string warning_unknown_offer_currency = 7; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningUnknownOfferCurrency = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningUnknownOfferCurrency = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningUnknownOfferCurrency = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningUnknownOfferCurrency = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint32 currency_minor_unit = 8; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getCurrencyMinorUnit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setCurrencyMinorUnit = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearCurrencyMinorUnit = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasCurrencyMinorUnit = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint64 offer_amount = 9; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getOfferAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferAmount = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferAmount = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferAmount = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Amount offer_amount_msat = 10; + * @return {?proto.cln.Amount} + */ +proto.cln.DecodeResponse.prototype.getOfferAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 10)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setOfferAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferAmountMsat = function() { + return this.setOfferAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferAmountMsat = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string offer_description = 11; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferDescription = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferDescription = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferDescription = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string offer_issuer = 12; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferIssuer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferIssuer = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferIssuer = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferIssuer = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bytes offer_features = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getOfferFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes offer_features = 13; + * This is a type-conversion wrapper around `getOfferFeatures()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOfferFeatures())); +}; + + +/** + * optional bytes offer_features = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOfferFeatures()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getOfferFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOfferFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferFeatures = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferFeatures = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferFeatures = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional uint64 offer_absolute_expiry = 14; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getOfferAbsoluteExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferAbsoluteExpiry = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferAbsoluteExpiry = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferAbsoluteExpiry = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional uint64 offer_quantity_max = 15; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getOfferQuantityMax = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferQuantityMax = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferQuantityMax = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferQuantityMax = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * repeated DecodeOffer_paths offer_paths = 16; + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getOfferPathsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodeOffer_paths, 16)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setOfferPathsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 16, value); +}; + + +/** + * @param {!proto.cln.DecodeOffer_paths=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodeOffer_paths} + */ +proto.cln.DecodeResponse.prototype.addOfferPaths = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.cln.DecodeOffer_paths, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferPathsList = function() { + return this.setOfferPathsList([]); +}; + + +/** + * optional bytes offer_node_id = 17; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getOfferNodeId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * optional bytes offer_node_id = 17; + * This is a type-conversion wrapper around `getOfferNodeId()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getOfferNodeId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOfferNodeId())); +}; + + +/** + * optional bytes offer_node_id = 17; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOfferNodeId()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getOfferNodeId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOfferNodeId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setOfferNodeId = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearOfferNodeId = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasOfferNodeId = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional string warning_missing_offer_node_id = 20; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingOfferNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingOfferNodeId = function(value) { + return jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingOfferNodeId = function() { + return jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingOfferNodeId = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional string warning_invalid_offer_description = 21; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningInvalidOfferDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningInvalidOfferDescription = function(value) { + return jspb.Message.setField(this, 21, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningInvalidOfferDescription = function() { + return jspb.Message.setField(this, 21, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningInvalidOfferDescription = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional string warning_missing_offer_description = 22; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingOfferDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingOfferDescription = function(value) { + return jspb.Message.setField(this, 22, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingOfferDescription = function() { + return jspb.Message.setField(this, 22, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingOfferDescription = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional string warning_invalid_offer_currency = 23; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningInvalidOfferCurrency = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningInvalidOfferCurrency = function(value) { + return jspb.Message.setField(this, 23, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningInvalidOfferCurrency = function() { + return jspb.Message.setField(this, 23, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningInvalidOfferCurrency = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional string warning_invalid_offer_issuer = 24; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningInvalidOfferIssuer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 24, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningInvalidOfferIssuer = function(value) { + return jspb.Message.setField(this, 24, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningInvalidOfferIssuer = function() { + return jspb.Message.setField(this, 24, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningInvalidOfferIssuer = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional bytes invreq_metadata = 25; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvreqMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 25, "")); +}; + + +/** + * optional bytes invreq_metadata = 25; + * This is a type-conversion wrapper around `getInvreqMetadata()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvreqMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvreqMetadata())); +}; + + +/** + * optional bytes invreq_metadata = 25; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvreqMetadata()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvreqMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvreqMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqMetadata = function(value) { + return jspb.Message.setField(this, 25, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqMetadata = function() { + return jspb.Message.setField(this, 25, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqMetadata = function() { + return jspb.Message.getField(this, 25) != null; +}; + + +/** + * optional bytes invreq_payer_id = 26; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvreqPayerId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 26, "")); +}; + + +/** + * optional bytes invreq_payer_id = 26; + * This is a type-conversion wrapper around `getInvreqPayerId()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvreqPayerId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvreqPayerId())); +}; + + +/** + * optional bytes invreq_payer_id = 26; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvreqPayerId()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvreqPayerId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvreqPayerId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqPayerId = function(value) { + return jspb.Message.setField(this, 26, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqPayerId = function() { + return jspb.Message.setField(this, 26, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqPayerId = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional bytes invreq_chain = 27; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvreqChain = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 27, "")); +}; + + +/** + * optional bytes invreq_chain = 27; + * This is a type-conversion wrapper around `getInvreqChain()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvreqChain_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvreqChain())); +}; + + +/** + * optional bytes invreq_chain = 27; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvreqChain()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvreqChain_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvreqChain())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqChain = function(value) { + return jspb.Message.setField(this, 27, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqChain = function() { + return jspb.Message.setField(this, 27, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqChain = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional Amount invreq_amount_msat = 28; + * @return {?proto.cln.Amount} + */ +proto.cln.DecodeResponse.prototype.getInvreqAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 28)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setInvreqAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 28, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqAmountMsat = function() { + return this.setInvreqAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqAmountMsat = function() { + return jspb.Message.getField(this, 28) != null; +}; + + +/** + * optional bytes invreq_features = 29; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvreqFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 29, "")); +}; + + +/** + * optional bytes invreq_features = 29; + * This is a type-conversion wrapper around `getInvreqFeatures()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvreqFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvreqFeatures())); +}; + + +/** + * optional bytes invreq_features = 29; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvreqFeatures()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvreqFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvreqFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqFeatures = function(value) { + return jspb.Message.setField(this, 29, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqFeatures = function() { + return jspb.Message.setField(this, 29, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqFeatures = function() { + return jspb.Message.getField(this, 29) != null; +}; + + +/** + * optional uint64 invreq_quantity = 30; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getInvreqQuantity = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 30, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqQuantity = function(value) { + return jspb.Message.setField(this, 30, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqQuantity = function() { + return jspb.Message.setField(this, 30, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqQuantity = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +/** + * optional string invreq_payer_note = 31; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvreqPayerNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 31, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqPayerNote = function(value) { + return jspb.Message.setField(this, 31, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqPayerNote = function() { + return jspb.Message.setField(this, 31, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqPayerNote = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional uint32 invreq_recurrence_counter = 32; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getInvreqRecurrenceCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 32, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqRecurrenceCounter = function(value) { + return jspb.Message.setField(this, 32, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqRecurrenceCounter = function() { + return jspb.Message.setField(this, 32, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqRecurrenceCounter = function() { + return jspb.Message.getField(this, 32) != null; +}; + + +/** + * optional uint32 invreq_recurrence_start = 33; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getInvreqRecurrenceStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 33, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvreqRecurrenceStart = function(value) { + return jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvreqRecurrenceStart = function() { + return jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvreqRecurrenceStart = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional string warning_missing_invreq_metadata = 35; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvreqMetadata = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 35, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvreqMetadata = function(value) { + return jspb.Message.setField(this, 35, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvreqMetadata = function() { + return jspb.Message.setField(this, 35, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvreqMetadata = function() { + return jspb.Message.getField(this, 35) != null; +}; + + +/** + * optional string warning_missing_invreq_payer_id = 36; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvreqPayerId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvreqPayerId = function(value) { + return jspb.Message.setField(this, 36, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvreqPayerId = function() { + return jspb.Message.setField(this, 36, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvreqPayerId = function() { + return jspb.Message.getField(this, 36) != null; +}; + + +/** + * optional string warning_invalid_invreq_payer_note = 37; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningInvalidInvreqPayerNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 37, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningInvalidInvreqPayerNote = function(value) { + return jspb.Message.setField(this, 37, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningInvalidInvreqPayerNote = function() { + return jspb.Message.setField(this, 37, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningInvalidInvreqPayerNote = function() { + return jspb.Message.getField(this, 37) != null; +}; + + +/** + * optional string warning_missing_invoice_request_signature = 38; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceRequestSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 38, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceRequestSignature = function(value) { + return jspb.Message.setField(this, 38, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceRequestSignature = function() { + return jspb.Message.setField(this, 38, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceRequestSignature = function() { + return jspb.Message.getField(this, 38) != null; +}; + + +/** + * optional string warning_invalid_invoice_request_signature = 39; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningInvalidInvoiceRequestSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 39, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningInvalidInvoiceRequestSignature = function(value) { + return jspb.Message.setField(this, 39, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningInvalidInvoiceRequestSignature = function() { + return jspb.Message.setField(this, 39, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningInvalidInvoiceRequestSignature = function() { + return jspb.Message.getField(this, 39) != null; +}; + + +/** + * optional uint64 invoice_created_at = 41; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getInvoiceCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 41, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvoiceCreatedAt = function(value) { + return jspb.Message.setField(this, 41, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceCreatedAt = function() { + return jspb.Message.setField(this, 41, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoiceCreatedAt = function() { + return jspb.Message.getField(this, 41) != null; +}; + + +/** + * optional uint32 invoice_relative_expiry = 42; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getInvoiceRelativeExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 42, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvoiceRelativeExpiry = function(value) { + return jspb.Message.setField(this, 42, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceRelativeExpiry = function() { + return jspb.Message.setField(this, 42, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoiceRelativeExpiry = function() { + return jspb.Message.getField(this, 42) != null; +}; + + +/** + * optional bytes invoice_payment_hash = 43; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvoicePaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 43, "")); +}; + + +/** + * optional bytes invoice_payment_hash = 43; + * This is a type-conversion wrapper around `getInvoicePaymentHash()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvoicePaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvoicePaymentHash())); +}; + + +/** + * optional bytes invoice_payment_hash = 43; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvoicePaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvoicePaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvoicePaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvoicePaymentHash = function(value) { + return jspb.Message.setField(this, 43, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoicePaymentHash = function() { + return jspb.Message.setField(this, 43, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoicePaymentHash = function() { + return jspb.Message.getField(this, 43) != null; +}; + + +/** + * optional Amount invoice_amount_msat = 44; + * @return {?proto.cln.Amount} + */ +proto.cln.DecodeResponse.prototype.getInvoiceAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 44)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setInvoiceAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 44, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceAmountMsat = function() { + return this.setInvoiceAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoiceAmountMsat = function() { + return jspb.Message.getField(this, 44) != null; +}; + + +/** + * repeated DecodeInvoice_fallbacks invoice_fallbacks = 45; + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getInvoiceFallbacksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodeInvoice_fallbacks, 45)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setInvoiceFallbacksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 45, value); +}; + + +/** + * @param {!proto.cln.DecodeInvoice_fallbacks=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodeInvoice_fallbacks} + */ +proto.cln.DecodeResponse.prototype.addInvoiceFallbacks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 45, opt_value, proto.cln.DecodeInvoice_fallbacks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceFallbacksList = function() { + return this.setInvoiceFallbacksList([]); +}; + + +/** + * optional bytes invoice_features = 46; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvoiceFeatures = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 46, "")); +}; + + +/** + * optional bytes invoice_features = 46; + * This is a type-conversion wrapper around `getInvoiceFeatures()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvoiceFeatures_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvoiceFeatures())); +}; + + +/** + * optional bytes invoice_features = 46; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvoiceFeatures()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvoiceFeatures_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvoiceFeatures())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvoiceFeatures = function(value) { + return jspb.Message.setField(this, 46, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceFeatures = function() { + return jspb.Message.setField(this, 46, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoiceFeatures = function() { + return jspb.Message.getField(this, 46) != null; +}; + + +/** + * optional bytes invoice_node_id = 47; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getInvoiceNodeId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 47, "")); +}; + + +/** + * optional bytes invoice_node_id = 47; + * This is a type-conversion wrapper around `getInvoiceNodeId()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getInvoiceNodeId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInvoiceNodeId())); +}; + + +/** + * optional bytes invoice_node_id = 47; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInvoiceNodeId()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getInvoiceNodeId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInvoiceNodeId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvoiceNodeId = function(value) { + return jspb.Message.setField(this, 47, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceNodeId = function() { + return jspb.Message.setField(this, 47, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoiceNodeId = function() { + return jspb.Message.getField(this, 47) != null; +}; + + +/** + * optional uint64 invoice_recurrence_basetime = 48; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getInvoiceRecurrenceBasetime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 48, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setInvoiceRecurrenceBasetime = function(value) { + return jspb.Message.setField(this, 48, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearInvoiceRecurrenceBasetime = function() { + return jspb.Message.setField(this, 48, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasInvoiceRecurrenceBasetime = function() { + return jspb.Message.getField(this, 48) != null; +}; + + +/** + * optional string warning_missing_invoice_paths = 50; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoicePaths = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 50, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoicePaths = function(value) { + return jspb.Message.setField(this, 50, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoicePaths = function() { + return jspb.Message.setField(this, 50, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoicePaths = function() { + return jspb.Message.getField(this, 50) != null; +}; + + +/** + * optional string warning_missing_invoice_blindedpay = 51; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceBlindedpay = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 51, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceBlindedpay = function(value) { + return jspb.Message.setField(this, 51, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceBlindedpay = function() { + return jspb.Message.setField(this, 51, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceBlindedpay = function() { + return jspb.Message.getField(this, 51) != null; +}; + + +/** + * optional string warning_missing_invoice_created_at = 52; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceCreatedAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 52, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceCreatedAt = function(value) { + return jspb.Message.setField(this, 52, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceCreatedAt = function() { + return jspb.Message.setField(this, 52, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceCreatedAt = function() { + return jspb.Message.getField(this, 52) != null; +}; + + +/** + * optional string warning_missing_invoice_payment_hash = 53; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoicePaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 53, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoicePaymentHash = function(value) { + return jspb.Message.setField(this, 53, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoicePaymentHash = function() { + return jspb.Message.setField(this, 53, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoicePaymentHash = function() { + return jspb.Message.getField(this, 53) != null; +}; + + +/** + * optional string warning_missing_invoice_amount = 54; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 54, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceAmount = function(value) { + return jspb.Message.setField(this, 54, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceAmount = function() { + return jspb.Message.setField(this, 54, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceAmount = function() { + return jspb.Message.getField(this, 54) != null; +}; + + +/** + * optional string warning_missing_invoice_recurrence_basetime = 55; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceRecurrenceBasetime = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 55, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceRecurrenceBasetime = function(value) { + return jspb.Message.setField(this, 55, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceRecurrenceBasetime = function() { + return jspb.Message.setField(this, 55, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceRecurrenceBasetime = function() { + return jspb.Message.getField(this, 55) != null; +}; + + +/** + * optional string warning_missing_invoice_node_id = 56; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 56, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceNodeId = function(value) { + return jspb.Message.setField(this, 56, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceNodeId = function() { + return jspb.Message.setField(this, 56, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceNodeId = function() { + return jspb.Message.getField(this, 56) != null; +}; + + +/** + * optional string warning_missing_invoice_signature = 57; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningMissingInvoiceSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 57, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningMissingInvoiceSignature = function(value) { + return jspb.Message.setField(this, 57, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningMissingInvoiceSignature = function() { + return jspb.Message.setField(this, 57, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningMissingInvoiceSignature = function() { + return jspb.Message.getField(this, 57) != null; +}; + + +/** + * optional string warning_invalid_invoice_signature = 58; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningInvalidInvoiceSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 58, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningInvalidInvoiceSignature = function(value) { + return jspb.Message.setField(this, 58, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningInvalidInvoiceSignature = function() { + return jspb.Message.setField(this, 58, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningInvalidInvoiceSignature = function() { + return jspb.Message.getField(this, 58) != null; +}; + + +/** + * repeated DecodeFallbacks fallbacks = 59; + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getFallbacksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodeFallbacks, 59)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setFallbacksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 59, value); +}; + + +/** + * @param {!proto.cln.DecodeFallbacks=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodeFallbacks} + */ +proto.cln.DecodeResponse.prototype.addFallbacks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 59, opt_value, proto.cln.DecodeFallbacks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearFallbacksList = function() { + return this.setFallbacksList([]); +}; + + +/** + * optional uint64 created_at = 60; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 60, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setCreatedAt = function(value) { + return jspb.Message.setField(this, 60, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearCreatedAt = function() { + return jspb.Message.setField(this, 60, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasCreatedAt = function() { + return jspb.Message.getField(this, 60) != null; +}; + + +/** + * optional uint64 expiry = 61; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 61, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setExpiry = function(value) { + return jspb.Message.setField(this, 61, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearExpiry = function() { + return jspb.Message.setField(this, 61, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasExpiry = function() { + return jspb.Message.getField(this, 61) != null; +}; + + +/** + * optional bytes payee = 62; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getPayee = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 62, "")); +}; + + +/** + * optional bytes payee = 62; + * This is a type-conversion wrapper around `getPayee()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getPayee_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayee())); +}; + + +/** + * optional bytes payee = 62; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayee()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getPayee_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayee())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setPayee = function(value) { + return jspb.Message.setField(this, 62, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearPayee = function() { + return jspb.Message.setField(this, 62, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasPayee = function() { + return jspb.Message.getField(this, 62) != null; +}; + + +/** + * optional bytes payment_hash = 63; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 63, "")); +}; + + +/** + * optional bytes payment_hash = 63; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 63; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setField(this, 63, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearPaymentHash = function() { + return jspb.Message.setField(this, 63, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasPaymentHash = function() { + return jspb.Message.getField(this, 63) != null; +}; + + +/** + * optional bytes description_hash = 64; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getDescriptionHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 64, "")); +}; + + +/** + * optional bytes description_hash = 64; + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getDescriptionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDescriptionHash())); +}; + + +/** + * optional bytes description_hash = 64; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDescriptionHash()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getDescriptionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDescriptionHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setDescriptionHash = function(value) { + return jspb.Message.setField(this, 64, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearDescriptionHash = function() { + return jspb.Message.setField(this, 64, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasDescriptionHash = function() { + return jspb.Message.getField(this, 64) != null; +}; + + +/** + * optional uint32 min_final_cltv_expiry = 65; + * @return {number} + */ +proto.cln.DecodeResponse.prototype.getMinFinalCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 65, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setMinFinalCltvExpiry = function(value) { + return jspb.Message.setField(this, 65, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearMinFinalCltvExpiry = function() { + return jspb.Message.setField(this, 65, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasMinFinalCltvExpiry = function() { + return jspb.Message.getField(this, 65) != null; +}; + + +/** + * optional bytes payment_secret = 66; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getPaymentSecret = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 66, "")); +}; + + +/** + * optional bytes payment_secret = 66; + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getPaymentSecret_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentSecret())); +}; + + +/** + * optional bytes payment_secret = 66; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentSecret()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getPaymentSecret_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentSecret())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setPaymentSecret = function(value) { + return jspb.Message.setField(this, 66, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearPaymentSecret = function() { + return jspb.Message.setField(this, 66, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasPaymentSecret = function() { + return jspb.Message.getField(this, 66) != null; +}; + + +/** + * optional bytes payment_metadata = 67; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getPaymentMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 67, "")); +}; + + +/** + * optional bytes payment_metadata = 67; + * This is a type-conversion wrapper around `getPaymentMetadata()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getPaymentMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentMetadata())); +}; + + +/** + * optional bytes payment_metadata = 67; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentMetadata()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getPaymentMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setPaymentMetadata = function(value) { + return jspb.Message.setField(this, 67, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearPaymentMetadata = function() { + return jspb.Message.setField(this, 67, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasPaymentMetadata = function() { + return jspb.Message.getField(this, 67) != null; +}; + + +/** + * repeated DecodeExtra extra = 69; + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getExtraList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodeExtra, 69)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setExtraList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 69, value); +}; + + +/** + * @param {!proto.cln.DecodeExtra=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodeExtra} + */ +proto.cln.DecodeResponse.prototype.addExtra = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 69, opt_value, proto.cln.DecodeExtra, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearExtraList = function() { + return this.setExtraList([]); +}; + + +/** + * optional string unique_id = 70; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getUniqueId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 70, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setUniqueId = function(value) { + return jspb.Message.setField(this, 70, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearUniqueId = function() { + return jspb.Message.setField(this, 70, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasUniqueId = function() { + return jspb.Message.getField(this, 70) != null; +}; + + +/** + * optional string version = 71; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 71, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setVersion = function(value) { + return jspb.Message.setField(this, 71, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearVersion = function() { + return jspb.Message.setField(this, 71, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasVersion = function() { + return jspb.Message.getField(this, 71) != null; +}; + + +/** + * optional string string = 72; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getString = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 72, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setString = function(value) { + return jspb.Message.setField(this, 72, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearString = function() { + return jspb.Message.setField(this, 72, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasString = function() { + return jspb.Message.getField(this, 72) != null; +}; + + +/** + * repeated DecodeRestrictions restrictions = 73; + * @return {!Array} + */ +proto.cln.DecodeResponse.prototype.getRestrictionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.DecodeRestrictions, 73)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodeResponse} returns this +*/ +proto.cln.DecodeResponse.prototype.setRestrictionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 73, value); +}; + + +/** + * @param {!proto.cln.DecodeRestrictions=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.DecodeRestrictions} + */ +proto.cln.DecodeResponse.prototype.addRestrictions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 73, opt_value, proto.cln.DecodeRestrictions, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearRestrictionsList = function() { + return this.setRestrictionsList([]); +}; + + +/** + * optional string warning_rune_invalid_utf8 = 74; + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getWarningRuneInvalidUtf8 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 74, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setWarningRuneInvalidUtf8 = function(value) { + return jspb.Message.setField(this, 74, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearWarningRuneInvalidUtf8 = function() { + return jspb.Message.setField(this, 74, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasWarningRuneInvalidUtf8 = function() { + return jspb.Message.getField(this, 74) != null; +}; + + +/** + * optional bytes hex = 75; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeResponse.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 75, "")); +}; + + +/** + * optional bytes hex = 75; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.DecodeResponse.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 75; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.DecodeResponse.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.setHex = function(value) { + return jspb.Message.setField(this, 75, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeResponse} returns this + */ +proto.cln.DecodeResponse.prototype.clearHex = function() { + return jspb.Message.setField(this, 75, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeResponse.prototype.hasHex = function() { + return jspb.Message.getField(this, 75) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.DecodeOffer_paths.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeOffer_paths.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeOffer_paths} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeOffer_paths.toObject = function(includeInstance, msg) { + var f, obj = { + firstNodeId: msg.getFirstNodeId_asB64(), + blinding: msg.getBlinding_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.cln.DecodeOffer_paths} + */ +proto.cln.DecodeOffer_paths.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeOffer_paths; + return proto.cln.DecodeOffer_paths.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeOffer_paths} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeOffer_paths} + */ +proto.cln.DecodeOffer_paths.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.setFirstNodeId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setBlinding(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeOffer_paths.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeOffer_paths.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeOffer_paths} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeOffer_paths.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFirstNodeId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getBlinding_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes first_node_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeOffer_paths.prototype.getFirstNodeId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes first_node_id = 1; + * This is a type-conversion wrapper around `getFirstNodeId()` + * @return {string} + */ +proto.cln.DecodeOffer_paths.prototype.getFirstNodeId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFirstNodeId())); +}; + + +/** + * optional bytes first_node_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFirstNodeId()` + * @return {!Uint8Array} + */ +proto.cln.DecodeOffer_paths.prototype.getFirstNodeId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFirstNodeId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeOffer_paths} returns this + */ +proto.cln.DecodeOffer_paths.prototype.setFirstNodeId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes blinding = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeOffer_paths.prototype.getBlinding = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes blinding = 2; + * This is a type-conversion wrapper around `getBlinding()` + * @return {string} + */ +proto.cln.DecodeOffer_paths.prototype.getBlinding_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlinding())); +}; + + +/** + * optional bytes blinding = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlinding()` + * @return {!Uint8Array} + */ +proto.cln.DecodeOffer_paths.prototype.getBlinding_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlinding())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeOffer_paths} returns this + */ +proto.cln.DecodeOffer_paths.prototype.setBlinding = 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.cln.DecodeOffer_recurrencePaywindow.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeOffer_recurrencePaywindow.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeOffer_recurrencePaywindow} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeOffer_recurrencePaywindow.toObject = function(includeInstance, msg) { + var f, obj = { + secondsBefore: jspb.Message.getFieldWithDefault(msg, 1, 0), + secondsAfter: jspb.Message.getFieldWithDefault(msg, 2, 0), + proportionalAmount: 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.cln.DecodeOffer_recurrencePaywindow} + */ +proto.cln.DecodeOffer_recurrencePaywindow.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeOffer_recurrencePaywindow; + return proto.cln.DecodeOffer_recurrencePaywindow.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeOffer_recurrencePaywindow} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeOffer_recurrencePaywindow} + */ +proto.cln.DecodeOffer_recurrencePaywindow.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.setSecondsBefore(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSecondsAfter(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProportionalAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeOffer_recurrencePaywindow.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeOffer_recurrencePaywindow} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeOffer_recurrencePaywindow.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecondsBefore(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getSecondsAfter(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional uint32 seconds_before = 1; + * @return {number} + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.getSecondsBefore = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeOffer_recurrencePaywindow} returns this + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.setSecondsBefore = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 seconds_after = 2; + * @return {number} + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.getSecondsAfter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeOffer_recurrencePaywindow} returns this + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.setSecondsAfter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bool proportional_amount = 3; + * @return {boolean} + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.getProportionalAmount = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.DecodeOffer_recurrencePaywindow} returns this + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.setProportionalAmount = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeOffer_recurrencePaywindow} returns this + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.clearProportionalAmount = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeOffer_recurrencePaywindow.prototype.hasProportionalAmount = 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.cln.DecodeInvoice_pathsPath.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeInvoice_pathsPath.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeInvoice_pathsPath} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeInvoice_pathsPath.toObject = function(includeInstance, msg) { + var f, obj = { + blindedNodeId: msg.getBlindedNodeId_asB64(), + encryptedRecipientData: msg.getEncryptedRecipientData_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.cln.DecodeInvoice_pathsPath} + */ +proto.cln.DecodeInvoice_pathsPath.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeInvoice_pathsPath; + return proto.cln.DecodeInvoice_pathsPath.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeInvoice_pathsPath} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeInvoice_pathsPath} + */ +proto.cln.DecodeInvoice_pathsPath.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.setBlindedNodeId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncryptedRecipientData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeInvoice_pathsPath.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeInvoice_pathsPath} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeInvoice_pathsPath.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlindedNodeId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getEncryptedRecipientData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes blinded_node_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.getBlindedNodeId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes blinded_node_id = 1; + * This is a type-conversion wrapper around `getBlindedNodeId()` + * @return {string} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.getBlindedNodeId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBlindedNodeId())); +}; + + +/** + * optional bytes blinded_node_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBlindedNodeId()` + * @return {!Uint8Array} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.getBlindedNodeId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBlindedNodeId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeInvoice_pathsPath} returns this + */ +proto.cln.DecodeInvoice_pathsPath.prototype.setBlindedNodeId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes encrypted_recipient_data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.getEncryptedRecipientData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes encrypted_recipient_data = 2; + * This is a type-conversion wrapper around `getEncryptedRecipientData()` + * @return {string} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.getEncryptedRecipientData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncryptedRecipientData())); +}; + + +/** + * optional bytes encrypted_recipient_data = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncryptedRecipientData()` + * @return {!Uint8Array} + */ +proto.cln.DecodeInvoice_pathsPath.prototype.getEncryptedRecipientData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncryptedRecipientData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeInvoice_pathsPath} returns this + */ +proto.cln.DecodeInvoice_pathsPath.prototype.setEncryptedRecipientData = 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.cln.DecodeInvoice_fallbacks.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeInvoice_fallbacks.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeInvoice_fallbacks} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeInvoice_fallbacks.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + hex: msg.getHex_asB64(), + address: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.DecodeInvoice_fallbacks} + */ +proto.cln.DecodeInvoice_fallbacks.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeInvoice_fallbacks; + return proto.cln.DecodeInvoice_fallbacks.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeInvoice_fallbacks} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeInvoice_fallbacks} + */ +proto.cln.DecodeInvoice_fallbacks.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.setVersion(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHex(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeInvoice_fallbacks.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeInvoice_fallbacks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeInvoice_fallbacks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHex_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint32 version = 1; + * @return {number} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.DecodeInvoice_fallbacks} returns this + */ +proto.cln.DecodeInvoice_fallbacks.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hex = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.getHex = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hex = 2; + * This is a type-conversion wrapper around `getHex()` + * @return {string} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.getHex_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHex())); +}; + + +/** + * optional bytes hex = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getHex()` + * @return {!Uint8Array} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.getHex_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHex())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DecodeInvoice_fallbacks} returns this + */ +proto.cln.DecodeInvoice_fallbacks.prototype.setHex = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeInvoice_fallbacks} returns this + */ +proto.cln.DecodeInvoice_fallbacks.prototype.setAddress = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeInvoice_fallbacks} returns this + */ +proto.cln.DecodeInvoice_fallbacks.prototype.clearAddress = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeInvoice_fallbacks.prototype.hasAddress = 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.cln.DecodeFallbacks.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeFallbacks.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeFallbacks} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeFallbacks.toObject = function(includeInstance, msg) { + var f, obj = { + warningInvoiceFallbacksVersionInvalid: 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.cln.DecodeFallbacks} + */ +proto.cln.DecodeFallbacks.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeFallbacks; + return proto.cln.DecodeFallbacks.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeFallbacks} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeFallbacks} + */ +proto.cln.DecodeFallbacks.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningInvoiceFallbacksVersionInvalid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeFallbacks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeFallbacks.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeFallbacks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeFallbacks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string warning_invoice_fallbacks_version_invalid = 1; + * @return {string} + */ +proto.cln.DecodeFallbacks.prototype.getWarningInvoiceFallbacksVersionInvalid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeFallbacks} returns this + */ +proto.cln.DecodeFallbacks.prototype.setWarningInvoiceFallbacksVersionInvalid = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DecodeFallbacks} returns this + */ +proto.cln.DecodeFallbacks.prototype.clearWarningInvoiceFallbacksVersionInvalid = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DecodeFallbacks.prototype.hasWarningInvoiceFallbacksVersionInvalid = 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.cln.DecodeExtra.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeExtra.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeExtra} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeExtra.toObject = function(includeInstance, msg) { + var f, obj = { + tag: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: 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.cln.DecodeExtra} + */ +proto.cln.DecodeExtra.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeExtra; + return proto.cln.DecodeExtra.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeExtra} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeExtra} + */ +proto.cln.DecodeExtra.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTag(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeExtra.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeExtra.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeExtra} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeExtra.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTag(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string tag = 1; + * @return {string} + */ +proto.cln.DecodeExtra.prototype.getTag = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeExtra} returns this + */ +proto.cln.DecodeExtra.prototype.setTag = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data = 2; + * @return {string} + */ +proto.cln.DecodeExtra.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeExtra} returns this + */ +proto.cln.DecodeExtra.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.DecodeRestrictions.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.cln.DecodeRestrictions.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DecodeRestrictions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DecodeRestrictions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeRestrictions.toObject = function(includeInstance, msg) { + var f, obj = { + alternativesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + summary: 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.cln.DecodeRestrictions} + */ +proto.cln.DecodeRestrictions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DecodeRestrictions; + return proto.cln.DecodeRestrictions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DecodeRestrictions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DecodeRestrictions} + */ +proto.cln.DecodeRestrictions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addAlternatives(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSummary(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DecodeRestrictions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DecodeRestrictions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DecodeRestrictions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DecodeRestrictions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAlternativesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getSummary(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated string alternatives = 1; + * @return {!Array} + */ +proto.cln.DecodeRestrictions.prototype.getAlternativesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.DecodeRestrictions} returns this + */ +proto.cln.DecodeRestrictions.prototype.setAlternativesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.DecodeRestrictions} returns this + */ +proto.cln.DecodeRestrictions.prototype.addAlternatives = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.DecodeRestrictions} returns this + */ +proto.cln.DecodeRestrictions.prototype.clearAlternativesList = function() { + return this.setAlternativesList([]); +}; + + +/** + * optional string summary = 2; + * @return {string} + */ +proto.cln.DecodeRestrictions.prototype.getSummary = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.DecodeRestrictions} returns this + */ +proto.cln.DecodeRestrictions.prototype.setSummary = 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.cln.DisconnectRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DisconnectRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DisconnectRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DisconnectRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + force: 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.cln.DisconnectRequest} + */ +proto.cln.DisconnectRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DisconnectRequest; + return proto.cln.DisconnectRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DisconnectRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DisconnectRequest} + */ +proto.cln.DisconnectRequest.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.setId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setForce(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DisconnectRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DisconnectRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DisconnectRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DisconnectRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.DisconnectRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.DisconnectRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.DisconnectRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.DisconnectRequest} returns this + */ +proto.cln.DisconnectRequest.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool force = 2; + * @return {boolean} + */ +proto.cln.DisconnectRequest.prototype.getForce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.DisconnectRequest} returns this + */ +proto.cln.DisconnectRequest.prototype.setForce = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.DisconnectRequest} returns this + */ +proto.cln.DisconnectRequest.prototype.clearForce = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.DisconnectRequest.prototype.hasForce = 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.cln.DisconnectResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.DisconnectResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.DisconnectResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DisconnectResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.DisconnectResponse} + */ +proto.cln.DisconnectResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.DisconnectResponse; + return proto.cln.DisconnectResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.DisconnectResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.DisconnectResponse} + */ +proto.cln.DisconnectResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.DisconnectResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.DisconnectResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.DisconnectResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.DisconnectResponse.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.cln.FeeratesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + style: 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.cln.FeeratesRequest} + */ +proto.cln.FeeratesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesRequest; + return proto.cln.FeeratesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesRequest} + */ +proto.cln.FeeratesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.FeeratesRequest.FeeratesStyle} */ (reader.readEnum()); + msg.setStyle(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStyle(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.FeeratesRequest.FeeratesStyle = { + PERKB: 0, + PERKW: 1 +}; + +/** + * optional FeeratesStyle style = 1; + * @return {!proto.cln.FeeratesRequest.FeeratesStyle} + */ +proto.cln.FeeratesRequest.prototype.getStyle = function() { + return /** @type {!proto.cln.FeeratesRequest.FeeratesStyle} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.FeeratesRequest.FeeratesStyle} value + * @return {!proto.cln.FeeratesRequest} returns this + */ +proto.cln.FeeratesRequest.prototype.setStyle = 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.cln.FeeratesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + warningMissingFeerates: jspb.Message.getFieldWithDefault(msg, 1, ""), + perkb: (f = msg.getPerkb()) && proto.cln.FeeratesPerkb.toObject(includeInstance, f), + perkw: (f = msg.getPerkw()) && proto.cln.FeeratesPerkw.toObject(includeInstance, f), + onchainFeeEstimates: (f = msg.getOnchainFeeEstimates()) && proto.cln.FeeratesOnchain_fee_estimates.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.FeeratesResponse} + */ +proto.cln.FeeratesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesResponse; + return proto.cln.FeeratesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesResponse} + */ +proto.cln.FeeratesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningMissingFeerates(value); + break; + case 2: + var value = new proto.cln.FeeratesPerkb; + reader.readMessage(value,proto.cln.FeeratesPerkb.deserializeBinaryFromReader); + msg.setPerkb(value); + break; + case 3: + var value = new proto.cln.FeeratesPerkw; + reader.readMessage(value,proto.cln.FeeratesPerkw.deserializeBinaryFromReader); + msg.setPerkw(value); + break; + case 4: + var value = new proto.cln.FeeratesOnchain_fee_estimates; + reader.readMessage(value,proto.cln.FeeratesOnchain_fee_estimates.deserializeBinaryFromReader); + msg.setOnchainFeeEstimates(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getPerkb(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cln.FeeratesPerkb.serializeBinaryToWriter + ); + } + f = message.getPerkw(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cln.FeeratesPerkw.serializeBinaryToWriter + ); + } + f = message.getOnchainFeeEstimates(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cln.FeeratesOnchain_fee_estimates.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string warning_missing_feerates = 1; + * @return {string} + */ +proto.cln.FeeratesResponse.prototype.getWarningMissingFeerates = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.FeeratesResponse} returns this + */ +proto.cln.FeeratesResponse.prototype.setWarningMissingFeerates = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesResponse} returns this + */ +proto.cln.FeeratesResponse.prototype.clearWarningMissingFeerates = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesResponse.prototype.hasWarningMissingFeerates = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional FeeratesPerkb perkb = 2; + * @return {?proto.cln.FeeratesPerkb} + */ +proto.cln.FeeratesResponse.prototype.getPerkb = function() { + return /** @type{?proto.cln.FeeratesPerkb} */ ( + jspb.Message.getWrapperField(this, proto.cln.FeeratesPerkb, 2)); +}; + + +/** + * @param {?proto.cln.FeeratesPerkb|undefined} value + * @return {!proto.cln.FeeratesResponse} returns this +*/ +proto.cln.FeeratesResponse.prototype.setPerkb = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FeeratesResponse} returns this + */ +proto.cln.FeeratesResponse.prototype.clearPerkb = function() { + return this.setPerkb(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesResponse.prototype.hasPerkb = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional FeeratesPerkw perkw = 3; + * @return {?proto.cln.FeeratesPerkw} + */ +proto.cln.FeeratesResponse.prototype.getPerkw = function() { + return /** @type{?proto.cln.FeeratesPerkw} */ ( + jspb.Message.getWrapperField(this, proto.cln.FeeratesPerkw, 3)); +}; + + +/** + * @param {?proto.cln.FeeratesPerkw|undefined} value + * @return {!proto.cln.FeeratesResponse} returns this +*/ +proto.cln.FeeratesResponse.prototype.setPerkw = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FeeratesResponse} returns this + */ +proto.cln.FeeratesResponse.prototype.clearPerkw = function() { + return this.setPerkw(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesResponse.prototype.hasPerkw = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FeeratesOnchain_fee_estimates onchain_fee_estimates = 4; + * @return {?proto.cln.FeeratesOnchain_fee_estimates} + */ +proto.cln.FeeratesResponse.prototype.getOnchainFeeEstimates = function() { + return /** @type{?proto.cln.FeeratesOnchain_fee_estimates} */ ( + jspb.Message.getWrapperField(this, proto.cln.FeeratesOnchain_fee_estimates, 4)); +}; + + +/** + * @param {?proto.cln.FeeratesOnchain_fee_estimates|undefined} value + * @return {!proto.cln.FeeratesResponse} returns this +*/ +proto.cln.FeeratesResponse.prototype.setOnchainFeeEstimates = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FeeratesResponse} returns this + */ +proto.cln.FeeratesResponse.prototype.clearOnchainFeeEstimates = function() { + return this.setOnchainFeeEstimates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesResponse.prototype.hasOnchainFeeEstimates = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.FeeratesPerkb.repeatedFields_ = [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.cln.FeeratesPerkb.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesPerkb.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesPerkb} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkb.toObject = function(includeInstance, msg) { + var f, obj = { + minAcceptable: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAcceptable: jspb.Message.getFieldWithDefault(msg, 2, 0), + floor: jspb.Message.getFieldWithDefault(msg, 10, 0), + estimatesList: jspb.Message.toObjectList(msg.getEstimatesList(), + proto.cln.FeeratesPerkbEstimates.toObject, includeInstance), + opening: jspb.Message.getFieldWithDefault(msg, 3, 0), + mutualClose: jspb.Message.getFieldWithDefault(msg, 4, 0), + unilateralClose: jspb.Message.getFieldWithDefault(msg, 5, 0), + delayedToUs: jspb.Message.getFieldWithDefault(msg, 6, 0), + htlcResolution: jspb.Message.getFieldWithDefault(msg, 7, 0), + penalty: 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.cln.FeeratesPerkb} + */ +proto.cln.FeeratesPerkb.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesPerkb; + return proto.cln.FeeratesPerkb.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesPerkb} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesPerkb} + */ +proto.cln.FeeratesPerkb.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.setMinAcceptable(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptable(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFloor(value); + break; + case 9: + var value = new proto.cln.FeeratesPerkbEstimates; + reader.readMessage(value,proto.cln.FeeratesPerkbEstimates.deserializeBinaryFromReader); + msg.addEstimates(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOpening(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMutualClose(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setUnilateralClose(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDelayedToUs(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHtlcResolution(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPenalty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesPerkb.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesPerkb.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesPerkb} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkb.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinAcceptable(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMaxAcceptable(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint32( + 10, + f + ); + } + f = message.getEstimatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.cln.FeeratesPerkbEstimates.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } +}; + + +/** + * optional uint32 min_acceptable = 1; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getMinAcceptable = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setMinAcceptable = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 max_acceptable = 2; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getMaxAcceptable = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setMaxAcceptable = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 floor = 10; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getFloor = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setFloor = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearFloor = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasFloor = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * repeated FeeratesPerkbEstimates estimates = 9; + * @return {!Array} + */ +proto.cln.FeeratesPerkb.prototype.getEstimatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.FeeratesPerkbEstimates, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.FeeratesPerkb} returns this +*/ +proto.cln.FeeratesPerkb.prototype.setEstimatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cln.FeeratesPerkbEstimates=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.FeeratesPerkbEstimates} + */ +proto.cln.FeeratesPerkb.prototype.addEstimates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cln.FeeratesPerkbEstimates, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearEstimatesList = function() { + return this.setEstimatesList([]); +}; + + +/** + * optional uint32 opening = 3; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getOpening = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setOpening = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearOpening = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasOpening = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 mutual_close = 4; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getMutualClose = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setMutualClose = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearMutualClose = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasMutualClose = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 unilateral_close = 5; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getUnilateralClose = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setUnilateralClose = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearUnilateralClose = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasUnilateralClose = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 delayed_to_us = 6; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getDelayedToUs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setDelayedToUs = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearDelayedToUs = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasDelayedToUs = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint32 htlc_resolution = 7; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getHtlcResolution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setHtlcResolution = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearHtlcResolution = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasHtlcResolution = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint32 penalty = 8; + * @return {number} + */ +proto.cln.FeeratesPerkb.prototype.getPenalty = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.setPenalty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkb} returns this + */ +proto.cln.FeeratesPerkb.prototype.clearPenalty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkb.prototype.hasPenalty = 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.cln.FeeratesPerkbEstimates.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesPerkbEstimates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesPerkbEstimates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkbEstimates.toObject = function(includeInstance, msg) { + var f, obj = { + blockcount: jspb.Message.getFieldWithDefault(msg, 1, 0), + feerate: jspb.Message.getFieldWithDefault(msg, 2, 0), + smoothedFeerate: 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.cln.FeeratesPerkbEstimates} + */ +proto.cln.FeeratesPerkbEstimates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesPerkbEstimates; + return proto.cln.FeeratesPerkbEstimates.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesPerkbEstimates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesPerkbEstimates} + */ +proto.cln.FeeratesPerkbEstimates.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.setBlockcount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSmoothedFeerate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesPerkbEstimates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesPerkbEstimates.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesPerkbEstimates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkbEstimates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional uint32 blockcount = 1; + * @return {number} + */ +proto.cln.FeeratesPerkbEstimates.prototype.getBlockcount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkbEstimates} returns this + */ +proto.cln.FeeratesPerkbEstimates.prototype.setBlockcount = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkbEstimates} returns this + */ +proto.cln.FeeratesPerkbEstimates.prototype.clearBlockcount = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkbEstimates.prototype.hasBlockcount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 feerate = 2; + * @return {number} + */ +proto.cln.FeeratesPerkbEstimates.prototype.getFeerate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkbEstimates} returns this + */ +proto.cln.FeeratesPerkbEstimates.prototype.setFeerate = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkbEstimates} returns this + */ +proto.cln.FeeratesPerkbEstimates.prototype.clearFeerate = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkbEstimates.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 smoothed_feerate = 3; + * @return {number} + */ +proto.cln.FeeratesPerkbEstimates.prototype.getSmoothedFeerate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkbEstimates} returns this + */ +proto.cln.FeeratesPerkbEstimates.prototype.setSmoothedFeerate = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkbEstimates} returns this + */ +proto.cln.FeeratesPerkbEstimates.prototype.clearSmoothedFeerate = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkbEstimates.prototype.hasSmoothedFeerate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.FeeratesPerkw.repeatedFields_ = [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.cln.FeeratesPerkw.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesPerkw.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesPerkw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkw.toObject = function(includeInstance, msg) { + var f, obj = { + minAcceptable: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAcceptable: jspb.Message.getFieldWithDefault(msg, 2, 0), + floor: jspb.Message.getFieldWithDefault(msg, 10, 0), + estimatesList: jspb.Message.toObjectList(msg.getEstimatesList(), + proto.cln.FeeratesPerkwEstimates.toObject, includeInstance), + opening: jspb.Message.getFieldWithDefault(msg, 3, 0), + mutualClose: jspb.Message.getFieldWithDefault(msg, 4, 0), + unilateralClose: jspb.Message.getFieldWithDefault(msg, 5, 0), + delayedToUs: jspb.Message.getFieldWithDefault(msg, 6, 0), + htlcResolution: jspb.Message.getFieldWithDefault(msg, 7, 0), + penalty: 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.cln.FeeratesPerkw} + */ +proto.cln.FeeratesPerkw.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesPerkw; + return proto.cln.FeeratesPerkw.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesPerkw} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesPerkw} + */ +proto.cln.FeeratesPerkw.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.setMinAcceptable(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxAcceptable(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFloor(value); + break; + case 9: + var value = new proto.cln.FeeratesPerkwEstimates; + reader.readMessage(value,proto.cln.FeeratesPerkwEstimates.deserializeBinaryFromReader); + msg.addEstimates(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOpening(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMutualClose(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setUnilateralClose(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDelayedToUs(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHtlcResolution(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPenalty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesPerkw.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesPerkw.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesPerkw} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkw.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinAcceptable(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMaxAcceptable(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint32( + 10, + f + ); + } + f = message.getEstimatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.cln.FeeratesPerkwEstimates.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } +}; + + +/** + * optional uint32 min_acceptable = 1; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getMinAcceptable = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setMinAcceptable = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 max_acceptable = 2; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getMaxAcceptable = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setMaxAcceptable = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 floor = 10; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getFloor = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setFloor = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearFloor = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasFloor = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * repeated FeeratesPerkwEstimates estimates = 9; + * @return {!Array} + */ +proto.cln.FeeratesPerkw.prototype.getEstimatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.FeeratesPerkwEstimates, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.FeeratesPerkw} returns this +*/ +proto.cln.FeeratesPerkw.prototype.setEstimatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cln.FeeratesPerkwEstimates=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.FeeratesPerkwEstimates} + */ +proto.cln.FeeratesPerkw.prototype.addEstimates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cln.FeeratesPerkwEstimates, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearEstimatesList = function() { + return this.setEstimatesList([]); +}; + + +/** + * optional uint32 opening = 3; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getOpening = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setOpening = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearOpening = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasOpening = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 mutual_close = 4; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getMutualClose = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setMutualClose = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearMutualClose = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasMutualClose = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 unilateral_close = 5; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getUnilateralClose = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setUnilateralClose = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearUnilateralClose = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasUnilateralClose = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 delayed_to_us = 6; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getDelayedToUs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setDelayedToUs = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearDelayedToUs = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasDelayedToUs = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint32 htlc_resolution = 7; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getHtlcResolution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setHtlcResolution = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearHtlcResolution = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasHtlcResolution = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint32 penalty = 8; + * @return {number} + */ +proto.cln.FeeratesPerkw.prototype.getPenalty = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.setPenalty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkw} returns this + */ +proto.cln.FeeratesPerkw.prototype.clearPenalty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkw.prototype.hasPenalty = 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.cln.FeeratesPerkwEstimates.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesPerkwEstimates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesPerkwEstimates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkwEstimates.toObject = function(includeInstance, msg) { + var f, obj = { + blockcount: jspb.Message.getFieldWithDefault(msg, 1, 0), + feerate: jspb.Message.getFieldWithDefault(msg, 2, 0), + smoothedFeerate: 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.cln.FeeratesPerkwEstimates} + */ +proto.cln.FeeratesPerkwEstimates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesPerkwEstimates; + return proto.cln.FeeratesPerkwEstimates.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesPerkwEstimates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesPerkwEstimates} + */ +proto.cln.FeeratesPerkwEstimates.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.setBlockcount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSmoothedFeerate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesPerkwEstimates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesPerkwEstimates.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesPerkwEstimates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesPerkwEstimates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional uint32 blockcount = 1; + * @return {number} + */ +proto.cln.FeeratesPerkwEstimates.prototype.getBlockcount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkwEstimates} returns this + */ +proto.cln.FeeratesPerkwEstimates.prototype.setBlockcount = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkwEstimates} returns this + */ +proto.cln.FeeratesPerkwEstimates.prototype.clearBlockcount = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkwEstimates.prototype.hasBlockcount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 feerate = 2; + * @return {number} + */ +proto.cln.FeeratesPerkwEstimates.prototype.getFeerate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkwEstimates} returns this + */ +proto.cln.FeeratesPerkwEstimates.prototype.setFeerate = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkwEstimates} returns this + */ +proto.cln.FeeratesPerkwEstimates.prototype.clearFeerate = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkwEstimates.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 smoothed_feerate = 3; + * @return {number} + */ +proto.cln.FeeratesPerkwEstimates.prototype.getSmoothedFeerate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesPerkwEstimates} returns this + */ +proto.cln.FeeratesPerkwEstimates.prototype.setSmoothedFeerate = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FeeratesPerkwEstimates} returns this + */ +proto.cln.FeeratesPerkwEstimates.prototype.clearSmoothedFeerate = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FeeratesPerkwEstimates.prototype.hasSmoothedFeerate = 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.cln.FeeratesOnchain_fee_estimates.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FeeratesOnchain_fee_estimates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FeeratesOnchain_fee_estimates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesOnchain_fee_estimates.toObject = function(includeInstance, msg) { + var f, obj = { + openingChannelSatoshis: jspb.Message.getFieldWithDefault(msg, 1, 0), + mutualCloseSatoshis: jspb.Message.getFieldWithDefault(msg, 2, 0), + unilateralCloseSatoshis: jspb.Message.getFieldWithDefault(msg, 3, 0), + htlcTimeoutSatoshis: jspb.Message.getFieldWithDefault(msg, 4, 0), + htlcSuccessSatoshis: 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.cln.FeeratesOnchain_fee_estimates} + */ +proto.cln.FeeratesOnchain_fee_estimates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FeeratesOnchain_fee_estimates; + return proto.cln.FeeratesOnchain_fee_estimates.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FeeratesOnchain_fee_estimates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FeeratesOnchain_fee_estimates} + */ +proto.cln.FeeratesOnchain_fee_estimates.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.setOpeningChannelSatoshis(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMutualCloseSatoshis(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUnilateralCloseSatoshis(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcTimeoutSatoshis(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHtlcSuccessSatoshis(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FeeratesOnchain_fee_estimates.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FeeratesOnchain_fee_estimates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FeeratesOnchain_fee_estimates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpeningChannelSatoshis(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getMutualCloseSatoshis(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getUnilateralCloseSatoshis(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getHtlcTimeoutSatoshis(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getHtlcSuccessSatoshis(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional uint64 opening_channel_satoshis = 1; + * @return {number} + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.getOpeningChannelSatoshis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesOnchain_fee_estimates} returns this + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.setOpeningChannelSatoshis = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 mutual_close_satoshis = 2; + * @return {number} + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.getMutualCloseSatoshis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesOnchain_fee_estimates} returns this + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.setMutualCloseSatoshis = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 unilateral_close_satoshis = 3; + * @return {number} + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.getUnilateralCloseSatoshis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesOnchain_fee_estimates} returns this + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.setUnilateralCloseSatoshis = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 htlc_timeout_satoshis = 4; + * @return {number} + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.getHtlcTimeoutSatoshis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesOnchain_fee_estimates} returns this + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.setHtlcTimeoutSatoshis = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 htlc_success_satoshis = 5; + * @return {number} + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.getHtlcSuccessSatoshis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FeeratesOnchain_fee_estimates} returns this + */ +proto.cln.FeeratesOnchain_fee_estimates.prototype.setHtlcSuccessSatoshis = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.FundchannelRequest.repeatedFields_ = [11]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.FundchannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FundchannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FundchannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundchannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + amount: (f = msg.getAmount()) && cln_primitives_pb.AmountOrAll.toObject(includeInstance, f), + feerate: (f = msg.getFeerate()) && cln_primitives_pb.Feerate.toObject(includeInstance, f), + announce: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + minconf: jspb.Message.getFieldWithDefault(msg, 10, 0), + pushMsat: (f = msg.getPushMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + closeTo: jspb.Message.getFieldWithDefault(msg, 6, ""), + requestAmt: (f = msg.getRequestAmt()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + compactLease: jspb.Message.getFieldWithDefault(msg, 8, ""), + utxosList: jspb.Message.toObjectList(msg.getUtxosList(), + cln_primitives_pb.Outpoint.toObject, includeInstance), + mindepth: jspb.Message.getFieldWithDefault(msg, 12, 0), + reserve: (f = msg.getReserve()) && cln_primitives_pb.Amount.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.FundchannelRequest} + */ +proto.cln.FundchannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FundchannelRequest; + return proto.cln.FundchannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FundchannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FundchannelRequest} + */ +proto.cln.FundchannelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); + break; + case 1: + var value = new cln_primitives_pb.AmountOrAll; + reader.readMessage(value,cln_primitives_pb.AmountOrAll.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 2: + var value = new cln_primitives_pb.Feerate; + reader.readMessage(value,cln_primitives_pb.Feerate.deserializeBinaryFromReader); + msg.setFeerate(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAnnounce(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMinconf(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setPushMsat(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setCloseTo(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setRequestAmt(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setCompactLease(value); + break; + case 11: + var value = new cln_primitives_pb.Outpoint; + reader.readMessage(value,cln_primitives_pb.Outpoint.deserializeBinaryFromReader); + msg.addUtxos(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMindepth(value); + break; + case 13: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setReserve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FundchannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FundchannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FundchannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundchannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 1, + f, + cln_primitives_pb.AmountOrAll.serializeBinaryToWriter + ); + } + f = message.getFeerate(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Feerate.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint32( + 10, + f + ); + } + f = message.getPushMsat(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getRequestAmt(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = message.getUtxosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + cln_primitives_pb.Outpoint.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeUint32( + 12, + f + ); + } + f = message.getReserve(); + if (f != null) { + writer.writeMessage( + 13, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes id = 9; + * @return {!(string|Uint8Array)} + */ +proto.cln.FundchannelRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes id = 9; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.FundchannelRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.FundchannelRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional AmountOrAll amount = 1; + * @return {?proto.cln.AmountOrAll} + */ +proto.cln.FundchannelRequest.prototype.getAmount = function() { + return /** @type{?proto.cln.AmountOrAll} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.AmountOrAll, 1)); +}; + + +/** + * @param {?proto.cln.AmountOrAll|undefined} value + * @return {!proto.cln.FundchannelRequest} returns this +*/ +proto.cln.FundchannelRequest.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasAmount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Feerate feerate = 2; + * @return {?proto.cln.Feerate} + */ +proto.cln.FundchannelRequest.prototype.getFeerate = function() { + return /** @type{?proto.cln.Feerate} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Feerate, 2)); +}; + + +/** + * @param {?proto.cln.Feerate|undefined} value + * @return {!proto.cln.FundchannelRequest} returns this +*/ +proto.cln.FundchannelRequest.prototype.setFeerate = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearFeerate = function() { + return this.setFeerate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasFeerate = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool announce = 3; + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.getAnnounce = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.setAnnounce = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearAnnounce = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasAnnounce = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 minconf = 10; + * @return {number} + */ +proto.cln.FundchannelRequest.prototype.getMinconf = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.setMinconf = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearMinconf = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasMinconf = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional Amount push_msat = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.FundchannelRequest.prototype.getPushMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.FundchannelRequest} returns this +*/ +proto.cln.FundchannelRequest.prototype.setPushMsat = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearPushMsat = function() { + return this.setPushMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasPushMsat = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string close_to = 6; + * @return {string} + */ +proto.cln.FundchannelRequest.prototype.getCloseTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.setCloseTo = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearCloseTo = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasCloseTo = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional Amount request_amt = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.FundchannelRequest.prototype.getRequestAmt = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.FundchannelRequest} returns this +*/ +proto.cln.FundchannelRequest.prototype.setRequestAmt = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearRequestAmt = function() { + return this.setRequestAmt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasRequestAmt = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string compact_lease = 8; + * @return {string} + */ +proto.cln.FundchannelRequest.prototype.getCompactLease = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.setCompactLease = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearCompactLease = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasCompactLease = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated Outpoint utxos = 11; + * @return {!Array} + */ +proto.cln.FundchannelRequest.prototype.getUtxosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cln_primitives_pb.Outpoint, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.FundchannelRequest} returns this +*/ +proto.cln.FundchannelRequest.prototype.setUtxosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.cln.Outpoint=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.Outpoint} + */ +proto.cln.FundchannelRequest.prototype.addUtxos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.cln.Outpoint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearUtxosList = function() { + return this.setUtxosList([]); +}; + + +/** + * optional uint32 mindepth = 12; + * @return {number} + */ +proto.cln.FundchannelRequest.prototype.getMindepth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.setMindepth = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearMindepth = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasMindepth = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional Amount reserve = 13; + * @return {?proto.cln.Amount} + */ +proto.cln.FundchannelRequest.prototype.getReserve = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 13)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.FundchannelRequest} returns this +*/ +proto.cln.FundchannelRequest.prototype.setReserve = function(value) { + return jspb.Message.setWrapperField(this, 13, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.FundchannelRequest} returns this + */ +proto.cln.FundchannelRequest.prototype.clearReserve = function() { + return this.setReserve(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelRequest.prototype.hasReserve = function() { + return jspb.Message.getField(this, 13) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.FundchannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.FundchannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.FundchannelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundchannelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: msg.getTx_asB64(), + txid: msg.getTxid_asB64(), + outnum: jspb.Message.getFieldWithDefault(msg, 3, 0), + channelId: msg.getChannelId_asB64(), + closeTo: msg.getCloseTo_asB64(), + mindepth: 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.cln.FundchannelResponse} + */ +proto.cln.FundchannelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.FundchannelResponse; + return proto.cln.FundchannelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.FundchannelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.FundchannelResponse} + */ +proto.cln.FundchannelResponse.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 {!Uint8Array} */ (reader.readBytes()); + msg.setTxid(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutnum(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannelId(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCloseTo(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMindepth(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.FundchannelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.FundchannelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.FundchannelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.FundchannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getOutnum(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getChannelId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.FundchannelResponse.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.cln.FundchannelResponse.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.cln.FundchannelResponse.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes txid = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.FundchannelResponse.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes txid = 2; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.FundchannelResponse.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.FundchannelResponse.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional uint32 outnum = 3; + * @return {number} + */ +proto.cln.FundchannelResponse.prototype.getOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.setOutnum = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes channel_id = 4; + * @return {!(string|Uint8Array)} + */ +proto.cln.FundchannelResponse.prototype.getChannelId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes channel_id = 4; + * This is a type-conversion wrapper around `getChannelId()` + * @return {string} + */ +proto.cln.FundchannelResponse.prototype.getChannelId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannelId())); +}; + + +/** + * optional bytes channel_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannelId()` + * @return {!Uint8Array} + */ +proto.cln.FundchannelResponse.prototype.getChannelId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannelId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.setChannelId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes close_to = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.FundchannelResponse.prototype.getCloseTo = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes close_to = 5; + * This is a type-conversion wrapper around `getCloseTo()` + * @return {string} + */ +proto.cln.FundchannelResponse.prototype.getCloseTo_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCloseTo())); +}; + + +/** + * optional bytes close_to = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getCloseTo()` + * @return {!Uint8Array} + */ +proto.cln.FundchannelResponse.prototype.getCloseTo_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCloseTo())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.setCloseTo = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.clearCloseTo = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelResponse.prototype.hasCloseTo = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 mindepth = 6; + * @return {number} + */ +proto.cln.FundchannelResponse.prototype.getMindepth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.setMindepth = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.FundchannelResponse} returns this + */ +proto.cln.FundchannelResponse.prototype.clearMindepth = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.FundchannelResponse.prototype.hasMindepth = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.GetrouteRequest.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.cln.GetrouteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetrouteRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetrouteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetrouteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + riskfactor: jspb.Message.getFieldWithDefault(msg, 3, 0), + cltv: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + fromid: msg.getFromid_asB64(), + fuzzpercent: jspb.Message.getFieldWithDefault(msg, 6, 0), + excludeList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + maxhops: 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.cln.GetrouteRequest} + */ +proto.cln.GetrouteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetrouteRequest; + return proto.cln.GetrouteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetrouteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetrouteRequest} + */ +proto.cln.GetrouteRequest.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.setId(value); + break; + case 9: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRiskfactor(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setCltv(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFromid(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFuzzpercent(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.addExclude(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxhops(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetrouteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetrouteRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetrouteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetrouteRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 9, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getRiskfactor(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } + f = message.getExcludeList(); + if (f.length > 0) { + writer.writeRepeatedString( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetrouteRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.GetrouteRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.GetrouteRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Amount amount_msat = 9; + * @return {?proto.cln.Amount} + */ +proto.cln.GetrouteRequest.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 9)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.GetrouteRequest} returns this +*/ +proto.cln.GetrouteRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetrouteRequest.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional uint64 riskfactor = 3; + * @return {number} + */ +proto.cln.GetrouteRequest.prototype.getRiskfactor = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setRiskfactor = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional double cltv = 4; + * @return {number} + */ +proto.cln.GetrouteRequest.prototype.getCltv = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setCltv = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.clearCltv = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetrouteRequest.prototype.hasCltv = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes fromid = 5; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetrouteRequest.prototype.getFromid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes fromid = 5; + * This is a type-conversion wrapper around `getFromid()` + * @return {string} + */ +proto.cln.GetrouteRequest.prototype.getFromid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFromid())); +}; + + +/** + * optional bytes fromid = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFromid()` + * @return {!Uint8Array} + */ +proto.cln.GetrouteRequest.prototype.getFromid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFromid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setFromid = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.clearFromid = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetrouteRequest.prototype.hasFromid = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 fuzzpercent = 6; + * @return {number} + */ +proto.cln.GetrouteRequest.prototype.getFuzzpercent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setFuzzpercent = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.clearFuzzpercent = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetrouteRequest.prototype.hasFuzzpercent = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated string exclude = 7; + * @return {!Array} + */ +proto.cln.GetrouteRequest.prototype.getExcludeList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setExcludeList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.addExclude = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.clearExcludeList = function() { + return this.setExcludeList([]); +}; + + +/** + * optional uint32 maxhops = 8; + * @return {number} + */ +proto.cln.GetrouteRequest.prototype.getMaxhops = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.setMaxhops = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.GetrouteRequest} returns this + */ +proto.cln.GetrouteRequest.prototype.clearMaxhops = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetrouteRequest.prototype.hasMaxhops = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.GetrouteResponse.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.cln.GetrouteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetrouteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetrouteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetrouteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + routeList: jspb.Message.toObjectList(msg.getRouteList(), + proto.cln.GetrouteRoute.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.cln.GetrouteResponse} + */ +proto.cln.GetrouteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetrouteResponse; + return proto.cln.GetrouteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetrouteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetrouteResponse} + */ +proto.cln.GetrouteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.GetrouteRoute; + reader.readMessage(value,proto.cln.GetrouteRoute.deserializeBinaryFromReader); + msg.addRoute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetrouteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetrouteResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetrouteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetrouteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRouteList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.GetrouteRoute.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated GetrouteRoute route = 1; + * @return {!Array} + */ +proto.cln.GetrouteResponse.prototype.getRouteList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.GetrouteRoute, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.GetrouteResponse} returns this +*/ +proto.cln.GetrouteResponse.prototype.setRouteList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.GetrouteRoute=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.GetrouteRoute} + */ +proto.cln.GetrouteResponse.prototype.addRoute = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.GetrouteRoute, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.GetrouteResponse} returns this + */ +proto.cln.GetrouteResponse.prototype.clearRouteList = function() { + return this.setRouteList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.GetrouteRoute.prototype.toObject = function(opt_includeInstance) { + return proto.cln.GetrouteRoute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.GetrouteRoute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetrouteRoute.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + channel: jspb.Message.getFieldWithDefault(msg, 2, ""), + direction: jspb.Message.getFieldWithDefault(msg, 3, 0), + amountMsat: (f = msg.getAmountMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + delay: jspb.Message.getFieldWithDefault(msg, 5, 0), + style: 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.cln.GetrouteRoute} + */ +proto.cln.GetrouteRoute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.GetrouteRoute; + return proto.cln.GetrouteRoute.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.GetrouteRoute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.GetrouteRoute} + */ +proto.cln.GetrouteRoute.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChannel(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDirection(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setAmountMsat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDelay(value); + break; + case 6: + var value = /** @type {!proto.cln.GetrouteRoute.GetrouteRouteStyle} */ (reader.readEnum()); + msg.setStyle(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.GetrouteRoute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.GetrouteRoute.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.GetrouteRoute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.GetrouteRoute.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChannel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDirection(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getAmountMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getDelay(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getStyle(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.GetrouteRoute.GetrouteRouteStyle = { + TLV: 0 +}; + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.GetrouteRoute.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.GetrouteRoute.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.GetrouteRoute.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.GetrouteRoute} returns this + */ +proto.cln.GetrouteRoute.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string channel = 2; + * @return {string} + */ +proto.cln.GetrouteRoute.prototype.getChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.GetrouteRoute} returns this + */ +proto.cln.GetrouteRoute.prototype.setChannel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 direction = 3; + * @return {number} + */ +proto.cln.GetrouteRoute.prototype.getDirection = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetrouteRoute} returns this + */ +proto.cln.GetrouteRoute.prototype.setDirection = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional Amount amount_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.GetrouteRoute.prototype.getAmountMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.GetrouteRoute} returns this +*/ +proto.cln.GetrouteRoute.prototype.setAmountMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.GetrouteRoute} returns this + */ +proto.cln.GetrouteRoute.prototype.clearAmountMsat = function() { + return this.setAmountMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.GetrouteRoute.prototype.hasAmountMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 delay = 5; + * @return {number} + */ +proto.cln.GetrouteRoute.prototype.getDelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.GetrouteRoute} returns this + */ +proto.cln.GetrouteRoute.prototype.setDelay = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional GetrouteRouteStyle style = 6; + * @return {!proto.cln.GetrouteRoute.GetrouteRouteStyle} + */ +proto.cln.GetrouteRoute.prototype.getStyle = function() { + return /** @type {!proto.cln.GetrouteRoute.GetrouteRouteStyle} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.cln.GetrouteRoute.GetrouteRouteStyle} value + * @return {!proto.cln.GetrouteRoute} returns this + */ +proto.cln.GetrouteRoute.prototype.setStyle = function(value) { + return jspb.Message.setProto3EnumField(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.cln.ListforwardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListforwardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListforwardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListforwardsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + inChannel: jspb.Message.getFieldWithDefault(msg, 2, ""), + outChannel: 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.cln.ListforwardsRequest} + */ +proto.cln.ListforwardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListforwardsRequest; + return proto.cln.ListforwardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListforwardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListforwardsRequest} + */ +proto.cln.ListforwardsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cln.ListforwardsRequest.ListforwardsStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInChannel(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutChannel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListforwardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListforwardsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListforwardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListforwardsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.cln.ListforwardsRequest.ListforwardsStatus} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 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 + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListforwardsRequest.ListforwardsStatus = { + OFFERED: 0, + SETTLED: 1, + LOCAL_FAILED: 2, + FAILED: 3 +}; + +/** + * optional ListforwardsStatus status = 1; + * @return {!proto.cln.ListforwardsRequest.ListforwardsStatus} + */ +proto.cln.ListforwardsRequest.prototype.getStatus = function() { + return /** @type {!proto.cln.ListforwardsRequest.ListforwardsStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cln.ListforwardsRequest.ListforwardsStatus} value + * @return {!proto.cln.ListforwardsRequest} returns this + */ +proto.cln.ListforwardsRequest.prototype.setStatus = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsRequest} returns this + */ +proto.cln.ListforwardsRequest.prototype.clearStatus = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsRequest.prototype.hasStatus = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string in_channel = 2; + * @return {string} + */ +proto.cln.ListforwardsRequest.prototype.getInChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListforwardsRequest} returns this + */ +proto.cln.ListforwardsRequest.prototype.setInChannel = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsRequest} returns this + */ +proto.cln.ListforwardsRequest.prototype.clearInChannel = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsRequest.prototype.hasInChannel = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string out_channel = 3; + * @return {string} + */ +proto.cln.ListforwardsRequest.prototype.getOutChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListforwardsRequest} returns this + */ +proto.cln.ListforwardsRequest.prototype.setOutChannel = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsRequest} returns this + */ +proto.cln.ListforwardsRequest.prototype.clearOutChannel = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsRequest.prototype.hasOutChannel = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListforwardsResponse.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.cln.ListforwardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListforwardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListforwardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListforwardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + forwardsList: jspb.Message.toObjectList(msg.getForwardsList(), + proto.cln.ListforwardsForwards.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.cln.ListforwardsResponse} + */ +proto.cln.ListforwardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListforwardsResponse; + return proto.cln.ListforwardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListforwardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListforwardsResponse} + */ +proto.cln.ListforwardsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListforwardsForwards; + reader.readMessage(value,proto.cln.ListforwardsForwards.deserializeBinaryFromReader); + msg.addForwards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListforwardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListforwardsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListforwardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListforwardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getForwardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListforwardsForwards.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListforwardsForwards forwards = 1; + * @return {!Array} + */ +proto.cln.ListforwardsResponse.prototype.getForwardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListforwardsForwards, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListforwardsResponse} returns this +*/ +proto.cln.ListforwardsResponse.prototype.setForwardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListforwardsForwards=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListforwardsForwards} + */ +proto.cln.ListforwardsResponse.prototype.addForwards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListforwardsForwards, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListforwardsResponse} returns this + */ +proto.cln.ListforwardsResponse.prototype.clearForwardsList = function() { + return this.setForwardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListforwardsForwards.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListforwardsForwards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListforwardsForwards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListforwardsForwards.toObject = function(includeInstance, msg) { + var f, obj = { + inChannel: jspb.Message.getFieldWithDefault(msg, 1, ""), + inHtlcId: jspb.Message.getFieldWithDefault(msg, 10, 0), + inMsat: (f = msg.getInMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + receivedTime: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + outChannel: jspb.Message.getFieldWithDefault(msg, 5, ""), + outHtlcId: jspb.Message.getFieldWithDefault(msg, 11, 0), + style: jspb.Message.getFieldWithDefault(msg, 9, 0), + feeMsat: (f = msg.getFeeMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + outMsat: (f = msg.getOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ListforwardsForwards} + */ +proto.cln.ListforwardsForwards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListforwardsForwards; + return proto.cln.ListforwardsForwards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListforwardsForwards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListforwardsForwards} + */ +proto.cln.ListforwardsForwards.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setInChannel(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInHtlcId(value); + break; + case 2: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setInMsat(value); + break; + case 3: + var value = /** @type {!proto.cln.ListforwardsForwards.ListforwardsForwardsStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setReceivedTime(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOutChannel(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutHtlcId(value); + break; + case 9: + var value = /** @type {!proto.cln.ListforwardsForwards.ListforwardsForwardsStyle} */ (reader.readEnum()); + msg.setStyle(value); + break; + case 7: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeeMsat(value); + break; + case 8: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setOutMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListforwardsForwards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListforwardsForwards.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListforwardsForwards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListforwardsForwards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInChannel(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint64( + 10, + f + ); + } + f = message.getInMsat(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getReceivedTime(); + if (f !== 0.0) { + writer.writeDouble( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeUint64( + 11, + f + ); + } + f = /** @type {!proto.cln.ListforwardsForwards.ListforwardsForwardsStyle} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeEnum( + 9, + f + ); + } + f = message.getFeeMsat(); + if (f != null) { + writer.writeMessage( + 7, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getOutMsat(); + if (f != null) { + writer.writeMessage( + 8, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListforwardsForwards.ListforwardsForwardsStatus = { + OFFERED: 0, + SETTLED: 1, + LOCAL_FAILED: 2, + FAILED: 3 +}; + +/** + * @enum {number} + */ +proto.cln.ListforwardsForwards.ListforwardsForwardsStyle = { + LEGACY: 0, + TLV: 1 +}; + +/** + * optional string in_channel = 1; + * @return {string} + */ +proto.cln.ListforwardsForwards.prototype.getInChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setInChannel = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 in_htlc_id = 10; + * @return {number} + */ +proto.cln.ListforwardsForwards.prototype.getInHtlcId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setInHtlcId = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearInHtlcId = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasInHtlcId = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional Amount in_msat = 2; + * @return {?proto.cln.Amount} + */ +proto.cln.ListforwardsForwards.prototype.getInMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 2)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListforwardsForwards} returns this +*/ +proto.cln.ListforwardsForwards.prototype.setInMsat = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearInMsat = function() { + return this.setInMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasInMsat = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ListforwardsForwardsStatus status = 3; + * @return {!proto.cln.ListforwardsForwards.ListforwardsForwardsStatus} + */ +proto.cln.ListforwardsForwards.prototype.getStatus = function() { + return /** @type {!proto.cln.ListforwardsForwards.ListforwardsForwardsStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.ListforwardsForwards.ListforwardsForwardsStatus} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional double received_time = 4; + * @return {number} + */ +proto.cln.ListforwardsForwards.prototype.getReceivedTime = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setReceivedTime = function(value) { + return jspb.Message.setProto3FloatField(this, 4, value); +}; + + +/** + * optional string out_channel = 5; + * @return {string} + */ +proto.cln.ListforwardsForwards.prototype.getOutChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setOutChannel = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearOutChannel = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasOutChannel = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint64 out_htlc_id = 11; + * @return {number} + */ +proto.cln.ListforwardsForwards.prototype.getOutHtlcId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setOutHtlcId = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearOutHtlcId = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasOutHtlcId = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ListforwardsForwardsStyle style = 9; + * @return {!proto.cln.ListforwardsForwards.ListforwardsForwardsStyle} + */ +proto.cln.ListforwardsForwards.prototype.getStyle = function() { + return /** @type {!proto.cln.ListforwardsForwards.ListforwardsForwardsStyle} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.cln.ListforwardsForwards.ListforwardsForwardsStyle} value + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.setStyle = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearStyle = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasStyle = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Amount fee_msat = 7; + * @return {?proto.cln.Amount} + */ +proto.cln.ListforwardsForwards.prototype.getFeeMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 7)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListforwardsForwards} returns this +*/ +proto.cln.ListforwardsForwards.prototype.setFeeMsat = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearFeeMsat = function() { + return this.setFeeMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasFeeMsat = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional Amount out_msat = 8; + * @return {?proto.cln.Amount} + */ +proto.cln.ListforwardsForwards.prototype.getOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 8)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.ListforwardsForwards} returns this +*/ +proto.cln.ListforwardsForwards.prototype.setOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.ListforwardsForwards} returns this + */ +proto.cln.ListforwardsForwards.prototype.clearOutMsat = function() { + return this.setOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListforwardsForwards.prototype.hasOutMsat = 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.cln.ListpaysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpaysRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpaysRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpaysRequest.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentHash: msg.getPaymentHash_asB64(), + status: 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.cln.ListpaysRequest} + */ +proto.cln.ListpaysRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpaysRequest; + return proto.cln.ListpaysRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpaysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpaysRequest} + */ +proto.cln.ListpaysRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPaymentHash(value); + break; + case 3: + var value = /** @type {!proto.cln.ListpaysRequest.ListpaysStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpaysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpaysRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpaysRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpaysRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {!proto.cln.ListpaysRequest.ListpaysStatus} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpaysRequest.ListpaysStatus = { + PENDING: 0, + COMPLETE: 1, + FAILED: 2 +}; + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.cln.ListpaysRequest.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpaysRequest} returns this + */ +proto.cln.ListpaysRequest.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysRequest} returns this + */ +proto.cln.ListpaysRequest.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysRequest.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes payment_hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpaysRequest.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes payment_hash = 2; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListpaysRequest.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListpaysRequest.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpaysRequest} returns this + */ +proto.cln.ListpaysRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysRequest} returns this + */ +proto.cln.ListpaysRequest.prototype.clearPaymentHash = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysRequest.prototype.hasPaymentHash = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ListpaysStatus status = 3; + * @return {!proto.cln.ListpaysRequest.ListpaysStatus} + */ +proto.cln.ListpaysRequest.prototype.getStatus = function() { + return /** @type {!proto.cln.ListpaysRequest.ListpaysStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cln.ListpaysRequest.ListpaysStatus} value + * @return {!proto.cln.ListpaysRequest} returns this + */ +proto.cln.ListpaysRequest.prototype.setStatus = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysRequest} returns this + */ +proto.cln.ListpaysRequest.prototype.clearStatus = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysRequest.prototype.hasStatus = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.ListpaysResponse.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.cln.ListpaysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpaysResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpaysResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpaysResponse.toObject = function(includeInstance, msg) { + var f, obj = { + paysList: jspb.Message.toObjectList(msg.getPaysList(), + proto.cln.ListpaysPays.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.cln.ListpaysResponse} + */ +proto.cln.ListpaysResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpaysResponse; + return proto.cln.ListpaysResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpaysResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpaysResponse} + */ +proto.cln.ListpaysResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.ListpaysPays; + reader.readMessage(value,proto.cln.ListpaysPays.deserializeBinaryFromReader); + msg.addPays(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpaysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpaysResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpaysResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpaysResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.ListpaysPays.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ListpaysPays pays = 1; + * @return {!Array} + */ +proto.cln.ListpaysResponse.prototype.getPaysList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.ListpaysPays, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.ListpaysResponse} returns this +*/ +proto.cln.ListpaysResponse.prototype.setPaysList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.ListpaysPays=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.ListpaysPays} + */ +proto.cln.ListpaysResponse.prototype.addPays = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.ListpaysPays, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.ListpaysResponse} returns this + */ +proto.cln.ListpaysResponse.prototype.clearPaysList = function() { + return this.setPaysList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.ListpaysPays.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ListpaysPays.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ListpaysPays} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpaysPays.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: msg.getPaymentHash_asB64(), + status: jspb.Message.getFieldWithDefault(msg, 2, 0), + destination: msg.getDestination_asB64(), + createdAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + completedAt: jspb.Message.getFieldWithDefault(msg, 12, 0), + label: jspb.Message.getFieldWithDefault(msg, 5, ""), + bolt11: jspb.Message.getFieldWithDefault(msg, 6, ""), + description: jspb.Message.getFieldWithDefault(msg, 11, ""), + bolt12: jspb.Message.getFieldWithDefault(msg, 7, ""), + preimage: msg.getPreimage_asB64(), + numberOfParts: jspb.Message.getFieldWithDefault(msg, 14, 0), + erroronion: msg.getErroronion_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.cln.ListpaysPays} + */ +proto.cln.ListpaysPays.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ListpaysPays; + return proto.cln.ListpaysPays.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ListpaysPays} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ListpaysPays} + */ +proto.cln.ListpaysPays.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.setPaymentHash(value); + break; + case 2: + var value = /** @type {!proto.cln.ListpaysPays.ListpaysPaysStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDestination(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCompletedAt(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt12(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPreimage(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNumberOfParts(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setErroronion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ListpaysPays.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ListpaysPays.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ListpaysPays} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ListpaysPays.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes( + 3, + f + ); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeUint64( + 12, + 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 = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBytes( + 13, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeUint64( + 14, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBytes( + 10, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.cln.ListpaysPays.ListpaysPaysStatus = { + PENDING: 0, + FAILED: 1, + COMPLETE: 2 +}; + +/** + * optional bytes payment_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpaysPays.prototype.getPaymentHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes payment_hash = 1; + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getPaymentHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPaymentHash())); +}; + + +/** + * optional bytes payment_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPaymentHash()` + * @return {!Uint8Array} + */ +proto.cln.ListpaysPays.prototype.getPaymentHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPaymentHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional ListpaysPaysStatus status = 2; + * @return {!proto.cln.ListpaysPays.ListpaysPaysStatus} + */ +proto.cln.ListpaysPays.prototype.getStatus = function() { + return /** @type {!proto.cln.ListpaysPays.ListpaysPaysStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cln.ListpaysPays.ListpaysPaysStatus} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bytes destination = 3; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpaysPays.prototype.getDestination = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes destination = 3; + * This is a type-conversion wrapper around `getDestination()` + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getDestination_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDestination())); +}; + + +/** + * optional bytes destination = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDestination()` + * @return {!Uint8Array} + */ +proto.cln.ListpaysPays.prototype.getDestination_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDestination())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setDestination = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearDestination = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasDestination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 created_at = 4; + * @return {number} + */ +proto.cln.ListpaysPays.prototype.getCreatedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setCreatedAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 completed_at = 12; + * @return {number} + */ +proto.cln.ListpaysPays.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setCompletedAt = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearCompletedAt = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasCompletedAt = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional string label = 5; + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearLabel = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasLabel = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string bolt11 = 6; + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setBolt11 = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearBolt11 = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasBolt11 = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string description = 11; + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearDescription = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasDescription = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string bolt12 = 7; + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getBolt12 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setBolt12 = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearBolt12 = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasBolt12 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bytes preimage = 13; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpaysPays.prototype.getPreimage = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes preimage = 13; + * This is a type-conversion wrapper around `getPreimage()` + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getPreimage_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPreimage())); +}; + + +/** + * optional bytes preimage = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPreimage()` + * @return {!Uint8Array} + */ +proto.cln.ListpaysPays.prototype.getPreimage_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPreimage())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setPreimage = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearPreimage = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasPreimage = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional uint64 number_of_parts = 14; + * @return {number} + */ +proto.cln.ListpaysPays.prototype.getNumberOfParts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setNumberOfParts = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearNumberOfParts = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasNumberOfParts = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional bytes erroronion = 10; + * @return {!(string|Uint8Array)} + */ +proto.cln.ListpaysPays.prototype.getErroronion = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes erroronion = 10; + * This is a type-conversion wrapper around `getErroronion()` + * @return {string} + */ +proto.cln.ListpaysPays.prototype.getErroronion_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getErroronion())); +}; + + +/** + * optional bytes erroronion = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getErroronion()` + * @return {!Uint8Array} + */ +proto.cln.ListpaysPays.prototype.getErroronion_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErroronion())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.setErroronion = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.ListpaysPays} returns this + */ +proto.cln.ListpaysPays.prototype.clearErroronion = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.ListpaysPays.prototype.hasErroronion = function() { + return jspb.Message.getField(this, 10) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.PingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.PingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.PingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + len: jspb.Message.getFieldWithDefault(msg, 2, 0), + pongbytes: 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.cln.PingRequest} + */ +proto.cln.PingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.PingRequest; + return proto.cln.PingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.PingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.PingRequest} + */ +proto.cln.PingRequest.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.setId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLen(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPongbytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.PingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.PingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.PingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.PingRequest.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.PingRequest.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.PingRequest.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.PingRequest} returns this + */ +proto.cln.PingRequest.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 len = 2; + * @return {number} + */ +proto.cln.PingRequest.prototype.getLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PingRequest} returns this + */ +proto.cln.PingRequest.prototype.setLen = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PingRequest} returns this + */ +proto.cln.PingRequest.prototype.clearLen = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PingRequest.prototype.hasLen = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 pongbytes = 3; + * @return {number} + */ +proto.cln.PingRequest.prototype.getPongbytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PingRequest} returns this + */ +proto.cln.PingRequest.prototype.setPongbytes = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.PingRequest} returns this + */ +proto.cln.PingRequest.prototype.clearPongbytes = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.PingRequest.prototype.hasPongbytes = 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.cln.PingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.PingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.PingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + totlen: 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.cln.PingResponse} + */ +proto.cln.PingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.PingResponse; + return proto.cln.PingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.PingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.PingResponse} + */ +proto.cln.PingResponse.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.setTotlen(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.PingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.PingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.PingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.PingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotlen(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } +}; + + +/** + * optional uint32 totlen = 1; + * @return {number} + */ +proto.cln.PingResponse.prototype.getTotlen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.PingResponse} returns this + */ +proto.cln.PingResponse.prototype.setTotlen = 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.cln.SendcustommsgRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendcustommsgRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendcustommsgRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendcustommsgRequest.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: msg.getNodeId_asB64(), + msg: msg.getMsg_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.SendcustommsgRequest} + */ +proto.cln.SendcustommsgRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendcustommsgRequest; + return proto.cln.SendcustommsgRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendcustommsgRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendcustommsgRequest} + */ +proto.cln.SendcustommsgRequest.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.setNodeId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMsg(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendcustommsgRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendcustommsgRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendcustommsgRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendcustommsgRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMsg_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes node_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendcustommsgRequest.prototype.getNodeId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes node_id = 1; + * This is a type-conversion wrapper around `getNodeId()` + * @return {string} + */ +proto.cln.SendcustommsgRequest.prototype.getNodeId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNodeId())); +}; + + +/** + * optional bytes node_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNodeId()` + * @return {!Uint8Array} + */ +proto.cln.SendcustommsgRequest.prototype.getNodeId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNodeId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendcustommsgRequest} returns this + */ +proto.cln.SendcustommsgRequest.prototype.setNodeId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes msg = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SendcustommsgRequest.prototype.getMsg = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes msg = 2; + * This is a type-conversion wrapper around `getMsg()` + * @return {string} + */ +proto.cln.SendcustommsgRequest.prototype.getMsg_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMsg())); +}; + + +/** + * optional bytes msg = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMsg()` + * @return {!Uint8Array} + */ +proto.cln.SendcustommsgRequest.prototype.getMsg_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMsg())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SendcustommsgRequest} returns this + */ +proto.cln.SendcustommsgRequest.prototype.setMsg = 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.cln.SendcustommsgResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SendcustommsgResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SendcustommsgResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendcustommsgResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: 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.cln.SendcustommsgResponse} + */ +proto.cln.SendcustommsgResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SendcustommsgResponse; + return proto.cln.SendcustommsgResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SendcustommsgResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SendcustommsgResponse} + */ +proto.cln.SendcustommsgResponse.deserializeBinaryFromReader = function(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SendcustommsgResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SendcustommsgResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SendcustommsgResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SendcustommsgResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string status = 1; + * @return {string} + */ +proto.cln.SendcustommsgResponse.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SendcustommsgResponse} returns this + */ +proto.cln.SendcustommsgResponse.prototype.setStatus = 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.cln.SetchannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SetchannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SetchannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SetchannelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + feebase: (f = msg.getFeebase()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeppm: jspb.Message.getFieldWithDefault(msg, 3, 0), + htlcmin: (f = msg.getHtlcmin()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + htlcmax: (f = msg.getHtlcmax()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + enforcedelay: 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.cln.SetchannelRequest} + */ +proto.cln.SetchannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SetchannelRequest; + return proto.cln.SetchannelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SetchannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SetchannelRequest} + */ +proto.cln.SetchannelRequest.deserializeBinaryFromReader = function(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 = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeebase(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeppm(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setHtlcmin(value); + break; + case 5: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setHtlcmax(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEnforcedelay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SetchannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SetchannelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SetchannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SetchannelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFeebase(); + if (f != null) { + writer.writeMessage( + 2, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHtlcmin(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getHtlcmax(); + if (f != null) { + writer.writeMessage( + 5, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint32( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.cln.SetchannelRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Amount feebase = 2; + * @return {?proto.cln.Amount} + */ +proto.cln.SetchannelRequest.prototype.getFeebase = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 2)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SetchannelRequest} returns this +*/ +proto.cln.SetchannelRequest.prototype.setFeebase = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.clearFeebase = function() { + return this.setFeebase(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelRequest.prototype.hasFeebase = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 feeppm = 3; + * @return {number} + */ +proto.cln.SetchannelRequest.prototype.getFeeppm = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.setFeeppm = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.clearFeeppm = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelRequest.prototype.hasFeeppm = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount htlcmin = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.SetchannelRequest.prototype.getHtlcmin = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SetchannelRequest} returns this +*/ +proto.cln.SetchannelRequest.prototype.setHtlcmin = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.clearHtlcmin = function() { + return this.setHtlcmin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelRequest.prototype.hasHtlcmin = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Amount htlcmax = 5; + * @return {?proto.cln.Amount} + */ +proto.cln.SetchannelRequest.prototype.getHtlcmax = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 5)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SetchannelRequest} returns this +*/ +proto.cln.SetchannelRequest.prototype.setHtlcmax = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.clearHtlcmax = function() { + return this.setHtlcmax(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelRequest.prototype.hasHtlcmax = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint32 enforcedelay = 6; + * @return {number} + */ +proto.cln.SetchannelRequest.prototype.getEnforcedelay = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.setEnforcedelay = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SetchannelRequest} returns this + */ +proto.cln.SetchannelRequest.prototype.clearEnforcedelay = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelRequest.prototype.hasEnforcedelay = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.SetchannelResponse.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.cln.SetchannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SetchannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SetchannelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SetchannelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + proto.cln.SetchannelChannels.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.cln.SetchannelResponse} + */ +proto.cln.SetchannelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SetchannelResponse; + return proto.cln.SetchannelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SetchannelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SetchannelResponse} + */ +proto.cln.SetchannelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.SetchannelChannels; + reader.readMessage(value,proto.cln.SetchannelChannels.deserializeBinaryFromReader); + msg.addChannels(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SetchannelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SetchannelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SetchannelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SetchannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.SetchannelChannels.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SetchannelChannels channels = 1; + * @return {!Array} + */ +proto.cln.SetchannelResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.SetchannelChannels, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.SetchannelResponse} returns this +*/ +proto.cln.SetchannelResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.SetchannelChannels=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.SetchannelChannels} + */ +proto.cln.SetchannelResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.SetchannelChannels, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.SetchannelResponse} returns this + */ +proto.cln.SetchannelResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.SetchannelChannels.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SetchannelChannels.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SetchannelChannels} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SetchannelChannels.toObject = function(includeInstance, msg) { + var f, obj = { + peerId: msg.getPeerId_asB64(), + channelId: msg.getChannelId_asB64(), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 3, ""), + feeBaseMsat: (f = msg.getFeeBaseMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + feeProportionalMillionths: jspb.Message.getFieldWithDefault(msg, 5, 0), + minimumHtlcOutMsat: (f = msg.getMinimumHtlcOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + warningHtlcminTooLow: jspb.Message.getFieldWithDefault(msg, 7, ""), + maximumHtlcOutMsat: (f = msg.getMaximumHtlcOutMsat()) && cln_primitives_pb.Amount.toObject(includeInstance, f), + warningHtlcmaxTooHigh: 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.cln.SetchannelChannels} + */ +proto.cln.SetchannelChannels.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SetchannelChannels; + return proto.cln.SetchannelChannels.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SetchannelChannels} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SetchannelChannels} + */ +proto.cln.SetchannelChannels.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.setPeerId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannelId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 4: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setFeeBaseMsat(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeProportionalMillionths(value); + break; + case 6: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMinimumHtlcOutMsat(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningHtlcminTooLow(value); + break; + case 8: + var value = new cln_primitives_pb.Amount; + reader.readMessage(value,cln_primitives_pb.Amount.deserializeBinaryFromReader); + msg.setMaximumHtlcOutMsat(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setWarningHtlcmaxTooHigh(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SetchannelChannels.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SetchannelChannels.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SetchannelChannels} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SetchannelChannels.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPeerId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getChannelId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getFeeBaseMsat(); + if (f != null) { + writer.writeMessage( + 4, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = message.getFeeProportionalMillionths(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = message.getMinimumHtlcOutMsat(); + if (f != null) { + writer.writeMessage( + 6, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = message.getMaximumHtlcOutMsat(); + if (f != null) { + writer.writeMessage( + 8, + f, + cln_primitives_pb.Amount.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional bytes peer_id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.SetchannelChannels.prototype.getPeerId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes peer_id = 1; + * This is a type-conversion wrapper around `getPeerId()` + * @return {string} + */ +proto.cln.SetchannelChannels.prototype.getPeerId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPeerId())); +}; + + +/** + * optional bytes peer_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPeerId()` + * @return {!Uint8Array} + */ +proto.cln.SetchannelChannels.prototype.getPeerId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPeerId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.setPeerId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes channel_id = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SetchannelChannels.prototype.getChannelId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes channel_id = 2; + * This is a type-conversion wrapper around `getChannelId()` + * @return {string} + */ +proto.cln.SetchannelChannels.prototype.getChannelId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannelId())); +}; + + +/** + * optional bytes channel_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannelId()` + * @return {!Uint8Array} + */ +proto.cln.SetchannelChannels.prototype.getChannelId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannelId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.setChannelId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string short_channel_id = 3; + * @return {string} + */ +proto.cln.SetchannelChannels.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.setShortChannelId = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.clearShortChannelId = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelChannels.prototype.hasShortChannelId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Amount fee_base_msat = 4; + * @return {?proto.cln.Amount} + */ +proto.cln.SetchannelChannels.prototype.getFeeBaseMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 4)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SetchannelChannels} returns this +*/ +proto.cln.SetchannelChannels.prototype.setFeeBaseMsat = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.clearFeeBaseMsat = function() { + return this.setFeeBaseMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelChannels.prototype.hasFeeBaseMsat = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 fee_proportional_millionths = 5; + * @return {number} + */ +proto.cln.SetchannelChannels.prototype.getFeeProportionalMillionths = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.setFeeProportionalMillionths = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional Amount minimum_htlc_out_msat = 6; + * @return {?proto.cln.Amount} + */ +proto.cln.SetchannelChannels.prototype.getMinimumHtlcOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 6)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SetchannelChannels} returns this +*/ +proto.cln.SetchannelChannels.prototype.setMinimumHtlcOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.clearMinimumHtlcOutMsat = function() { + return this.setMinimumHtlcOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelChannels.prototype.hasMinimumHtlcOutMsat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string warning_htlcmin_too_low = 7; + * @return {string} + */ +proto.cln.SetchannelChannels.prototype.getWarningHtlcminTooLow = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.setWarningHtlcminTooLow = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.clearWarningHtlcminTooLow = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelChannels.prototype.hasWarningHtlcminTooLow = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional Amount maximum_htlc_out_msat = 8; + * @return {?proto.cln.Amount} + */ +proto.cln.SetchannelChannels.prototype.getMaximumHtlcOutMsat = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, cln_primitives_pb.Amount, 8)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.SetchannelChannels} returns this +*/ +proto.cln.SetchannelChannels.prototype.setMaximumHtlcOutMsat = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.clearMaximumHtlcOutMsat = function() { + return this.setMaximumHtlcOutMsat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelChannels.prototype.hasMaximumHtlcOutMsat = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string warning_htlcmax_too_high = 9; + * @return {string} + */ +proto.cln.SetchannelChannels.prototype.getWarningHtlcmaxTooHigh = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.setWarningHtlcmaxTooHigh = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.SetchannelChannels} returns this + */ +proto.cln.SetchannelChannels.prototype.clearWarningHtlcmaxTooHigh = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.SetchannelChannels.prototype.hasWarningHtlcmaxTooHigh = 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.cln.SigninvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SigninvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SigninvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SigninvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + invstring: 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.cln.SigninvoiceRequest} + */ +proto.cln.SigninvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SigninvoiceRequest; + return proto.cln.SigninvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SigninvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SigninvoiceRequest} + */ +proto.cln.SigninvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setInvstring(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SigninvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SigninvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SigninvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SigninvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInvstring(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string invstring = 1; + * @return {string} + */ +proto.cln.SigninvoiceRequest.prototype.getInvstring = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SigninvoiceRequest} returns this + */ +proto.cln.SigninvoiceRequest.prototype.setInvstring = 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.cln.SigninvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SigninvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SigninvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SigninvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: 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.cln.SigninvoiceResponse} + */ +proto.cln.SigninvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SigninvoiceResponse; + return proto.cln.SigninvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SigninvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SigninvoiceResponse} + */ +proto.cln.SigninvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SigninvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SigninvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SigninvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SigninvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.cln.SigninvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SigninvoiceResponse} returns this + */ +proto.cln.SigninvoiceResponse.prototype.setBolt11 = 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.cln.SignmessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SignmessageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SignmessageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignmessageRequest.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.cln.SignmessageRequest} + */ +proto.cln.SignmessageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SignmessageRequest; + return proto.cln.SignmessageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SignmessageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SignmessageRequest} + */ +proto.cln.SignmessageRequest.deserializeBinaryFromReader = function(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.cln.SignmessageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SignmessageRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SignmessageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignmessageRequest.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.cln.SignmessageRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SignmessageRequest} returns this + */ +proto.cln.SignmessageRequest.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.cln.SignmessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.SignmessageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.SignmessageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignmessageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signature: msg.getSignature_asB64(), + recid: msg.getRecid_asB64(), + zbase: 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.cln.SignmessageResponse} + */ +proto.cln.SignmessageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.SignmessageResponse; + return proto.cln.SignmessageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.SignmessageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.SignmessageResponse} + */ +proto.cln.SignmessageResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRecid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setZbase(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.SignmessageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.SignmessageResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.SignmessageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.SignmessageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRecid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getZbase(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes signature = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.SignmessageResponse.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.cln.SignmessageResponse.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.cln.SignmessageResponse.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SignmessageResponse} returns this + */ +proto.cln.SignmessageResponse.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes recid = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.SignmessageResponse.prototype.getRecid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes recid = 2; + * This is a type-conversion wrapper around `getRecid()` + * @return {string} + */ +proto.cln.SignmessageResponse.prototype.getRecid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecid())); +}; + + +/** + * optional bytes recid = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecid()` + * @return {!Uint8Array} + */ +proto.cln.SignmessageResponse.prototype.getRecid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.SignmessageResponse} returns this + */ +proto.cln.SignmessageResponse.prototype.setRecid = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string zbase = 3; + * @return {string} + */ +proto.cln.SignmessageResponse.prototype.getZbase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.SignmessageResponse} returns this + */ +proto.cln.SignmessageResponse.prototype.setZbase = 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.cln.StopRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cln.StopRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.StopRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.StopRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.StopRequest} + */ +proto.cln.StopRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.StopRequest; + return proto.cln.StopRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.StopRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.StopRequest} + */ +proto.cln.StopRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.StopRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.StopRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.StopRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.StopRequest.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.cln.StopResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cln.StopResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.StopResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.StopResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.StopResponse} + */ +proto.cln.StopResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.StopResponse; + return proto.cln.StopResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.StopResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.StopResponse} + */ +proto.cln.StopResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.StopResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.StopResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.StopResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.StopResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cln); diff --git a/lib/proto/cln/primitives_grpc_pb.js b/lib/proto/cln/primitives_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/lib/proto/cln/primitives_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/lib/proto/cln/primitives_pb.d.ts b/lib/proto/cln/primitives_pb.d.ts new file mode 100644 index 000000000..41a9cb781 --- /dev/null +++ b/lib/proto/cln/primitives_pb.d.ts @@ -0,0 +1,503 @@ +// package: cln +// file: cln/primitives.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from 'google-protobuf'; + +export class Amount extends jspb.Message { + getMsat(): number; + setMsat(value: number): Amount; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Amount.AsObject; + static toObject(includeInstance: boolean, msg: Amount): Amount.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Amount, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): Amount; + static deserializeBinaryFromReader( + message: Amount, + reader: jspb.BinaryReader, + ): Amount; +} + +export namespace Amount { + export type AsObject = { + msat: number; + }; +} + +export class AmountOrAll extends jspb.Message { + hasAmount(): boolean; + clearAmount(): void; + getAmount(): Amount | undefined; + setAmount(value?: Amount): AmountOrAll; + + hasAll(): boolean; + clearAll(): void; + getAll(): boolean; + setAll(value: boolean): AmountOrAll; + + getValueCase(): AmountOrAll.ValueCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AmountOrAll.AsObject; + static toObject( + includeInstance: boolean, + msg: AmountOrAll, + ): AmountOrAll.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: AmountOrAll, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): AmountOrAll; + static deserializeBinaryFromReader( + message: AmountOrAll, + reader: jspb.BinaryReader, + ): AmountOrAll; +} + +export namespace AmountOrAll { + export type AsObject = { + amount?: Amount.AsObject; + all: boolean; + }; + + export enum ValueCase { + VALUE_NOT_SET = 0, + AMOUNT = 1, + ALL = 2, + } +} + +export class AmountOrAny extends jspb.Message { + hasAmount(): boolean; + clearAmount(): void; + getAmount(): Amount | undefined; + setAmount(value?: Amount): AmountOrAny; + + hasAny(): boolean; + clearAny(): void; + getAny(): boolean; + setAny(value: boolean): AmountOrAny; + + getValueCase(): AmountOrAny.ValueCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AmountOrAny.AsObject; + static toObject( + includeInstance: boolean, + msg: AmountOrAny, + ): AmountOrAny.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: AmountOrAny, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): AmountOrAny; + static deserializeBinaryFromReader( + message: AmountOrAny, + reader: jspb.BinaryReader, + ): AmountOrAny; +} + +export namespace AmountOrAny { + export type AsObject = { + amount?: Amount.AsObject; + any: boolean; + }; + + export enum ValueCase { + VALUE_NOT_SET = 0, + AMOUNT = 1, + ANY = 2, + } +} + +export class ChannelStateChangeCause extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ChannelStateChangeCause.AsObject; + static toObject( + includeInstance: boolean, + msg: ChannelStateChangeCause, + ): ChannelStateChangeCause.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ChannelStateChangeCause, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ChannelStateChangeCause; + static deserializeBinaryFromReader( + message: ChannelStateChangeCause, + reader: jspb.BinaryReader, + ): ChannelStateChangeCause; +} + +export namespace ChannelStateChangeCause { + export type AsObject = {}; +} + +export class Outpoint extends jspb.Message { + getTxid(): Uint8Array | string; + getTxid_asU8(): Uint8Array; + getTxid_asB64(): string; + setTxid(value: Uint8Array | string): Outpoint; + getOutnum(): number; + setOutnum(value: number): Outpoint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Outpoint.AsObject; + static toObject(includeInstance: boolean, msg: Outpoint): Outpoint.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Outpoint, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): Outpoint; + static deserializeBinaryFromReader( + message: Outpoint, + reader: jspb.BinaryReader, + ): Outpoint; +} + +export namespace Outpoint { + export type AsObject = { + txid: Uint8Array | string; + outnum: number; + }; +} + +export class Feerate extends jspb.Message { + hasSlow(): boolean; + clearSlow(): void; + getSlow(): boolean; + setSlow(value: boolean): Feerate; + + hasNormal(): boolean; + clearNormal(): void; + getNormal(): boolean; + setNormal(value: boolean): Feerate; + + hasUrgent(): boolean; + clearUrgent(): void; + getUrgent(): boolean; + setUrgent(value: boolean): Feerate; + + hasPerkb(): boolean; + clearPerkb(): void; + getPerkb(): number; + setPerkb(value: number): Feerate; + + hasPerkw(): boolean; + clearPerkw(): void; + getPerkw(): number; + setPerkw(value: number): Feerate; + + getStyleCase(): Feerate.StyleCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Feerate.AsObject; + static toObject(includeInstance: boolean, msg: Feerate): Feerate.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Feerate, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): Feerate; + static deserializeBinaryFromReader( + message: Feerate, + reader: jspb.BinaryReader, + ): Feerate; +} + +export namespace Feerate { + export type AsObject = { + slow: boolean; + normal: boolean; + urgent: boolean; + perkb: number; + perkw: number; + }; + + export enum StyleCase { + STYLE_NOT_SET = 0, + SLOW = 1, + NORMAL = 2, + URGENT = 3, + PERKB = 4, + PERKW = 5, + } +} + +export class OutputDesc extends jspb.Message { + getAddress(): string; + setAddress(value: string): OutputDesc; + + hasAmount(): boolean; + clearAmount(): void; + getAmount(): Amount | undefined; + setAmount(value?: Amount): OutputDesc; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OutputDesc.AsObject; + static toObject( + includeInstance: boolean, + msg: OutputDesc, + ): OutputDesc.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: OutputDesc, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): OutputDesc; + static deserializeBinaryFromReader( + message: OutputDesc, + reader: jspb.BinaryReader, + ): OutputDesc; +} + +export namespace OutputDesc { + export type AsObject = { + address: string; + amount?: Amount.AsObject; + }; +} + +export class RouteHop extends jspb.Message { + getId(): Uint8Array | string; + getId_asU8(): Uint8Array; + getId_asB64(): string; + setId(value: Uint8Array | string): RouteHop; + getShortChannelId(): string; + setShortChannelId(value: string): RouteHop; + + hasFeebase(): boolean; + clearFeebase(): void; + getFeebase(): Amount | undefined; + setFeebase(value?: Amount): RouteHop; + getFeeprop(): number; + setFeeprop(value: number): RouteHop; + getExpirydelta(): number; + setExpirydelta(value: number): RouteHop; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RouteHop.AsObject; + static toObject(includeInstance: boolean, msg: RouteHop): RouteHop.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: RouteHop, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): RouteHop; + static deserializeBinaryFromReader( + message: RouteHop, + reader: jspb.BinaryReader, + ): RouteHop; +} + +export namespace RouteHop { + export type AsObject = { + id: Uint8Array | string; + shortChannelId: string; + feebase?: Amount.AsObject; + feeprop: number; + expirydelta: number; + }; +} + +export class Routehint extends jspb.Message { + clearHopsList(): void; + getHopsList(): Array; + setHopsList(value: Array): Routehint; + addHops(value?: RouteHop, index?: number): RouteHop; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Routehint.AsObject; + static toObject(includeInstance: boolean, msg: Routehint): Routehint.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Routehint, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): Routehint; + static deserializeBinaryFromReader( + message: Routehint, + reader: jspb.BinaryReader, + ): Routehint; +} + +export namespace Routehint { + export type AsObject = { + hopsList: Array; + }; +} + +export class RoutehintList extends jspb.Message { + clearHintsList(): void; + getHintsList(): Array; + setHintsList(value: Array): RoutehintList; + addHints(value?: Routehint, index?: number): Routehint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RoutehintList.AsObject; + static toObject( + includeInstance: boolean, + msg: RoutehintList, + ): RoutehintList.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: RoutehintList, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): RoutehintList; + static deserializeBinaryFromReader( + message: RoutehintList, + reader: jspb.BinaryReader, + ): RoutehintList; +} + +export namespace RoutehintList { + export type AsObject = { + hintsList: Array; + }; +} + +export class TlvEntry extends jspb.Message { + getType(): number; + setType(value: number): TlvEntry; + getValue(): Uint8Array | string; + getValue_asU8(): Uint8Array; + getValue_asB64(): string; + setValue(value: Uint8Array | string): TlvEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TlvEntry.AsObject; + static toObject(includeInstance: boolean, msg: TlvEntry): TlvEntry.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TlvEntry, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TlvEntry; + static deserializeBinaryFromReader( + message: TlvEntry, + reader: jspb.BinaryReader, + ): TlvEntry; +} + +export namespace TlvEntry { + export type AsObject = { + type: number; + value: Uint8Array | string; + }; +} + +export class TlvStream extends jspb.Message { + clearEntriesList(): void; + getEntriesList(): Array; + setEntriesList(value: Array): TlvStream; + addEntries(value?: TlvEntry, index?: number): TlvEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TlvStream.AsObject; + static toObject(includeInstance: boolean, msg: TlvStream): TlvStream.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TlvStream, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TlvStream; + static deserializeBinaryFromReader( + message: TlvStream, + reader: jspb.BinaryReader, + ): TlvStream; +} + +export namespace TlvStream { + export type AsObject = { + entriesList: Array; + }; +} + +export enum ChannelSide { + LOCAL = 0, + REMOTE = 1, +} + +export enum ChannelState { + OPENINGD = 0, + CHANNELDAWAITINGLOCKIN = 1, + CHANNELDNORMAL = 2, + CHANNELDSHUTTINGDOWN = 3, + CLOSINGDSIGEXCHANGE = 4, + CLOSINGDCOMPLETE = 5, + AWAITINGUNILATERAL = 6, + FUNDINGSPENDSEEN = 7, + ONCHAIN = 8, + DUALOPENDOPENINIT = 9, + DUALOPENDAWAITINGLOCKIN = 10, +} + +export enum HtlcState { + SENTADDHTLC = 0, + SENTADDCOMMIT = 1, + RCVDADDREVOCATION = 2, + RCVDADDACKCOMMIT = 3, + SENTADDACKREVOCATION = 4, + RCVDADDACKREVOCATION = 5, + RCVDREMOVEHTLC = 6, + RCVDREMOVECOMMIT = 7, + SENTREMOVEREVOCATION = 8, + SENTREMOVEACKCOMMIT = 9, + RCVDREMOVEACKREVOCATION = 10, + RCVDADDHTLC = 11, + RCVDADDCOMMIT = 12, + SENTADDREVOCATION = 13, + SENTADDACKCOMMIT = 14, + SENTREMOVEHTLC = 15, + SENTREMOVECOMMIT = 16, + RCVDREMOVEREVOCATION = 17, + RCVDREMOVEACKCOMMIT = 18, + SENTREMOVEACKREVOCATION = 19, +} diff --git a/lib/proto/cln/primitives_pb.js b/lib/proto/cln/primitives_pb.js new file mode 100644 index 000000000..3fa2b55dc --- /dev/null +++ b/lib/proto/cln/primitives_pb.js @@ -0,0 +1,2719 @@ +// source: cln/primitives.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.cln.Amount', null, global); +goog.exportSymbol('proto.cln.AmountOrAll', null, global); +goog.exportSymbol('proto.cln.AmountOrAll.ValueCase', null, global); +goog.exportSymbol('proto.cln.AmountOrAny', null, global); +goog.exportSymbol('proto.cln.AmountOrAny.ValueCase', null, global); +goog.exportSymbol('proto.cln.ChannelSide', null, global); +goog.exportSymbol('proto.cln.ChannelState', null, global); +goog.exportSymbol('proto.cln.ChannelStateChangeCause', null, global); +goog.exportSymbol('proto.cln.Feerate', null, global); +goog.exportSymbol('proto.cln.Feerate.StyleCase', null, global); +goog.exportSymbol('proto.cln.HtlcState', null, global); +goog.exportSymbol('proto.cln.Outpoint', null, global); +goog.exportSymbol('proto.cln.OutputDesc', null, global); +goog.exportSymbol('proto.cln.RouteHop', null, global); +goog.exportSymbol('proto.cln.Routehint', null, global); +goog.exportSymbol('proto.cln.RoutehintList', null, global); +goog.exportSymbol('proto.cln.TlvEntry', null, global); +goog.exportSymbol('proto.cln.TlvStream', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.Amount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.Amount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.Amount.displayName = 'proto.cln.Amount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.AmountOrAll = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cln.AmountOrAll.oneofGroups_); +}; +goog.inherits(proto.cln.AmountOrAll, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.AmountOrAll.displayName = 'proto.cln.AmountOrAll'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.AmountOrAny = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cln.AmountOrAny.oneofGroups_); +}; +goog.inherits(proto.cln.AmountOrAny, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.AmountOrAny.displayName = 'proto.cln.AmountOrAny'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.ChannelStateChangeCause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.ChannelStateChangeCause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.ChannelStateChangeCause.displayName = 'proto.cln.ChannelStateChangeCause'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.Outpoint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.Outpoint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.Outpoint.displayName = 'proto.cln.Outpoint'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.Feerate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cln.Feerate.oneofGroups_); +}; +goog.inherits(proto.cln.Feerate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.Feerate.displayName = 'proto.cln.Feerate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.OutputDesc = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.OutputDesc, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.OutputDesc.displayName = 'proto.cln.OutputDesc'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.RouteHop = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.RouteHop, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.RouteHop.displayName = 'proto.cln.RouteHop'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.Routehint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.Routehint.repeatedFields_, null); +}; +goog.inherits(proto.cln.Routehint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.Routehint.displayName = 'proto.cln.Routehint'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.RoutehintList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.RoutehintList.repeatedFields_, null); +}; +goog.inherits(proto.cln.RoutehintList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.RoutehintList.displayName = 'proto.cln.RoutehintList'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TlvEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cln.TlvEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TlvEntry.displayName = 'proto.cln.TlvEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.cln.TlvStream = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cln.TlvStream.repeatedFields_, null); +}; +goog.inherits(proto.cln.TlvStream, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cln.TlvStream.displayName = 'proto.cln.TlvStream'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.Amount.prototype.toObject = function(opt_includeInstance) { + return proto.cln.Amount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.Amount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Amount.toObject = function(includeInstance, msg) { + var f, obj = { + msat: 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.cln.Amount} + */ +proto.cln.Amount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.Amount; + return proto.cln.Amount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.Amount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.Amount} + */ +proto.cln.Amount.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.setMsat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.Amount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.Amount.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.Amount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Amount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsat(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 msat = 1; + * @return {number} + */ +proto.cln.Amount.prototype.getMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.Amount} returns this + */ +proto.cln.Amount.prototype.setMsat = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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.cln.AmountOrAll.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cln.AmountOrAll.ValueCase = { + VALUE_NOT_SET: 0, + AMOUNT: 1, + ALL: 2 +}; + +/** + * @return {proto.cln.AmountOrAll.ValueCase} + */ +proto.cln.AmountOrAll.prototype.getValueCase = function() { + return /** @type {proto.cln.AmountOrAll.ValueCase} */(jspb.Message.computeOneofCase(this, proto.cln.AmountOrAll.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.cln.AmountOrAll.prototype.toObject = function(opt_includeInstance) { + return proto.cln.AmountOrAll.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.AmountOrAll} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AmountOrAll.toObject = function(includeInstance, msg) { + var f, obj = { + amount: (f = msg.getAmount()) && proto.cln.Amount.toObject(includeInstance, f), + all: 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.cln.AmountOrAll} + */ +proto.cln.AmountOrAll.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.AmountOrAll; + return proto.cln.AmountOrAll.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.AmountOrAll} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.AmountOrAll} + */ +proto.cln.AmountOrAll.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.Amount; + reader.readMessage(value,proto.cln.Amount.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAll(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.AmountOrAll.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.AmountOrAll.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.AmountOrAll} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AmountOrAll.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cln.Amount.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Amount amount = 1; + * @return {?proto.cln.Amount} + */ +proto.cln.AmountOrAll.prototype.getAmount = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, proto.cln.Amount, 1)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.AmountOrAll} returns this +*/ +proto.cln.AmountOrAll.prototype.setAmount = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cln.AmountOrAll.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.AmountOrAll} returns this + */ +proto.cln.AmountOrAll.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AmountOrAll.prototype.hasAmount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool all = 2; + * @return {boolean} + */ +proto.cln.AmountOrAll.prototype.getAll = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.AmountOrAll} returns this + */ +proto.cln.AmountOrAll.prototype.setAll = function(value) { + return jspb.Message.setOneofField(this, 2, proto.cln.AmountOrAll.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.AmountOrAll} returns this + */ +proto.cln.AmountOrAll.prototype.clearAll = function() { + return jspb.Message.setOneofField(this, 2, proto.cln.AmountOrAll.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AmountOrAll.prototype.hasAll = function() { + return jspb.Message.getField(this, 2) != 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.cln.AmountOrAny.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cln.AmountOrAny.ValueCase = { + VALUE_NOT_SET: 0, + AMOUNT: 1, + ANY: 2 +}; + +/** + * @return {proto.cln.AmountOrAny.ValueCase} + */ +proto.cln.AmountOrAny.prototype.getValueCase = function() { + return /** @type {proto.cln.AmountOrAny.ValueCase} */(jspb.Message.computeOneofCase(this, proto.cln.AmountOrAny.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.cln.AmountOrAny.prototype.toObject = function(opt_includeInstance) { + return proto.cln.AmountOrAny.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.AmountOrAny} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AmountOrAny.toObject = function(includeInstance, msg) { + var f, obj = { + amount: (f = msg.getAmount()) && proto.cln.Amount.toObject(includeInstance, f), + any: 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.cln.AmountOrAny} + */ +proto.cln.AmountOrAny.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.AmountOrAny; + return proto.cln.AmountOrAny.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.AmountOrAny} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.AmountOrAny} + */ +proto.cln.AmountOrAny.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.Amount; + reader.readMessage(value,proto.cln.Amount.deserializeBinaryFromReader); + msg.setAmount(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAny(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.AmountOrAny.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.AmountOrAny.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.AmountOrAny} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.AmountOrAny.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cln.Amount.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Amount amount = 1; + * @return {?proto.cln.Amount} + */ +proto.cln.AmountOrAny.prototype.getAmount = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, proto.cln.Amount, 1)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.AmountOrAny} returns this +*/ +proto.cln.AmountOrAny.prototype.setAmount = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cln.AmountOrAny.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.AmountOrAny} returns this + */ +proto.cln.AmountOrAny.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AmountOrAny.prototype.hasAmount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool any = 2; + * @return {boolean} + */ +proto.cln.AmountOrAny.prototype.getAny = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.AmountOrAny} returns this + */ +proto.cln.AmountOrAny.prototype.setAny = function(value) { + return jspb.Message.setOneofField(this, 2, proto.cln.AmountOrAny.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.AmountOrAny} returns this + */ +proto.cln.AmountOrAny.prototype.clearAny = function() { + return jspb.Message.setOneofField(this, 2, proto.cln.AmountOrAny.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.AmountOrAny.prototype.hasAny = 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.cln.ChannelStateChangeCause.prototype.toObject = function(opt_includeInstance) { + return proto.cln.ChannelStateChangeCause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.ChannelStateChangeCause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ChannelStateChangeCause.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.ChannelStateChangeCause} + */ +proto.cln.ChannelStateChangeCause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.ChannelStateChangeCause; + return proto.cln.ChannelStateChangeCause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.ChannelStateChangeCause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.ChannelStateChangeCause} + */ +proto.cln.ChannelStateChangeCause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.ChannelStateChangeCause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.ChannelStateChangeCause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.ChannelStateChangeCause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.ChannelStateChangeCause.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.cln.Outpoint.prototype.toObject = function(opt_includeInstance) { + return proto.cln.Outpoint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.Outpoint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Outpoint.toObject = function(includeInstance, msg) { + var f, obj = { + txid: msg.getTxid_asB64(), + outnum: 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.cln.Outpoint} + */ +proto.cln.Outpoint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.Outpoint; + return proto.cln.Outpoint.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.Outpoint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.Outpoint} + */ +proto.cln.Outpoint.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.setTxid(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOutnum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.Outpoint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.Outpoint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.Outpoint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Outpoint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxid_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOutnum(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * optional bytes txid = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.Outpoint.prototype.getTxid = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes txid = 1; + * This is a type-conversion wrapper around `getTxid()` + * @return {string} + */ +proto.cln.Outpoint.prototype.getTxid_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxid())); +}; + + +/** + * optional bytes txid = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxid()` + * @return {!Uint8Array} + */ +proto.cln.Outpoint.prototype.getTxid_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxid())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.Outpoint} returns this + */ +proto.cln.Outpoint.prototype.setTxid = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 outnum = 2; + * @return {number} + */ +proto.cln.Outpoint.prototype.getOutnum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.Outpoint} returns this + */ +proto.cln.Outpoint.prototype.setOutnum = function(value) { + return jspb.Message.setProto3IntField(this, 2, 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.cln.Feerate.oneofGroups_ = [[1,2,3,4,5]]; + +/** + * @enum {number} + */ +proto.cln.Feerate.StyleCase = { + STYLE_NOT_SET: 0, + SLOW: 1, + NORMAL: 2, + URGENT: 3, + PERKB: 4, + PERKW: 5 +}; + +/** + * @return {proto.cln.Feerate.StyleCase} + */ +proto.cln.Feerate.prototype.getStyleCase = function() { + return /** @type {proto.cln.Feerate.StyleCase} */(jspb.Message.computeOneofCase(this, proto.cln.Feerate.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.cln.Feerate.prototype.toObject = function(opt_includeInstance) { + return proto.cln.Feerate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.Feerate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Feerate.toObject = function(includeInstance, msg) { + var f, obj = { + slow: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + normal: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + urgent: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + perkb: jspb.Message.getFieldWithDefault(msg, 4, 0), + perkw: 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.cln.Feerate} + */ +proto.cln.Feerate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.Feerate; + return proto.cln.Feerate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.Feerate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.Feerate} + */ +proto.cln.Feerate.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.setSlow(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNormal(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUrgent(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPerkb(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPerkw(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.Feerate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.Feerate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.Feerate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Feerate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } +}; + + +/** + * optional bool slow = 1; + * @return {boolean} + */ +proto.cln.Feerate.prototype.getSlow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.setSlow = function(value) { + return jspb.Message.setOneofField(this, 1, proto.cln.Feerate.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.clearSlow = function() { + return jspb.Message.setOneofField(this, 1, proto.cln.Feerate.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.Feerate.prototype.hasSlow = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool normal = 2; + * @return {boolean} + */ +proto.cln.Feerate.prototype.getNormal = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.setNormal = function(value) { + return jspb.Message.setOneofField(this, 2, proto.cln.Feerate.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.clearNormal = function() { + return jspb.Message.setOneofField(this, 2, proto.cln.Feerate.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.Feerate.prototype.hasNormal = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool urgent = 3; + * @return {boolean} + */ +proto.cln.Feerate.prototype.getUrgent = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.setUrgent = function(value) { + return jspb.Message.setOneofField(this, 3, proto.cln.Feerate.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.clearUrgent = function() { + return jspb.Message.setOneofField(this, 3, proto.cln.Feerate.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.Feerate.prototype.hasUrgent = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 perkb = 4; + * @return {number} + */ +proto.cln.Feerate.prototype.getPerkb = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.setPerkb = function(value) { + return jspb.Message.setOneofField(this, 4, proto.cln.Feerate.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.clearPerkb = function() { + return jspb.Message.setOneofField(this, 4, proto.cln.Feerate.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.Feerate.prototype.hasPerkb = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 perkw = 5; + * @return {number} + */ +proto.cln.Feerate.prototype.getPerkw = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.setPerkw = function(value) { + return jspb.Message.setOneofField(this, 5, proto.cln.Feerate.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.cln.Feerate} returns this + */ +proto.cln.Feerate.prototype.clearPerkw = function() { + return jspb.Message.setOneofField(this, 5, proto.cln.Feerate.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.Feerate.prototype.hasPerkw = 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.cln.OutputDesc.prototype.toObject = function(opt_includeInstance) { + return proto.cln.OutputDesc.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.OutputDesc} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.OutputDesc.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: (f = msg.getAmount()) && proto.cln.Amount.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cln.OutputDesc} + */ +proto.cln.OutputDesc.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.OutputDesc; + return proto.cln.OutputDesc.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.OutputDesc} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.OutputDesc} + */ +proto.cln.OutputDesc.deserializeBinaryFromReader = function(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.cln.Amount; + reader.readMessage(value,proto.cln.Amount.deserializeBinaryFromReader); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.OutputDesc.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.OutputDesc.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.OutputDesc} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.OutputDesc.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cln.Amount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cln.OutputDesc.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.OutputDesc} returns this + */ +proto.cln.OutputDesc.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Amount amount = 2; + * @return {?proto.cln.Amount} + */ +proto.cln.OutputDesc.prototype.getAmount = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, proto.cln.Amount, 2)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.OutputDesc} returns this +*/ +proto.cln.OutputDesc.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.OutputDesc} returns this + */ +proto.cln.OutputDesc.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.OutputDesc.prototype.hasAmount = 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.cln.RouteHop.prototype.toObject = function(opt_includeInstance) { + return proto.cln.RouteHop.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.RouteHop} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.RouteHop.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + feebase: (f = msg.getFeebase()) && proto.cln.Amount.toObject(includeInstance, f), + feeprop: jspb.Message.getFieldWithDefault(msg, 4, 0), + expirydelta: 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.cln.RouteHop} + */ +proto.cln.RouteHop.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.RouteHop; + return proto.cln.RouteHop.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.RouteHop} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.RouteHop} + */ +proto.cln.RouteHop.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 3: + var value = new proto.cln.Amount; + reader.readMessage(value,proto.cln.Amount.deserializeBinaryFromReader); + msg.setFeebase(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFeeprop(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setExpirydelta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.RouteHop.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.RouteHop.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.RouteHop} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.RouteHop.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getShortChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFeebase(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.cln.Amount.serializeBinaryToWriter + ); + } + f = message.getFeeprop(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getExpirydelta(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } +}; + + +/** + * optional bytes id = 1; + * @return {!(string|Uint8Array)} + */ +proto.cln.RouteHop.prototype.getId = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} + */ +proto.cln.RouteHop.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); +}; + + +/** + * optional bytes id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getId()` + * @return {!Uint8Array} + */ +proto.cln.RouteHop.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.RouteHop} returns this + */ +proto.cln.RouteHop.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string short_channel_id = 2; + * @return {string} + */ +proto.cln.RouteHop.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cln.RouteHop} returns this + */ +proto.cln.RouteHop.prototype.setShortChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Amount feebase = 3; + * @return {?proto.cln.Amount} + */ +proto.cln.RouteHop.prototype.getFeebase = function() { + return /** @type{?proto.cln.Amount} */ ( + jspb.Message.getWrapperField(this, proto.cln.Amount, 3)); +}; + + +/** + * @param {?proto.cln.Amount|undefined} value + * @return {!proto.cln.RouteHop} returns this +*/ +proto.cln.RouteHop.prototype.setFeebase = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cln.RouteHop} returns this + */ +proto.cln.RouteHop.prototype.clearFeebase = function() { + return this.setFeebase(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cln.RouteHop.prototype.hasFeebase = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 feeprop = 4; + * @return {number} + */ +proto.cln.RouteHop.prototype.getFeeprop = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.RouteHop} returns this + */ +proto.cln.RouteHop.prototype.setFeeprop = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint32 expirydelta = 5; + * @return {number} + */ +proto.cln.RouteHop.prototype.getExpirydelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.RouteHop} returns this + */ +proto.cln.RouteHop.prototype.setExpirydelta = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.Routehint.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.cln.Routehint.prototype.toObject = function(opt_includeInstance) { + return proto.cln.Routehint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.Routehint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Routehint.toObject = function(includeInstance, msg) { + var f, obj = { + hopsList: jspb.Message.toObjectList(msg.getHopsList(), + proto.cln.RouteHop.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.cln.Routehint} + */ +proto.cln.Routehint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.Routehint; + return proto.cln.Routehint.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.Routehint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.Routehint} + */ +proto.cln.Routehint.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.RouteHop; + reader.readMessage(value,proto.cln.RouteHop.deserializeBinaryFromReader); + msg.addHops(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.Routehint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.Routehint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.Routehint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.Routehint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHopsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.RouteHop.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RouteHop hops = 1; + * @return {!Array} + */ +proto.cln.Routehint.prototype.getHopsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.RouteHop, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.Routehint} returns this +*/ +proto.cln.Routehint.prototype.setHopsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.RouteHop=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.RouteHop} + */ +proto.cln.Routehint.prototype.addHops = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.RouteHop, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.Routehint} returns this + */ +proto.cln.Routehint.prototype.clearHopsList = function() { + return this.setHopsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.RoutehintList.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.cln.RoutehintList.prototype.toObject = function(opt_includeInstance) { + return proto.cln.RoutehintList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.RoutehintList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.RoutehintList.toObject = function(includeInstance, msg) { + var f, obj = { + hintsList: jspb.Message.toObjectList(msg.getHintsList(), + proto.cln.Routehint.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.cln.RoutehintList} + */ +proto.cln.RoutehintList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.RoutehintList; + return proto.cln.RoutehintList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.RoutehintList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.RoutehintList} + */ +proto.cln.RoutehintList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.cln.Routehint; + reader.readMessage(value,proto.cln.Routehint.deserializeBinaryFromReader); + msg.addHints(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.RoutehintList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.RoutehintList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.RoutehintList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.RoutehintList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cln.Routehint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Routehint hints = 2; + * @return {!Array} + */ +proto.cln.RoutehintList.prototype.getHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.Routehint, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.RoutehintList} returns this +*/ +proto.cln.RoutehintList.prototype.setHintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cln.Routehint=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.Routehint} + */ +proto.cln.RoutehintList.prototype.addHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cln.Routehint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.RoutehintList} returns this + */ +proto.cln.RoutehintList.prototype.clearHintsList = function() { + return this.setHintsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.cln.TlvEntry.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TlvEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TlvEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TlvEntry.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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.cln.TlvEntry} + */ +proto.cln.TlvEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TlvEntry; + return proto.cln.TlvEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TlvEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TlvEntry} + */ +proto.cln.TlvEntry.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.setType(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.cln.TlvEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TlvEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TlvEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TlvEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint64 type = 1; + * @return {number} + */ +proto.cln.TlvEntry.prototype.getType = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cln.TlvEntry} returns this + */ +proto.cln.TlvEntry.prototype.setType = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.cln.TlvEntry.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.cln.TlvEntry.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.cln.TlvEntry.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cln.TlvEntry} returns this + */ +proto.cln.TlvEntry.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cln.TlvStream.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.cln.TlvStream.prototype.toObject = function(opt_includeInstance) { + return proto.cln.TlvStream.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.cln.TlvStream} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TlvStream.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cln.TlvEntry.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.cln.TlvStream} + */ +proto.cln.TlvStream.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cln.TlvStream; + return proto.cln.TlvStream.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cln.TlvStream} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cln.TlvStream} + */ +proto.cln.TlvStream.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cln.TlvEntry; + reader.readMessage(value,proto.cln.TlvEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cln.TlvStream.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cln.TlvStream.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.cln.TlvStream} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cln.TlvStream.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cln.TlvEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TlvEntry entries = 1; + * @return {!Array} + */ +proto.cln.TlvStream.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cln.TlvEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cln.TlvStream} returns this +*/ +proto.cln.TlvStream.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cln.TlvEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.cln.TlvEntry} + */ +proto.cln.TlvStream.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cln.TlvEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cln.TlvStream} returns this + */ +proto.cln.TlvStream.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * @enum {number} + */ +proto.cln.ChannelSide = { + LOCAL: 0, + REMOTE: 1 +}; + +/** + * @enum {number} + */ +proto.cln.ChannelState = { + OPENINGD: 0, + CHANNELDAWAITINGLOCKIN: 1, + CHANNELDNORMAL: 2, + CHANNELDSHUTTINGDOWN: 3, + CLOSINGDSIGEXCHANGE: 4, + CLOSINGDCOMPLETE: 5, + AWAITINGUNILATERAL: 6, + FUNDINGSPENDSEEN: 7, + ONCHAIN: 8, + DUALOPENDOPENINIT: 9, + DUALOPENDAWAITINGLOCKIN: 10 +}; + +/** + * @enum {number} + */ +proto.cln.HtlcState = { + SENTADDHTLC: 0, + SENTADDCOMMIT: 1, + RCVDADDREVOCATION: 2, + RCVDADDACKCOMMIT: 3, + SENTADDACKREVOCATION: 4, + RCVDADDACKREVOCATION: 5, + RCVDREMOVEHTLC: 6, + RCVDREMOVECOMMIT: 7, + SENTREMOVEREVOCATION: 8, + SENTREMOVEACKCOMMIT: 9, + RCVDREMOVEACKREVOCATION: 10, + RCVDADDHTLC: 11, + RCVDADDCOMMIT: 12, + SENTADDREVOCATION: 13, + SENTADDACKCOMMIT: 14, + SENTREMOVEHTLC: 15, + SENTREMOVECOMMIT: 16, + RCVDREMOVEREVOCATION: 17, + RCVDREMOVEACKCOMMIT: 18, + SENTREMOVEACKREVOCATION: 19 +}; + +goog.object.extend(exports, proto.cln); diff --git a/lib/proto/hold/hold_grpc_pb.d.ts b/lib/proto/hold/hold_grpc_pb.d.ts new file mode 100644 index 000000000..3137481d8 --- /dev/null +++ b/lib/proto/hold/hold_grpc_pb.d.ts @@ -0,0 +1,476 @@ +// package: hold +// file: hold.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as grpc from '@grpc/grpc-js'; +import * as hold_pb from './hold_pb'; + +interface IHoldService + extends grpc.ServiceDefinition { + getInfo: IHoldService_IGetInfo; + invoice: IHoldService_IInvoice; + routingHints: IHoldService_IRoutingHints; + list: IHoldService_IList; + settle: IHoldService_ISettle; + cancel: IHoldService_ICancel; + track: IHoldService_ITrack; + trackAll: IHoldService_ITrackAll; +} + +interface IHoldService_IGetInfo + extends grpc.MethodDefinition< + hold_pb.GetInfoRequest, + hold_pb.GetInfoResponse + > { + path: '/hold.Hold/GetInfo'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_IInvoice + extends grpc.MethodDefinition< + hold_pb.InvoiceRequest, + hold_pb.InvoiceResponse + > { + path: '/hold.Hold/Invoice'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_IRoutingHints + extends grpc.MethodDefinition< + hold_pb.RoutingHintsRequest, + hold_pb.RoutingHintsResponse + > { + path: '/hold.Hold/RoutingHints'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_IList + extends grpc.MethodDefinition { + path: '/hold.Hold/List'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_ISettle + extends grpc.MethodDefinition { + path: '/hold.Hold/Settle'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_ICancel + extends grpc.MethodDefinition { + path: '/hold.Hold/Cancel'; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_ITrack + extends grpc.MethodDefinition { + path: '/hold.Hold/Track'; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IHoldService_ITrackAll + extends grpc.MethodDefinition< + hold_pb.TrackAllRequest, + hold_pb.TrackAllResponse + > { + path: '/hold.Hold/TrackAll'; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const HoldService: IHoldService; + +export interface IHoldServer extends grpc.UntypedServiceImplementation { + getInfo: grpc.handleUnaryCall< + hold_pb.GetInfoRequest, + hold_pb.GetInfoResponse + >; + invoice: grpc.handleUnaryCall< + hold_pb.InvoiceRequest, + hold_pb.InvoiceResponse + >; + routingHints: grpc.handleUnaryCall< + hold_pb.RoutingHintsRequest, + hold_pb.RoutingHintsResponse + >; + list: grpc.handleUnaryCall; + settle: grpc.handleUnaryCall; + cancel: grpc.handleUnaryCall; + track: grpc.handleServerStreamingCall< + hold_pb.TrackRequest, + hold_pb.TrackResponse + >; + trackAll: grpc.handleServerStreamingCall< + hold_pb.TrackAllRequest, + hold_pb.TrackAllResponse + >; +} + +export interface IHoldClient { + getInfo( + request: hold_pb.GetInfoRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.GetInfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + getInfo( + request: hold_pb.GetInfoRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.GetInfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + getInfo( + request: hold_pb.GetInfoRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.GetInfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + invoice( + request: hold_pb.InvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + invoice( + request: hold_pb.InvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + invoice( + request: hold_pb.InvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + routingHints( + request: hold_pb.RoutingHintsRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.RoutingHintsResponse, + ) => void, + ): grpc.ClientUnaryCall; + routingHints( + request: hold_pb.RoutingHintsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.RoutingHintsResponse, + ) => void, + ): grpc.ClientUnaryCall; + routingHints( + request: hold_pb.RoutingHintsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.RoutingHintsResponse, + ) => void, + ): grpc.ClientUnaryCall; + list( + request: hold_pb.ListRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.ListResponse, + ) => void, + ): grpc.ClientUnaryCall; + list( + request: hold_pb.ListRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.ListResponse, + ) => void, + ): grpc.ClientUnaryCall; + list( + request: hold_pb.ListRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.ListResponse, + ) => void, + ): grpc.ClientUnaryCall; + settle( + request: hold_pb.SettleRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.SettleResponse, + ) => void, + ): grpc.ClientUnaryCall; + settle( + request: hold_pb.SettleRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.SettleResponse, + ) => void, + ): grpc.ClientUnaryCall; + settle( + request: hold_pb.SettleRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.SettleResponse, + ) => void, + ): grpc.ClientUnaryCall; + cancel( + request: hold_pb.CancelRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.CancelResponse, + ) => void, + ): grpc.ClientUnaryCall; + cancel( + request: hold_pb.CancelRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.CancelResponse, + ) => void, + ): grpc.ClientUnaryCall; + cancel( + request: hold_pb.CancelRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.CancelResponse, + ) => void, + ): grpc.ClientUnaryCall; + track( + request: hold_pb.TrackRequest, + options?: Partial, + ): grpc.ClientReadableStream; + track( + request: hold_pb.TrackRequest, + metadata?: grpc.Metadata, + options?: Partial, + ): grpc.ClientReadableStream; + trackAll( + request: hold_pb.TrackAllRequest, + options?: Partial, + ): grpc.ClientReadableStream; + trackAll( + request: hold_pb.TrackAllRequest, + metadata?: grpc.Metadata, + options?: Partial, + ): grpc.ClientReadableStream; +} + +export class HoldClient extends grpc.Client implements IHoldClient { + constructor( + address: string, + credentials: grpc.ChannelCredentials, + options?: Partial, + ); + public getInfo( + request: hold_pb.GetInfoRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.GetInfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getInfo( + request: hold_pb.GetInfoRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.GetInfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + public getInfo( + request: hold_pb.GetInfoRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.GetInfoResponse, + ) => void, + ): grpc.ClientUnaryCall; + public invoice( + request: hold_pb.InvoiceRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public invoice( + request: hold_pb.InvoiceRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public invoice( + request: hold_pb.InvoiceRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.InvoiceResponse, + ) => void, + ): grpc.ClientUnaryCall; + public routingHints( + request: hold_pb.RoutingHintsRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.RoutingHintsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public routingHints( + request: hold_pb.RoutingHintsRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.RoutingHintsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public routingHints( + request: hold_pb.RoutingHintsRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.RoutingHintsResponse, + ) => void, + ): grpc.ClientUnaryCall; + public list( + request: hold_pb.ListRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.ListResponse, + ) => void, + ): grpc.ClientUnaryCall; + public list( + request: hold_pb.ListRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.ListResponse, + ) => void, + ): grpc.ClientUnaryCall; + public list( + request: hold_pb.ListRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.ListResponse, + ) => void, + ): grpc.ClientUnaryCall; + public settle( + request: hold_pb.SettleRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.SettleResponse, + ) => void, + ): grpc.ClientUnaryCall; + public settle( + request: hold_pb.SettleRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.SettleResponse, + ) => void, + ): grpc.ClientUnaryCall; + public settle( + request: hold_pb.SettleRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.SettleResponse, + ) => void, + ): grpc.ClientUnaryCall; + public cancel( + request: hold_pb.CancelRequest, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.CancelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public cancel( + request: hold_pb.CancelRequest, + metadata: grpc.Metadata, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.CancelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public cancel( + request: hold_pb.CancelRequest, + metadata: grpc.Metadata, + options: Partial, + callback: ( + error: grpc.ServiceError | null, + response: hold_pb.CancelResponse, + ) => void, + ): grpc.ClientUnaryCall; + public track( + request: hold_pb.TrackRequest, + options?: Partial, + ): grpc.ClientReadableStream; + public track( + request: hold_pb.TrackRequest, + metadata?: grpc.Metadata, + options?: Partial, + ): grpc.ClientReadableStream; + public trackAll( + request: hold_pb.TrackAllRequest, + options?: Partial, + ): grpc.ClientReadableStream; + public trackAll( + request: hold_pb.TrackAllRequest, + metadata?: grpc.Metadata, + options?: Partial, + ): grpc.ClientReadableStream; +} diff --git a/lib/proto/hold/hold_grpc_pb.js b/lib/proto/hold/hold_grpc_pb.js new file mode 100644 index 000000000..13edac3ae --- /dev/null +++ b/lib/proto/hold/hold_grpc_pb.js @@ -0,0 +1,275 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('@grpc/grpc-js'); +var hold_pb = require('./hold_pb.js'); + +function serialize_hold_CancelRequest(arg) { + if (!(arg instanceof hold_pb.CancelRequest)) { + throw new Error('Expected argument of type hold.CancelRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_CancelRequest(buffer_arg) { + return hold_pb.CancelRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_CancelResponse(arg) { + if (!(arg instanceof hold_pb.CancelResponse)) { + throw new Error('Expected argument of type hold.CancelResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_CancelResponse(buffer_arg) { + return hold_pb.CancelResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_GetInfoRequest(arg) { + if (!(arg instanceof hold_pb.GetInfoRequest)) { + throw new Error('Expected argument of type hold.GetInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_GetInfoRequest(buffer_arg) { + return hold_pb.GetInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_GetInfoResponse(arg) { + if (!(arg instanceof hold_pb.GetInfoResponse)) { + throw new Error('Expected argument of type hold.GetInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_GetInfoResponse(buffer_arg) { + return hold_pb.GetInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_InvoiceRequest(arg) { + if (!(arg instanceof hold_pb.InvoiceRequest)) { + throw new Error('Expected argument of type hold.InvoiceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_InvoiceRequest(buffer_arg) { + return hold_pb.InvoiceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_InvoiceResponse(arg) { + if (!(arg instanceof hold_pb.InvoiceResponse)) { + throw new Error('Expected argument of type hold.InvoiceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_InvoiceResponse(buffer_arg) { + return hold_pb.InvoiceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_ListRequest(arg) { + if (!(arg instanceof hold_pb.ListRequest)) { + throw new Error('Expected argument of type hold.ListRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_ListRequest(buffer_arg) { + return hold_pb.ListRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_ListResponse(arg) { + if (!(arg instanceof hold_pb.ListResponse)) { + throw new Error('Expected argument of type hold.ListResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_ListResponse(buffer_arg) { + return hold_pb.ListResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_RoutingHintsRequest(arg) { + if (!(arg instanceof hold_pb.RoutingHintsRequest)) { + throw new Error('Expected argument of type hold.RoutingHintsRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_RoutingHintsRequest(buffer_arg) { + return hold_pb.RoutingHintsRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_RoutingHintsResponse(arg) { + if (!(arg instanceof hold_pb.RoutingHintsResponse)) { + throw new Error('Expected argument of type hold.RoutingHintsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_RoutingHintsResponse(buffer_arg) { + return hold_pb.RoutingHintsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_SettleRequest(arg) { + if (!(arg instanceof hold_pb.SettleRequest)) { + throw new Error('Expected argument of type hold.SettleRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_SettleRequest(buffer_arg) { + return hold_pb.SettleRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_SettleResponse(arg) { + if (!(arg instanceof hold_pb.SettleResponse)) { + throw new Error('Expected argument of type hold.SettleResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_SettleResponse(buffer_arg) { + return hold_pb.SettleResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_TrackAllRequest(arg) { + if (!(arg instanceof hold_pb.TrackAllRequest)) { + throw new Error('Expected argument of type hold.TrackAllRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_TrackAllRequest(buffer_arg) { + return hold_pb.TrackAllRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_TrackAllResponse(arg) { + if (!(arg instanceof hold_pb.TrackAllResponse)) { + throw new Error('Expected argument of type hold.TrackAllResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_TrackAllResponse(buffer_arg) { + return hold_pb.TrackAllResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_TrackRequest(arg) { + if (!(arg instanceof hold_pb.TrackRequest)) { + throw new Error('Expected argument of type hold.TrackRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_TrackRequest(buffer_arg) { + return hold_pb.TrackRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_hold_TrackResponse(arg) { + if (!(arg instanceof hold_pb.TrackResponse)) { + throw new Error('Expected argument of type hold.TrackResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_hold_TrackResponse(buffer_arg) { + return hold_pb.TrackResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var HoldService = exports.HoldService = { + getInfo: { + path: '/hold.Hold/GetInfo', + requestStream: false, + responseStream: false, + requestType: hold_pb.GetInfoRequest, + responseType: hold_pb.GetInfoResponse, + requestSerialize: serialize_hold_GetInfoRequest, + requestDeserialize: deserialize_hold_GetInfoRequest, + responseSerialize: serialize_hold_GetInfoResponse, + responseDeserialize: deserialize_hold_GetInfoResponse, + }, + invoice: { + path: '/hold.Hold/Invoice', + requestStream: false, + responseStream: false, + requestType: hold_pb.InvoiceRequest, + responseType: hold_pb.InvoiceResponse, + requestSerialize: serialize_hold_InvoiceRequest, + requestDeserialize: deserialize_hold_InvoiceRequest, + responseSerialize: serialize_hold_InvoiceResponse, + responseDeserialize: deserialize_hold_InvoiceResponse, + }, + routingHints: { + path: '/hold.Hold/RoutingHints', + requestStream: false, + responseStream: false, + requestType: hold_pb.RoutingHintsRequest, + responseType: hold_pb.RoutingHintsResponse, + requestSerialize: serialize_hold_RoutingHintsRequest, + requestDeserialize: deserialize_hold_RoutingHintsRequest, + responseSerialize: serialize_hold_RoutingHintsResponse, + responseDeserialize: deserialize_hold_RoutingHintsResponse, + }, + list: { + path: '/hold.Hold/List', + requestStream: false, + responseStream: false, + requestType: hold_pb.ListRequest, + responseType: hold_pb.ListResponse, + requestSerialize: serialize_hold_ListRequest, + requestDeserialize: deserialize_hold_ListRequest, + responseSerialize: serialize_hold_ListResponse, + responseDeserialize: deserialize_hold_ListResponse, + }, + settle: { + path: '/hold.Hold/Settle', + requestStream: false, + responseStream: false, + requestType: hold_pb.SettleRequest, + responseType: hold_pb.SettleResponse, + requestSerialize: serialize_hold_SettleRequest, + requestDeserialize: deserialize_hold_SettleRequest, + responseSerialize: serialize_hold_SettleResponse, + responseDeserialize: deserialize_hold_SettleResponse, + }, + cancel: { + path: '/hold.Hold/Cancel', + requestStream: false, + responseStream: false, + requestType: hold_pb.CancelRequest, + responseType: hold_pb.CancelResponse, + requestSerialize: serialize_hold_CancelRequest, + requestDeserialize: deserialize_hold_CancelRequest, + responseSerialize: serialize_hold_CancelResponse, + responseDeserialize: deserialize_hold_CancelResponse, + }, + track: { + path: '/hold.Hold/Track', + requestStream: false, + responseStream: true, + requestType: hold_pb.TrackRequest, + responseType: hold_pb.TrackResponse, + requestSerialize: serialize_hold_TrackRequest, + requestDeserialize: deserialize_hold_TrackRequest, + responseSerialize: serialize_hold_TrackResponse, + responseDeserialize: deserialize_hold_TrackResponse, + }, + trackAll: { + path: '/hold.Hold/TrackAll', + requestStream: false, + responseStream: true, + requestType: hold_pb.TrackAllRequest, + responseType: hold_pb.TrackAllResponse, + requestSerialize: serialize_hold_TrackAllRequest, + requestDeserialize: deserialize_hold_TrackAllRequest, + responseSerialize: serialize_hold_TrackAllResponse, + responseDeserialize: deserialize_hold_TrackAllResponse, + }, +}; + +exports.HoldClient = grpc.makeGenericClientConstructor(HoldService); diff --git a/lib/proto/hold/hold_pb.d.ts b/lib/proto/hold/hold_pb.d.ts new file mode 100644 index 000000000..92bcc8e0a --- /dev/null +++ b/lib/proto/hold/hold_pb.d.ts @@ -0,0 +1,683 @@ +// package: hold +// file: hold.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from 'google-protobuf'; + +export class GetInfoRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetInfoRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: GetInfoRequest, + ): GetInfoRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetInfoRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetInfoRequest; + static deserializeBinaryFromReader( + message: GetInfoRequest, + reader: jspb.BinaryReader, + ): GetInfoRequest; +} + +export namespace GetInfoRequest { + export type AsObject = {}; +} + +export class GetInfoResponse extends jspb.Message { + getVersion(): string; + setVersion(value: string): GetInfoResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetInfoResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: GetInfoResponse, + ): GetInfoResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetInfoResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): GetInfoResponse; + static deserializeBinaryFromReader( + message: GetInfoResponse, + reader: jspb.BinaryReader, + ): GetInfoResponse; +} + +export namespace GetInfoResponse { + export type AsObject = { + version: string; + }; +} + +export class InvoiceRequest extends jspb.Message { + getPaymentHash(): string; + setPaymentHash(value: string): InvoiceRequest; + getAmountMsat(): number; + setAmountMsat(value: number): InvoiceRequest; + + hasDescription(): boolean; + clearDescription(): void; + getDescription(): string | undefined; + setDescription(value: string): InvoiceRequest; + + hasExpiry(): boolean; + clearExpiry(): void; + getExpiry(): number | undefined; + setExpiry(value: number): InvoiceRequest; + + hasMinFinalCltvExpiry(): boolean; + clearMinFinalCltvExpiry(): void; + getMinFinalCltvExpiry(): number | undefined; + setMinFinalCltvExpiry(value: number): InvoiceRequest; + clearRoutingHintsList(): void; + getRoutingHintsList(): Array; + setRoutingHintsList(value: Array): InvoiceRequest; + addRoutingHints(value?: RoutingHint, index?: number): RoutingHint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvoiceRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: InvoiceRequest, + ): InvoiceRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: InvoiceRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): InvoiceRequest; + static deserializeBinaryFromReader( + message: InvoiceRequest, + reader: jspb.BinaryReader, + ): InvoiceRequest; +} + +export namespace InvoiceRequest { + export type AsObject = { + paymentHash: string; + amountMsat: number; + description?: string; + expiry?: number; + minFinalCltvExpiry?: number; + routingHintsList: Array; + }; +} + +export class InvoiceResponse extends jspb.Message { + getBolt11(): string; + setBolt11(value: string): InvoiceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InvoiceResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: InvoiceResponse, + ): InvoiceResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: InvoiceResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): InvoiceResponse; + static deserializeBinaryFromReader( + message: InvoiceResponse, + reader: jspb.BinaryReader, + ): InvoiceResponse; +} + +export namespace InvoiceResponse { + export type AsObject = { + bolt11: string; + }; +} + +export class RoutingHintsRequest extends jspb.Message { + getNode(): string; + setNode(value: string): RoutingHintsRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RoutingHintsRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: RoutingHintsRequest, + ): RoutingHintsRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: RoutingHintsRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): RoutingHintsRequest; + static deserializeBinaryFromReader( + message: RoutingHintsRequest, + reader: jspb.BinaryReader, + ): RoutingHintsRequest; +} + +export namespace RoutingHintsRequest { + export type AsObject = { + node: string; + }; +} + +export class Hop extends jspb.Message { + getPublicKey(): string; + setPublicKey(value: string): Hop; + getShortChannelId(): string; + setShortChannelId(value: string): Hop; + getBaseFee(): number; + setBaseFee(value: number): Hop; + getPpmFee(): number; + setPpmFee(value: number): Hop; + getCltvExpiryDelta(): number; + setCltvExpiryDelta(value: number): Hop; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Hop.AsObject; + static toObject(includeInstance: boolean, msg: Hop): Hop.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter(message: Hop, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Hop; + static deserializeBinaryFromReader( + message: Hop, + reader: jspb.BinaryReader, + ): Hop; +} + +export namespace Hop { + export type AsObject = { + publicKey: string; + shortChannelId: string; + baseFee: number; + ppmFee: number; + cltvExpiryDelta: number; + }; +} + +export class RoutingHint extends jspb.Message { + clearHopsList(): void; + getHopsList(): Array; + setHopsList(value: Array): RoutingHint; + addHops(value?: Hop, index?: number): Hop; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RoutingHint.AsObject; + static toObject( + includeInstance: boolean, + msg: RoutingHint, + ): RoutingHint.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: RoutingHint, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): RoutingHint; + static deserializeBinaryFromReader( + message: RoutingHint, + reader: jspb.BinaryReader, + ): RoutingHint; +} + +export namespace RoutingHint { + export type AsObject = { + hopsList: Array; + }; +} + +export class RoutingHintsResponse extends jspb.Message { + clearHintsList(): void; + getHintsList(): Array; + setHintsList(value: Array): RoutingHintsResponse; + addHints(value?: RoutingHint, index?: number): RoutingHint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RoutingHintsResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: RoutingHintsResponse, + ): RoutingHintsResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: RoutingHintsResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): RoutingHintsResponse; + static deserializeBinaryFromReader( + message: RoutingHintsResponse, + reader: jspb.BinaryReader, + ): RoutingHintsResponse; +} + +export namespace RoutingHintsResponse { + export type AsObject = { + hintsList: Array; + }; +} + +export class ListRequest extends jspb.Message { + hasPaymentHash(): boolean; + clearPaymentHash(): void; + getPaymentHash(): string | undefined; + setPaymentHash(value: string): ListRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListRequest, + ): ListRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListRequest; + static deserializeBinaryFromReader( + message: ListRequest, + reader: jspb.BinaryReader, + ): ListRequest; +} + +export namespace ListRequest { + export type AsObject = { + paymentHash?: string; + }; +} + +export class Htlc extends jspb.Message { + getState(): HtlcState; + setState(value: HtlcState): Htlc; + getMsat(): number; + setMsat(value: number): Htlc; + getCreationTime(): number; + setCreationTime(value: number): Htlc; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Htlc.AsObject; + static toObject(includeInstance: boolean, msg: Htlc): Htlc.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Htlc, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): Htlc; + static deserializeBinaryFromReader( + message: Htlc, + reader: jspb.BinaryReader, + ): Htlc; +} + +export namespace Htlc { + export type AsObject = { + state: HtlcState; + msat: number; + creationTime: number; + }; +} + +export class Invoice extends jspb.Message { + getPaymentHash(): string; + setPaymentHash(value: string): Invoice; + + hasPaymentPreimage(): boolean; + clearPaymentPreimage(): void; + getPaymentPreimage(): string | undefined; + setPaymentPreimage(value: string): Invoice; + getState(): InvoiceState; + setState(value: InvoiceState): Invoice; + getBolt11(): string; + setBolt11(value: string): Invoice; + clearHtlcsList(): void; + getHtlcsList(): Array; + setHtlcsList(value: Array): Invoice; + addHtlcs(value?: Htlc, index?: number): Htlc; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Invoice.AsObject; + static toObject(includeInstance: boolean, msg: Invoice): Invoice.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Invoice, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): Invoice; + static deserializeBinaryFromReader( + message: Invoice, + reader: jspb.BinaryReader, + ): Invoice; +} + +export namespace Invoice { + export type AsObject = { + paymentHash: string; + paymentPreimage?: string; + state: InvoiceState; + bolt11: string; + htlcsList: Array; + }; +} + +export class ListResponse extends jspb.Message { + clearInvoicesList(): void; + getInvoicesList(): Array; + setInvoicesList(value: Array): ListResponse; + addInvoices(value?: Invoice, index?: number): Invoice; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListResponse, + ): ListResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): ListResponse; + static deserializeBinaryFromReader( + message: ListResponse, + reader: jspb.BinaryReader, + ): ListResponse; +} + +export namespace ListResponse { + export type AsObject = { + invoicesList: Array; + }; +} + +export class SettleRequest extends jspb.Message { + getPaymentPreimage(): string; + setPaymentPreimage(value: string): SettleRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SettleRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SettleRequest, + ): SettleRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SettleRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SettleRequest; + static deserializeBinaryFromReader( + message: SettleRequest, + reader: jspb.BinaryReader, + ): SettleRequest; +} + +export namespace SettleRequest { + export type AsObject = { + paymentPreimage: string; + }; +} + +export class SettleResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SettleResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SettleResponse, + ): SettleResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SettleResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): SettleResponse; + static deserializeBinaryFromReader( + message: SettleResponse, + reader: jspb.BinaryReader, + ): SettleResponse; +} + +export namespace SettleResponse { + export type AsObject = {}; +} + +export class CancelRequest extends jspb.Message { + getPaymentHash(): string; + setPaymentHash(value: string): CancelRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CancelRequest, + ): CancelRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CancelRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CancelRequest; + static deserializeBinaryFromReader( + message: CancelRequest, + reader: jspb.BinaryReader, + ): CancelRequest; +} + +export namespace CancelRequest { + export type AsObject = { + paymentHash: string; + }; +} + +export class CancelResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CancelResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CancelResponse, + ): CancelResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CancelResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): CancelResponse; + static deserializeBinaryFromReader( + message: CancelResponse, + reader: jspb.BinaryReader, + ): CancelResponse; +} + +export namespace CancelResponse { + export type AsObject = {}; +} + +export class TrackRequest extends jspb.Message { + getPaymentHash(): string; + setPaymentHash(value: string): TrackRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TrackRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: TrackRequest, + ): TrackRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TrackRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TrackRequest; + static deserializeBinaryFromReader( + message: TrackRequest, + reader: jspb.BinaryReader, + ): TrackRequest; +} + +export namespace TrackRequest { + export type AsObject = { + paymentHash: string; + }; +} + +export class TrackResponse extends jspb.Message { + getState(): InvoiceState; + setState(value: InvoiceState): TrackResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TrackResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: TrackResponse, + ): TrackResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TrackResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TrackResponse; + static deserializeBinaryFromReader( + message: TrackResponse, + reader: jspb.BinaryReader, + ): TrackResponse; +} + +export namespace TrackResponse { + export type AsObject = { + state: InvoiceState; + }; +} + +export class TrackAllRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TrackAllRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: TrackAllRequest, + ): TrackAllRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TrackAllRequest, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TrackAllRequest; + static deserializeBinaryFromReader( + message: TrackAllRequest, + reader: jspb.BinaryReader, + ): TrackAllRequest; +} + +export namespace TrackAllRequest { + export type AsObject = {}; +} + +export class TrackAllResponse extends jspb.Message { + getPaymentHash(): string; + setPaymentHash(value: string): TrackAllResponse; + getBolt11(): string; + setBolt11(value: string): TrackAllResponse; + getState(): InvoiceState; + setState(value: InvoiceState): TrackAllResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TrackAllResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: TrackAllResponse, + ): TrackAllResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: TrackAllResponse, + writer: jspb.BinaryWriter, + ): void; + static deserializeBinary(bytes: Uint8Array): TrackAllResponse; + static deserializeBinaryFromReader( + message: TrackAllResponse, + reader: jspb.BinaryReader, + ): TrackAllResponse; +} + +export namespace TrackAllResponse { + export type AsObject = { + paymentHash: string; + bolt11: string; + state: InvoiceState; + }; +} + +export enum InvoiceState { + INVOICE_UNPAID = 0, + INVOICE_ACCEPTED = 1, + INVOICE_PAID = 2, + INVOICE_CANCELLED = 3, +} + +export enum HtlcState { + HTLC_ACCEPTED = 0, + HTLC_SETTLED = 1, + HTLC_CANCELLED = 2, +} diff --git a/lib/proto/hold/hold_pb.js b/lib/proto/hold/hold_pb.js new file mode 100644 index 000000000..22866f3b0 --- /dev/null +++ b/lib/proto/hold/hold_pb.js @@ -0,0 +1,3719 @@ +// source: hold.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +goog.exportSymbol('proto.hold.CancelRequest', null, global); +goog.exportSymbol('proto.hold.CancelResponse', null, global); +goog.exportSymbol('proto.hold.GetInfoRequest', null, global); +goog.exportSymbol('proto.hold.GetInfoResponse', null, global); +goog.exportSymbol('proto.hold.Hop', null, global); +goog.exportSymbol('proto.hold.Htlc', null, global); +goog.exportSymbol('proto.hold.HtlcState', null, global); +goog.exportSymbol('proto.hold.Invoice', null, global); +goog.exportSymbol('proto.hold.InvoiceRequest', null, global); +goog.exportSymbol('proto.hold.InvoiceResponse', null, global); +goog.exportSymbol('proto.hold.InvoiceState', null, global); +goog.exportSymbol('proto.hold.ListRequest', null, global); +goog.exportSymbol('proto.hold.ListResponse', null, global); +goog.exportSymbol('proto.hold.RoutingHint', null, global); +goog.exportSymbol('proto.hold.RoutingHintsRequest', null, global); +goog.exportSymbol('proto.hold.RoutingHintsResponse', null, global); +goog.exportSymbol('proto.hold.SettleRequest', null, global); +goog.exportSymbol('proto.hold.SettleResponse', null, global); +goog.exportSymbol('proto.hold.TrackAllRequest', null, global); +goog.exportSymbol('proto.hold.TrackAllResponse', null, global); +goog.exportSymbol('proto.hold.TrackRequest', null, global); +goog.exportSymbol('proto.hold.TrackResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.GetInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.GetInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.GetInfoRequest.displayName = 'proto.hold.GetInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.GetInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.GetInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.GetInfoResponse.displayName = 'proto.hold.GetInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.InvoiceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.hold.InvoiceRequest.repeatedFields_, null); +}; +goog.inherits(proto.hold.InvoiceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.InvoiceRequest.displayName = 'proto.hold.InvoiceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.InvoiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.InvoiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.InvoiceResponse.displayName = 'proto.hold.InvoiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.RoutingHintsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.RoutingHintsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.RoutingHintsRequest.displayName = 'proto.hold.RoutingHintsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.Hop = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.Hop, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.Hop.displayName = 'proto.hold.Hop'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.RoutingHint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.hold.RoutingHint.repeatedFields_, null); +}; +goog.inherits(proto.hold.RoutingHint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.RoutingHint.displayName = 'proto.hold.RoutingHint'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.RoutingHintsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.hold.RoutingHintsResponse.repeatedFields_, null); +}; +goog.inherits(proto.hold.RoutingHintsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.RoutingHintsResponse.displayName = 'proto.hold.RoutingHintsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.ListRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.ListRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.ListRequest.displayName = 'proto.hold.ListRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.Htlc = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.Htlc, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.Htlc.displayName = 'proto.hold.Htlc'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.Invoice = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.hold.Invoice.repeatedFields_, null); +}; +goog.inherits(proto.hold.Invoice, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.Invoice.displayName = 'proto.hold.Invoice'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.ListResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.hold.ListResponse.repeatedFields_, null); +}; +goog.inherits(proto.hold.ListResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.ListResponse.displayName = 'proto.hold.ListResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.SettleRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.SettleRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.SettleRequest.displayName = 'proto.hold.SettleRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.SettleResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.SettleResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.SettleResponse.displayName = 'proto.hold.SettleResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.CancelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.CancelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.CancelRequest.displayName = 'proto.hold.CancelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.CancelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.CancelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.CancelResponse.displayName = 'proto.hold.CancelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.TrackRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.TrackRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.TrackRequest.displayName = 'proto.hold.TrackRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.TrackResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.TrackResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.TrackResponse.displayName = 'proto.hold.TrackResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.TrackAllRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.TrackAllRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.TrackAllRequest.displayName = 'proto.hold.TrackAllRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.hold.TrackAllResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.hold.TrackAllResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.hold.TrackAllResponse.displayName = 'proto.hold.TrackAllResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.hold.GetInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.GetInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.GetInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.GetInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.hold.GetInfoRequest} + */ +proto.hold.GetInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.GetInfoRequest; + return proto.hold.GetInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.GetInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.GetInfoRequest} + */ +proto.hold.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.GetInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.GetInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.GetInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.GetInfoRequest.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.hold.GetInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.GetInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.GetInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.GetInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + version: 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.hold.GetInfoResponse} + */ +proto.hold.GetInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.GetInfoResponse; + return proto.hold.GetInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.GetInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.GetInfoResponse} + */ +proto.hold.GetInfoResponse.deserializeBinaryFromReader = function(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.GetInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.GetInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.GetInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.GetInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.hold.GetInfoResponse.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.GetInfoResponse} returns this + */ +proto.hold.GetInfoResponse.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.hold.InvoiceRequest.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.hold.InvoiceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.InvoiceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.InvoiceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.InvoiceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + amountMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + expiry: jspb.Message.getFieldWithDefault(msg, 4, 0), + minFinalCltvExpiry: jspb.Message.getFieldWithDefault(msg, 5, 0), + routingHintsList: jspb.Message.toObjectList(msg.getRoutingHintsList(), + proto.hold.RoutingHint.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.hold.InvoiceRequest} + */ +proto.hold.InvoiceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.InvoiceRequest; + return proto.hold.InvoiceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.InvoiceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.InvoiceRequest} + */ +proto.hold.InvoiceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmountMsat(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiry(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinFinalCltvExpiry(value); + break; + case 6: + var value = new proto.hold.RoutingHint; + reader.readMessage(value,proto.hold.RoutingHint.deserializeBinaryFromReader); + msg.addRoutingHints(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.InvoiceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.InvoiceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.InvoiceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.InvoiceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmountMsat(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint64( + 5, + f + ); + } + f = message.getRoutingHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.hold.RoutingHint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string payment_hash = 1; + * @return {string} + */ +proto.hold.InvoiceRequest.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount_msat = 2; + * @return {number} + */ +proto.hold.InvoiceRequest.prototype.getAmountMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.setAmountMsat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.hold.InvoiceRequest.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.setDescription = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.clearDescription = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.hold.InvoiceRequest.prototype.hasDescription = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 expiry = 4; + * @return {number} + */ +proto.hold.InvoiceRequest.prototype.getExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.setExpiry = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.clearExpiry = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.hold.InvoiceRequest.prototype.hasExpiry = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 min_final_cltv_expiry = 5; + * @return {number} + */ +proto.hold.InvoiceRequest.prototype.getMinFinalCltvExpiry = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.setMinFinalCltvExpiry = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.clearMinFinalCltvExpiry = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.hold.InvoiceRequest.prototype.hasMinFinalCltvExpiry = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated RoutingHint routing_hints = 6; + * @return {!Array} + */ +proto.hold.InvoiceRequest.prototype.getRoutingHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.hold.RoutingHint, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.hold.InvoiceRequest} returns this +*/ +proto.hold.InvoiceRequest.prototype.setRoutingHintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.hold.RoutingHint=} opt_value + * @param {number=} opt_index + * @return {!proto.hold.RoutingHint} + */ +proto.hold.InvoiceRequest.prototype.addRoutingHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.hold.RoutingHint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.hold.InvoiceRequest} returns this + */ +proto.hold.InvoiceRequest.prototype.clearRoutingHintsList = function() { + return this.setRoutingHintsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.hold.InvoiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.InvoiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.InvoiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.InvoiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + bolt11: 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.hold.InvoiceResponse} + */ +proto.hold.InvoiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.InvoiceResponse; + return proto.hold.InvoiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.InvoiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.InvoiceResponse} + */ +proto.hold.InvoiceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.InvoiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.InvoiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.InvoiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.InvoiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string bolt11 = 1; + * @return {string} + */ +proto.hold.InvoiceResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.InvoiceResponse} returns this + */ +proto.hold.InvoiceResponse.prototype.setBolt11 = 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.hold.RoutingHintsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.RoutingHintsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.RoutingHintsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.RoutingHintsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + node: 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.hold.RoutingHintsRequest} + */ +proto.hold.RoutingHintsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.RoutingHintsRequest; + return proto.hold.RoutingHintsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.RoutingHintsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.RoutingHintsRequest} + */ +proto.hold.RoutingHintsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.RoutingHintsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.RoutingHintsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.RoutingHintsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.RoutingHintsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNode(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string node = 1; + * @return {string} + */ +proto.hold.RoutingHintsRequest.prototype.getNode = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.RoutingHintsRequest} returns this + */ +proto.hold.RoutingHintsRequest.prototype.setNode = 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.hold.Hop.prototype.toObject = function(opt_includeInstance) { + return proto.hold.Hop.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.Hop} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.Hop.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + shortChannelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + baseFee: jspb.Message.getFieldWithDefault(msg, 3, 0), + ppmFee: jspb.Message.getFieldWithDefault(msg, 4, 0), + cltvExpiryDelta: 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.hold.Hop} + */ +proto.hold.Hop.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.Hop; + return proto.hold.Hop.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.Hop} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.Hop} + */ +proto.hold.Hop.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setShortChannelId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBaseFee(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPpmFee(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCltvExpiryDelta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.Hop.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.Hop.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.Hop} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.Hop.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getShortChannelId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBaseFee(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPpmFee(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getCltvExpiryDelta(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional string public_key = 1; + * @return {string} + */ +proto.hold.Hop.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.Hop} returns this + */ +proto.hold.Hop.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string short_channel_id = 2; + * @return {string} + */ +proto.hold.Hop.prototype.getShortChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.Hop} returns this + */ +proto.hold.Hop.prototype.setShortChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 base_fee = 3; + * @return {number} + */ +proto.hold.Hop.prototype.getBaseFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.Hop} returns this + */ +proto.hold.Hop.prototype.setBaseFee = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 ppm_fee = 4; + * @return {number} + */ +proto.hold.Hop.prototype.getPpmFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.Hop} returns this + */ +proto.hold.Hop.prototype.setPpmFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 cltv_expiry_delta = 5; + * @return {number} + */ +proto.hold.Hop.prototype.getCltvExpiryDelta = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.Hop} returns this + */ +proto.hold.Hop.prototype.setCltvExpiryDelta = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.hold.RoutingHint.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.hold.RoutingHint.prototype.toObject = function(opt_includeInstance) { + return proto.hold.RoutingHint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.RoutingHint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.RoutingHint.toObject = function(includeInstance, msg) { + var f, obj = { + hopsList: jspb.Message.toObjectList(msg.getHopsList(), + proto.hold.Hop.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.hold.RoutingHint} + */ +proto.hold.RoutingHint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.RoutingHint; + return proto.hold.RoutingHint.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.RoutingHint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.RoutingHint} + */ +proto.hold.RoutingHint.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.hold.Hop; + reader.readMessage(value,proto.hold.Hop.deserializeBinaryFromReader); + msg.addHops(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.RoutingHint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.RoutingHint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.RoutingHint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.RoutingHint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHopsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.hold.Hop.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Hop hops = 1; + * @return {!Array} + */ +proto.hold.RoutingHint.prototype.getHopsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.hold.Hop, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.hold.RoutingHint} returns this +*/ +proto.hold.RoutingHint.prototype.setHopsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.hold.Hop=} opt_value + * @param {number=} opt_index + * @return {!proto.hold.Hop} + */ +proto.hold.RoutingHint.prototype.addHops = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.hold.Hop, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.hold.RoutingHint} returns this + */ +proto.hold.RoutingHint.prototype.clearHopsList = function() { + return this.setHopsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.hold.RoutingHintsResponse.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.hold.RoutingHintsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.RoutingHintsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.RoutingHintsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.RoutingHintsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hintsList: jspb.Message.toObjectList(msg.getHintsList(), + proto.hold.RoutingHint.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.hold.RoutingHintsResponse} + */ +proto.hold.RoutingHintsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.RoutingHintsResponse; + return proto.hold.RoutingHintsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.RoutingHintsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.RoutingHintsResponse} + */ +proto.hold.RoutingHintsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.hold.RoutingHint; + reader.readMessage(value,proto.hold.RoutingHint.deserializeBinaryFromReader); + msg.addHints(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.RoutingHintsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.RoutingHintsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.RoutingHintsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.RoutingHintsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHintsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.hold.RoutingHint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RoutingHint hints = 1; + * @return {!Array} + */ +proto.hold.RoutingHintsResponse.prototype.getHintsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.hold.RoutingHint, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.hold.RoutingHintsResponse} returns this +*/ +proto.hold.RoutingHintsResponse.prototype.setHintsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.hold.RoutingHint=} opt_value + * @param {number=} opt_index + * @return {!proto.hold.RoutingHint} + */ +proto.hold.RoutingHintsResponse.prototype.addHints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.hold.RoutingHint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.hold.RoutingHintsResponse} returns this + */ +proto.hold.RoutingHintsResponse.prototype.clearHintsList = function() { + return this.setHintsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.hold.ListRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.ListRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.ListRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.ListRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: 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.hold.ListRequest} + */ +proto.hold.ListRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.ListRequest; + return proto.hold.ListRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.ListRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.ListRequest} + */ +proto.hold.ListRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.ListRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.ListRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.ListRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.ListRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string payment_hash = 1; + * @return {string} + */ +proto.hold.ListRequest.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.ListRequest} returns this + */ +proto.hold.ListRequest.prototype.setPaymentHash = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.hold.ListRequest} returns this + */ +proto.hold.ListRequest.prototype.clearPaymentHash = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.hold.ListRequest.prototype.hasPaymentHash = 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.hold.Htlc.prototype.toObject = function(opt_includeInstance) { + return proto.hold.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.hold.Htlc} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.Htlc.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + msat: jspb.Message.getFieldWithDefault(msg, 2, 0), + creationTime: 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.hold.Htlc} + */ +proto.hold.Htlc.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.Htlc; + return proto.hold.Htlc.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.Htlc} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.Htlc} + */ +proto.hold.Htlc.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.hold.HtlcState} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMsat(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreationTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.Htlc.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.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.hold.Htlc} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.Htlc.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMsat(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getCreationTime(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional HtlcState state = 1; + * @return {!proto.hold.HtlcState} + */ +proto.hold.Htlc.prototype.getState = function() { + return /** @type {!proto.hold.HtlcState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.hold.HtlcState} value + * @return {!proto.hold.Htlc} returns this + */ +proto.hold.Htlc.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint64 msat = 2; + * @return {number} + */ +proto.hold.Htlc.prototype.getMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.Htlc} returns this + */ +proto.hold.Htlc.prototype.setMsat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 creation_time = 3; + * @return {number} + */ +proto.hold.Htlc.prototype.getCreationTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.hold.Htlc} returns this + */ +proto.hold.Htlc.prototype.setCreationTime = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.hold.Invoice.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.hold.Invoice.prototype.toObject = function(opt_includeInstance) { + return proto.hold.Invoice.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.Invoice} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.Invoice.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + paymentPreimage: jspb.Message.getFieldWithDefault(msg, 2, ""), + state: jspb.Message.getFieldWithDefault(msg, 3, 0), + bolt11: jspb.Message.getFieldWithDefault(msg, 4, ""), + htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), + proto.hold.Htlc.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.hold.Invoice} + */ +proto.hold.Invoice.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.Invoice; + return proto.hold.Invoice.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.Invoice} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.Invoice} + */ +proto.hold.Invoice.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentPreimage(value); + break; + case 3: + var value = /** @type {!proto.hold.InvoiceState} */ (reader.readEnum()); + msg.setState(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 5: + var value = new proto.hold.Htlc; + reader.readMessage(value,proto.hold.Htlc.deserializeBinaryFromReader); + msg.addHtlcs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.Invoice.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.Invoice.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.Invoice} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.Invoice.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getHtlcsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.hold.Htlc.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string payment_hash = 1; + * @return {string} + */ +proto.hold.Invoice.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.Invoice} returns this + */ +proto.hold.Invoice.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string payment_preimage = 2; + * @return {string} + */ +proto.hold.Invoice.prototype.getPaymentPreimage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.Invoice} returns this + */ +proto.hold.Invoice.prototype.setPaymentPreimage = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.hold.Invoice} returns this + */ +proto.hold.Invoice.prototype.clearPaymentPreimage = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.hold.Invoice.prototype.hasPaymentPreimage = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional InvoiceState state = 3; + * @return {!proto.hold.InvoiceState} + */ +proto.hold.Invoice.prototype.getState = function() { + return /** @type {!proto.hold.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.hold.InvoiceState} value + * @return {!proto.hold.Invoice} returns this + */ +proto.hold.Invoice.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string bolt11 = 4; + * @return {string} + */ +proto.hold.Invoice.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.Invoice} returns this + */ +proto.hold.Invoice.prototype.setBolt11 = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated Htlc htlcs = 5; + * @return {!Array} + */ +proto.hold.Invoice.prototype.getHtlcsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.hold.Htlc, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.hold.Invoice} returns this +*/ +proto.hold.Invoice.prototype.setHtlcsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.hold.Htlc=} opt_value + * @param {number=} opt_index + * @return {!proto.hold.Htlc} + */ +proto.hold.Invoice.prototype.addHtlcs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.hold.Htlc, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.hold.Invoice} returns this + */ +proto.hold.Invoice.prototype.clearHtlcsList = function() { + return this.setHtlcsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.hold.ListResponse.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.hold.ListResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.ListResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.ListResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.ListResponse.toObject = function(includeInstance, msg) { + var f, obj = { + invoicesList: jspb.Message.toObjectList(msg.getInvoicesList(), + proto.hold.Invoice.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.hold.ListResponse} + */ +proto.hold.ListResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.ListResponse; + return proto.hold.ListResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.ListResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.ListResponse} + */ +proto.hold.ListResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.hold.Invoice; + reader.readMessage(value,proto.hold.Invoice.deserializeBinaryFromReader); + msg.addInvoices(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.ListResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.ListResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.ListResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.ListResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInvoicesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.hold.Invoice.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Invoice invoices = 1; + * @return {!Array} + */ +proto.hold.ListResponse.prototype.getInvoicesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.hold.Invoice, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.hold.ListResponse} returns this +*/ +proto.hold.ListResponse.prototype.setInvoicesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.hold.Invoice=} opt_value + * @param {number=} opt_index + * @return {!proto.hold.Invoice} + */ +proto.hold.ListResponse.prototype.addInvoices = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.hold.Invoice, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.hold.ListResponse} returns this + */ +proto.hold.ListResponse.prototype.clearInvoicesList = function() { + return this.setInvoicesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.hold.SettleRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.SettleRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.SettleRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.SettleRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentPreimage: 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.hold.SettleRequest} + */ +proto.hold.SettleRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.SettleRequest; + return proto.hold.SettleRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.SettleRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.SettleRequest} + */ +proto.hold.SettleRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentPreimage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.SettleRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.SettleRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.SettleRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.SettleRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentPreimage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string payment_preimage = 1; + * @return {string} + */ +proto.hold.SettleRequest.prototype.getPaymentPreimage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.SettleRequest} returns this + */ +proto.hold.SettleRequest.prototype.setPaymentPreimage = 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.hold.SettleResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.SettleResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.SettleResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.SettleResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.hold.SettleResponse} + */ +proto.hold.SettleResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.SettleResponse; + return proto.hold.SettleResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.SettleResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.SettleResponse} + */ +proto.hold.SettleResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.SettleResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.SettleResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.SettleResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.SettleResponse.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.hold.CancelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.CancelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.CancelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.CancelRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: 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.hold.CancelRequest} + */ +proto.hold.CancelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.CancelRequest; + return proto.hold.CancelRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.CancelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.CancelRequest} + */ +proto.hold.CancelRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.CancelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.CancelRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.CancelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.CancelRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string payment_hash = 1; + * @return {string} + */ +proto.hold.CancelRequest.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.CancelRequest} returns this + */ +proto.hold.CancelRequest.prototype.setPaymentHash = 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.hold.CancelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.CancelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.CancelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.CancelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.hold.CancelResponse} + */ +proto.hold.CancelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.CancelResponse; + return proto.hold.CancelResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.CancelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.CancelResponse} + */ +proto.hold.CancelResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.CancelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.CancelResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.CancelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.CancelResponse.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.hold.TrackRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.TrackRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.TrackRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: 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.hold.TrackRequest} + */ +proto.hold.TrackRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.TrackRequest; + return proto.hold.TrackRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.TrackRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.TrackRequest} + */ +proto.hold.TrackRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.TrackRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.TrackRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.TrackRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string payment_hash = 1; + * @return {string} + */ +proto.hold.TrackRequest.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.TrackRequest} returns this + */ +proto.hold.TrackRequest.prototype.setPaymentHash = 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.hold.TrackResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.TrackResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.TrackResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackResponse.toObject = function(includeInstance, msg) { + var f, obj = { + state: 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.hold.TrackResponse} + */ +proto.hold.TrackResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.TrackResponse; + return proto.hold.TrackResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.TrackResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.TrackResponse} + */ +proto.hold.TrackResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.hold.InvoiceState} */ (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.hold.TrackResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.TrackResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.TrackResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional InvoiceState state = 1; + * @return {!proto.hold.InvoiceState} + */ +proto.hold.TrackResponse.prototype.getState = function() { + return /** @type {!proto.hold.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.hold.InvoiceState} value + * @return {!proto.hold.TrackResponse} returns this + */ +proto.hold.TrackResponse.prototype.setState = 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.hold.TrackAllRequest.prototype.toObject = function(opt_includeInstance) { + return proto.hold.TrackAllRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.TrackAllRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackAllRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.hold.TrackAllRequest} + */ +proto.hold.TrackAllRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.TrackAllRequest; + return proto.hold.TrackAllRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.TrackAllRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.TrackAllRequest} + */ +proto.hold.TrackAllRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.hold.TrackAllRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.TrackAllRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.TrackAllRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackAllRequest.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.hold.TrackAllResponse.prototype.toObject = function(opt_includeInstance) { + return proto.hold.TrackAllResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.hold.TrackAllResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackAllResponse.toObject = function(includeInstance, msg) { + var f, obj = { + paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + bolt11: jspb.Message.getFieldWithDefault(msg, 2, ""), + state: 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.hold.TrackAllResponse} + */ +proto.hold.TrackAllResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.hold.TrackAllResponse; + return proto.hold.TrackAllResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.hold.TrackAllResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.hold.TrackAllResponse} + */ +proto.hold.TrackAllResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPaymentHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBolt11(value); + break; + case 3: + var value = /** @type {!proto.hold.InvoiceState} */ (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.hold.TrackAllResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.hold.TrackAllResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.hold.TrackAllResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.hold.TrackAllResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPaymentHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBolt11(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } +}; + + +/** + * optional string payment_hash = 1; + * @return {string} + */ +proto.hold.TrackAllResponse.prototype.getPaymentHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.TrackAllResponse} returns this + */ +proto.hold.TrackAllResponse.prototype.setPaymentHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bolt11 = 2; + * @return {string} + */ +proto.hold.TrackAllResponse.prototype.getBolt11 = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.hold.TrackAllResponse} returns this + */ +proto.hold.TrackAllResponse.prototype.setBolt11 = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional InvoiceState state = 3; + * @return {!proto.hold.InvoiceState} + */ +proto.hold.TrackAllResponse.prototype.getState = function() { + return /** @type {!proto.hold.InvoiceState} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.hold.InvoiceState} value + * @return {!proto.hold.TrackAllResponse} returns this + */ +proto.hold.TrackAllResponse.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.hold.InvoiceState = { + INVOICE_UNPAID: 0, + INVOICE_ACCEPTED: 1, + INVOICE_PAID: 2, + INVOICE_CANCELLED: 3 +}; + +/** + * @enum {number} + */ +proto.hold.HtlcState = { + HTLC_ACCEPTED: 0, + HTLC_SETTLED: 1, + HTLC_CANCELLED: 2 +}; + +goog.object.extend(exports, proto.hold); diff --git a/lib/rates/data/DataAggregator.ts b/lib/rates/data/DataAggregator.ts index 3fd648ff3..4bc570e00 100644 --- a/lib/rates/data/DataAggregator.ts +++ b/lib/rates/data/DataAggregator.ts @@ -3,7 +3,6 @@ import Kraken from './exchanges/Kraken'; import { getPairId } from '../../Utils'; import Binance from './exchanges/Binance'; import Bitfinex from './exchanges/Bitfinex'; -import Poloniex from './exchanges/Poloniex'; import CoinbasePro from './exchanges/CoinbasePro'; class DataAggregator { @@ -11,7 +10,6 @@ class DataAggregator { new Kraken(), new Binance(), new Bitfinex(), - new Poloniex(), new CoinbasePro(), ]; diff --git a/lib/rates/data/exchanges/Poloniex.ts b/lib/rates/data/exchanges/Poloniex.ts deleted file mode 100644 index ea1736075..000000000 --- a/lib/rates/data/exchanges/Poloniex.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Exchange, { makeRequest } from '../Exchange'; - -class Poloniex implements Exchange { - private static readonly API = 'https://poloniex.com/public'; - - public async getPrice( - baseAsset: string, - quoteAsset: string, - ): Promise { - const response = await makeRequest(`${Poloniex.API}?command=returnTicker`); - const pairData = - response[`${quoteAsset.toUpperCase()}_${baseAsset.toUpperCase()}`]; - - return Number(pairData.last); - } -} - -export default Poloniex; diff --git a/lib/service/NodeInfo.ts b/lib/service/NodeInfo.ts index a6ad61c23..77d4ab321 100644 --- a/lib/service/NodeInfo.ts +++ b/lib/service/NodeInfo.ts @@ -1,7 +1,9 @@ import { scheduleJob, Job } from 'node-schedule'; import Logger from '../Logger'; -import { splitChannelPoint } from '../Utils'; +import ClnClient from '../lightning/ClnClient'; +import LndClient from '../lightning/LndClient'; import { Currency } from '../wallet/WalletManager'; +import NodeSwitch from '../swap/NodeSwitch'; type LndNodeInfo = { nodeKey: string; @@ -52,38 +54,48 @@ class NodeInfo { private update = async () => { for (const [symbol, currency] of this.currencies) { - if (currency.lndClient === undefined) { - return; + if (!NodeSwitch.hasClient(currency)) { + continue; } - const lndInfo = await currency.lndClient.getInfo(); + const clients = [currency.lndClient, currency.clnClient].filter( + (client): client is LndClient | ClnClient => client !== undefined, + ); + + const infos = await Promise.all( + clients.map((client) => client.getInfo()), + ); + + // TODO: how to handle both, lnd and cln this.uris.set(symbol, { - uris: lndInfo.urisList, - nodeKey: lndInfo.identityPubkey, + uris: infos[0].uris, + nodeKey: infos[0].pubkey, }); - const channels = await currency.lndClient.listChannels(); - const publicChannels = channels.channelsList.filter( - (chan) => !chan.pb_private, + const channelInfos = await Promise.all( + clients.map((client) => client?.listChannels()), ); + const channels = channelInfos.flatMap((infos) => infos); + + const publicChannels = channels.filter((chan) => !chan.private); let oldestChannelBlockTime: number | undefined; - if (channels.channelsList.length > 0) { - const oldestChannel = channels.channelsList.reduce((prev, cur) => { + if (channels.length > 0) { + const oldestChannel = channels.reduce((prev, cur) => { return Number(prev.chanId) < Number(cur.chanId) ? prev : cur; }); oldestChannelBlockTime = ( await currency.chainClient!.getRawTransactionVerbose( - splitChannelPoint(oldestChannel.channelPoint).id, + oldestChannel.fundingTransactionId, ) ).blocktime; } this.stats.set(symbol, { - peers: lndInfo.numPeers, channels: publicChannels.length, oldestChannel: oldestChannelBlockTime, + peers: infos.reduce((sum, info) => sum + info.peers, 0), capacity: publicChannels.reduce((sum, chan) => sum + chan.capacity, 0), }); } diff --git a/lib/service/Service.ts b/lib/service/Service.ts index 6a4c730fa..50d3dc088 100644 --- a/lib/service/Service.ts +++ b/lib/service/Service.ts @@ -14,9 +14,13 @@ import { PairConfig } from '../consts/Types'; import ElementsService from './ElementsService'; import SwapOutputType from '../swap/SwapOutputType'; import ElementsClient from '../chain/ElementsClient'; +import { + HopHint, + InvoiceFeature, + PaymentResponse, +} from '../lightning/LightningClient'; import InvoiceExpiryHelper from './InvoiceExpiryHelper'; import PaymentRequestUtils from './PaymentRequestUtils'; -import { Payment, RouteHint } from '../proto/lnd/rpc_pb'; import PairRepository from '../db/repositories/PairRepository'; import SwapRepository from '../db/repositories/SwapRepository'; import RateProvider, { PairType } from '../rates/RateProvider'; @@ -231,19 +235,23 @@ class Service { const channels = new LndChannels(); - channels.setActive(lndInfo.numActiveChannels); - channels.setInactive(lndInfo.numInactiveChannels); - channels.setPending(lndInfo.numPendingChannels); + channels.setActive(lndInfo.channels.active); + channels.setInactive(lndInfo.channels.inactive); + channels.setPending(lndInfo.channels.pending); lnd.setLndChannels(channels); lnd.setVersion(lndInfo.version); lnd.setBlockHeight(lndInfo.blockHeight); } catch (error) { - lnd.setError((error as any).details); + lnd.setError( + typeof error === 'object' ? (error as any).details : error, + ); } } + // TODO: cln + const currencyInfo = new CurrencyInfo(); currencyInfo.setChain(chain); currencyInfo.setLnd(lnd); @@ -278,7 +286,7 @@ class Service { if (currencyInfo && currencyInfo.lndClient) { const lightningBalance = new LightningBalance(); - const { channelsList } = await currencyInfo.lndClient.listChannels(); + const channelsList = await currencyInfo.lndClient.listChannels(); let localBalance = 0; let remoteBalance = 0; @@ -344,16 +352,8 @@ class Service { public getRoutingHints = ( symbol: string, routingNode: string, - ): RouteHint.AsObject[] => { - const response: RouteHint.AsObject[] = []; - - const hints = this.swapManager.routingHints.getRoutingHints( - symbol, - routingNode, - ); - hints.forEach((hint) => response.push(hint.toObject())); - - return response; + ): Promise => { + return this.swapManager.routingHints.getRoutingHints(symbol, routingNode); }; public getTimeouts = () => { @@ -867,11 +867,12 @@ class Service { swap.orderSide, false, ); + // TODO: swap in cln const lndClient = this.currencies.get(lightningCurrency)!.lndClient!; const [cltvLimit, decodedInvoice] = await Promise.all([ this.timeoutDeltaProvider.getCltvLimit(swap), - lndClient.decodePayReqRawResponse(invoice), + lndClient.decodeInvoice(invoice), ]); const requiredTimeout = await this.timeoutDeltaProvider.checkRoutability( @@ -917,13 +918,12 @@ class Service { false, ); - const decodedInvoice = await this.getCurrency( - lightningCurrency, - ).lndClient!.decodePayReq(invoice); - for (const [, feature] of decodedInvoice.featuresMap) { - if (feature.name == 'amp') { - throw Errors.AMP_INVOICES_NOT_SUPPORTED(); - } + const decodedInvoice = + await this.getCurrency(lightningCurrency).lndClient!.decodeInvoice( + invoice, + ); + if (decodedInvoice.features.has(InvoiceFeature.AMP)) { + throw Errors.AMP_INVOICES_NOT_SUPPORTED(); } const invoiceAmount = decodeInvoice(invoice).satoshis!; @@ -1342,7 +1342,7 @@ class Service { public payInvoice = async ( symbol: string, invoice: string, - ): Promise => { + ): Promise => { const { lndClient } = this.getCurrency(symbol); if (!lndClient) { @@ -1398,9 +1398,8 @@ class Service { } if (routingNode) { - const referral = await ReferralRepository.getReferralByRoutingNode( - routingNode, - ); + const referral = + await ReferralRepository.getReferralByRoutingNode(routingNode); if (referral) { return referral.id; diff --git a/lib/service/TimeoutDeltaProvider.ts b/lib/service/TimeoutDeltaProvider.ts index e62ae8044..2ce57a6d2 100644 --- a/lib/service/TimeoutDeltaProvider.ts +++ b/lib/service/TimeoutDeltaProvider.ts @@ -6,12 +6,16 @@ import Swap from '../db/models/Swap'; import { ConfigType } from '../Config'; import { OrderSide } from '../consts/Enums'; import { PairConfig } from '../consts/Types'; -import { PayReq } from '../proto/lnd/rpc_pb'; import RoutingOffsets from './RoutingOffsets'; import LndClient from '../lightning/LndClient'; import { Currency } from '../wallet/WalletManager'; import ElementsClient from '../chain/ElementsClient'; import EthereumManager from '../wallet/ethereum/EthereumManager'; +import { + DecodedInvoice, + InvoiceFeature, + LightningClient, +} from '../lightning/LightningClient'; import { getChainCurrency, getLightningCurrency, @@ -184,42 +188,34 @@ class TimeoutDeltaProvider { }; public checkRoutability = async ( - lnd: LndClient, - decodedInvoice: PayReq, + lnd: LightningClient, + decodedInvoice: DecodedInvoice, cltvLimit: number, ) => { try { // Check whether the receiving side supports MPP and if so, // query a route for the number of sats of the invoice divided // by the max payment parts we tell to LND to use - const supportsMpp = decodedInvoice - .toObject() - .featuresMap.map( - ([, feature]) => - feature.name === 'multi-path-payments' && - (feature.isKnown || feature.isRequired), - ) - .some((val) => val); + const supportsMpp = decodedInvoice.features.has(InvoiceFeature.MPP); + // TODO: CLN adjustments const amountToQuery = Math.max( supportsMpp - ? Math.ceil( - decodedInvoice.getNumSatoshis() / LndClient.paymentMaxParts, - ) - : decodedInvoice.getNumSatoshis(), + ? Math.ceil(decodedInvoice.value / LndClient.paymentMaxParts) + : decodedInvoice.value, 1, ); const routes = await lnd.queryRoutes( - decodedInvoice.getDestination(), + decodedInvoice.destination, amountToQuery, cltvLimit, - decodedInvoice.getCltvExpiry(), - decodedInvoice.getRouteHintsList(), + decodedInvoice.cltvExpiry, + decodedInvoice.routingHints, ); - return routes.routesList.reduce( - (highest, r) => (highest > r.totalTimeLock ? highest : r.totalTimeLock), + return routes.reduce( + (highest, r) => (highest > r.ctlv ? highest : r.ctlv), TimeoutDeltaProvider.noRoutes, ); } catch (error) { @@ -237,7 +233,7 @@ class TimeoutDeltaProvider { invoice: string, ): Promise<[number, boolean]> => { const { lndClient, chainClient } = this.currencies.get(lightningCurrency)!; - const decodedInvoice = await lndClient!.decodePayReqRawResponse(invoice); + const decodedInvoice = await lndClient!.decodeInvoice(invoice); const [routeTimeLock, chainInfo] = await Promise.all([ this.checkRoutability( @@ -264,9 +260,9 @@ class TimeoutDeltaProvider { const routingOffset = this.routingOffsets.getOffset( pair, - decodedInvoice.getNumSatoshis(), + decodedInvoice.value, lightningCurrency, - decodedInvoice.getDestination(), + decodedInvoice.destination, ); const finalExpiry = routeDeltaMinutes + routingOffset; diff --git a/lib/swap/ChannelNursery.ts b/lib/swap/ChannelNursery.ts index cff651962..a90004962 100644 --- a/lib/swap/ChannelNursery.ts +++ b/lib/swap/ChannelNursery.ts @@ -4,6 +4,7 @@ import AsyncLock from 'async-lock'; import { EventEmitter } from 'events'; import Logger from '../Logger'; import Swap from '../db/models/Swap'; +import LndClient from '../lightning/LndClient'; import { Currency } from '../wallet/WalletManager'; import { ChannelPoint } from '../proto/lnd/rpc_pb'; import ChannelCreation from '../db/models/ChannelCreation'; @@ -13,12 +14,11 @@ import { ChannelCreationStatus, SwapUpdateEvent } from '../consts/Enums'; import ChannelCreationRepository from '../db/repositories/ChannelCreationRepository'; import { formatError, - getChainCurrency, + splitPairId, getHexString, - getLightningCurrency, reverseBuffer, - splitChannelPoint, - splitPairId, + getChainCurrency, + getLightningCurrency, } from '../Utils'; interface ChannelNursery { @@ -33,6 +33,8 @@ interface ChannelNursery { ): boolean; } +// TODO: cln compatibility + class ChannelNursery extends EventEmitter { private connectionHelper: ConnectionHelper; @@ -60,6 +62,7 @@ class ChannelNursery extends EventEmitter { swap: Swap, outgoingChannelId: string, ) => Promise, + private overrideAllow = false, ) { super(); @@ -67,6 +70,10 @@ class ChannelNursery extends EventEmitter { } public init = async (currencies: Currency[]): Promise => { + if (!this.overrideAllow) { + return; + } + currencies.forEach((currency) => { this.currencies.set(currency.symbol, currency); @@ -159,6 +166,10 @@ class ChannelNursery extends EventEmitter { swap: Swap, channelCreation: ChannelCreation, ): Promise => { + if (!this.overrideAllow) { + return; + } + const { satoshis, payeeNodeKey } = bolt11.decode( swap.invoice!, lightningCurrency.network, @@ -180,7 +191,7 @@ class ChannelNursery extends EventEmitter { // TODO: handle custom errors (c-lightning plugin)? try { const { fundingTxidBytes, outputIndex } = - await lightningCurrency.lndClient!.openChannel( + await (lightningCurrency.lndClient as LndClient)!.openChannel( payeeNodeKey!, channelCapacity, channelCreation.private, @@ -247,7 +258,7 @@ class ChannelNursery extends EventEmitter { case `2 UNKNOWN: peer ${payeeNodeKey} is not online`: try { await this.connectionHelper.connectByPublicKey( - lightningCurrency.lndClient!, + lightningCurrency.lndClient! as LndClient, payeeNodeKey!, ); // The channel opening should *not* be retried here since the "peer.online" subscription of the LND client does handle it already @@ -288,7 +299,7 @@ class ChannelNursery extends EventEmitter { const lightningCurrency = this.getCurrency(swap!, true); const currency = this.currencies.get(lightningCurrency)!; - const peers = await currency.lndClient!.listPeers(); + const peers = await (currency.lndClient as LndClient)!.listPeers(); // Only try to open a channel if other side is connected to us for (const peer of peers.peersList) { @@ -310,16 +321,14 @@ class ChannelNursery extends EventEmitter { this.getCurrency(swap!, true), )!; - const activeChannels = await lightningCurrency.lndClient!.listChannels( - true, - ); - - for (const channel of activeChannels.channelsList) { - const channelPoint = splitChannelPoint(channel.channelPoint); + const activeChannels = + await lightningCurrency.lndClient!.listChannels(true); + for (const channel of activeChannels) { if ( - channelPoint.id === channelCreation.fundingTransactionId && - channelPoint.vout === channelCreation.fundingTransactionVout + channel.fundingTransactionId === channelCreation.fundingTransactionId && + channel.fundingTransactionVout === + channelCreation.fundingTransactionVout ) { this.logger.verbose( `Attempting to settle Channel Creation Swap: ${swap!.id}`, diff --git a/lib/swap/LightningNursery.ts b/lib/swap/LightningNursery.ts index ae7dd71a1..45fce68e4 100644 --- a/lib/swap/LightningNursery.ts +++ b/lib/swap/LightningNursery.ts @@ -2,13 +2,14 @@ import { Op } from 'sequelize'; import AsyncLock from 'async-lock'; import { EventEmitter } from 'events'; import Logger from '../Logger'; -import { Invoice } from '../proto/lnd/rpc_pb'; +import ClnClient from '../lightning/ClnClient'; import LndClient from '../lightning/LndClient'; import { SwapUpdateEvent } from '../consts/Enums'; import ReverseSwap from '../db/models/ReverseSwap'; import { Currency } from '../wallet/WalletManager'; import { decodeInvoice, getHexBuffer } from '../Utils'; import ReverseSwapRepository from '../db/repositories/ReverseSwapRepository'; +import { InvoiceState, LightningClient } from '../lightning/LightningClient'; interface LightningNursery { on( @@ -60,14 +61,16 @@ class LightningNursery extends EventEmitter { public bindCurrencies = (currencies: Currency[]): void => { currencies.forEach((currency) => { - if (currency.lndClient) { - this.listenInvoices(currency.lndClient); - } + [currency.lndClient, currency.clnClient] + .filter( + (client): client is LndClient | ClnClient => client !== undefined, + ) + .map(this.listenInvoices); }); }; - private listenInvoices = (lndClient: LndClient) => { - lndClient.on('htlc.accepted', async (invoice: string) => { + private listenInvoices = (lightningClient: LightningClient) => { + lightningClient.on('htlc.accepted', async (invoice: string) => { await this.lock.acquire(LightningNursery.invoiceLock, async () => { let reverseSwap = await ReverseSwapRepository.getReverseSwap({ [Op.or]: [ @@ -94,7 +97,7 @@ class LightningNursery extends EventEmitter { reverseSwap.status === SwapUpdateEvent.MinerFeePaid ) { if (reverseSwap.minerFeeInvoicePreimage) { - await lndClient.settleInvoice( + await lightningClient.settleHoldInvoice( getHexBuffer(reverseSwap.minerFeeInvoicePreimage), ); } @@ -119,12 +122,12 @@ class LightningNursery extends EventEmitter { this.emit('minerfee.invoice.paid', reverseSwap); // Settle the prepay invoice and emit the "invoice.paid" event in case the hold invoice was paid first - const holdInvoice = await lndClient.lookupInvoice( + const holdInvoice = await lightningClient.lookupHoldInvoice( getHexBuffer(decodeInvoice(reverseSwap.invoice).paymentHash!), ); - if (holdInvoice.state === Invoice.InvoiceState.ACCEPTED) { - await lndClient.settleInvoice( + if (holdInvoice.state === InvoiceState.Accepted) { + await lightningClient.settleHoldInvoice( getHexBuffer(reverseSwap.minerFeeInvoicePreimage!), ); this.emit('invoice.paid', reverseSwap); diff --git a/lib/swap/NodeSwitch.ts b/lib/swap/NodeSwitch.ts new file mode 100644 index 000000000..f8308cc9f --- /dev/null +++ b/lib/swap/NodeSwitch.ts @@ -0,0 +1,74 @@ +import Logger from '../Logger'; +import Swap from '../db/models/Swap'; +import { Currency } from '../wallet/WalletManager'; +import { LightningClient } from '../lightning/LightningClient'; +import ReverseSwap, { NodeType } from '../db/models/ReverseSwap'; + +class NodeSwitch { + private static readonly clnAmountThreshold = 1_000_000; + + public static getSwapNode = ( + logger: Logger, + currency: Currency, + swap: Swap, + ): LightningClient => { + const client = NodeSwitch.fallback( + currency, + NodeSwitch.switch(currency, swap.invoiceAmount), + ); + logger.debug(`Using node ${client.serviceName()} for Swap ${swap.id}`); + + return client; + }; + + public static getReverseSwapNode = ( + currency: Currency, + reverseSwap: ReverseSwap, + ): LightningClient => { + return reverseSwap.node === NodeType.LND + ? currency.lndClient! + : currency.clnClient!; + }; + + public static getNodeForReverseSwap = ( + logger: Logger, + id: string, + currency: Currency, + holdInvoiceAmount: number, + ): { nodeType: NodeType; lightningClient: LightningClient } => { + const client = NodeSwitch.fallback( + currency, + NodeSwitch.switch(currency, holdInvoiceAmount), + ); + logger.debug( + `Using node ${client.serviceName()} for Reverse Swap Swap ${id}`, + ); + + return { + lightningClient: client, + nodeType: client === currency.lndClient ? NodeType.LND : NodeType.CLN, + }; + }; + + public static hasClient = (currency: Currency): boolean => { + return currency.lndClient !== undefined || currency.clnClient !== undefined; + }; + + private static switch = ( + currency: Currency, + amount?: number, + ): LightningClient | undefined => { + return (amount || 0) > NodeSwitch.clnAmountThreshold + ? currency.lndClient + : currency.clnClient; + }; + + private static fallback = ( + currency: Currency, + client?: LightningClient, + ): LightningClient => { + return (client || currency.lndClient || currency.clnClient)!; + }; +} + +export default NodeSwitch; diff --git a/lib/swap/PaymentHandler.ts b/lib/swap/PaymentHandler.ts index 15b8f0ba0..ce66f9d05 100644 --- a/lib/swap/PaymentHandler.ts +++ b/lib/swap/PaymentHandler.ts @@ -7,15 +7,18 @@ import LightningNursery from './LightningNursery'; import { Currency } from '../wallet/WalletManager'; import ChannelCreation from '../db/models/ChannelCreation'; import SwapRepository from '../db/repositories/SwapRepository'; +import { PaymentResponse } from '../lightning/LightningClient'; import TimeoutDeltaProvider from '../service/TimeoutDeltaProvider'; import { Payment, PaymentFailureReason } from '../proto/lnd/rpc_pb'; import { ChannelCreationStatus, SwapUpdateEvent } from '../consts/Enums'; import { formatError, - splitPairId, getHexBuffer, + getHexString, getLightningCurrency, + splitPairId, } from '../Utils'; +import NodeSwitch from './NodeSwitch'; class PaymentHandler { private static readonly raceTimeout = 15; @@ -90,7 +93,7 @@ class PaymentHandler { `Paying invoice of swap ${swap.id} with cltvLimit: ${cltvLimit}`, ); const payResponse = await Promise.race([ - lightningCurrency.lndClient!.sendPayment( + NodeSwitch.getSwapNode(this.logger, lightningCurrency, swap).sendPayment( swap.invoice!, cltvLimit, outgoingChannelId, @@ -113,6 +116,7 @@ class PaymentHandler { return undefined; }; + // TODO: adjust for CLN compatibility private handlePaymentFailure = async ( swap: Swap, channelCreation: ChannelCreation | null, @@ -134,12 +138,16 @@ class PaymentHandler { LightningNursery.errIsCltvLimitExceeded(error) ) { try { - const payment = await lightningCurrency.lndClient!.trackPayment( - getHexBuffer(swap.preimageHash), - ); + const payment = + await (lightningCurrency.lndClient as LndClient)!.trackPayment( + getHexBuffer(swap.preimageHash), + ); if (payment.status === Payment.PaymentStatus.SUCCEEDED) { this.logger.debug(`Invoice of Swap ${swap.id} is paid already`); - return this.settleInvoice(swap, payment); + return this.settleInvoice(swap, { + feeMsat: payment.feeMsat, + preimage: getHexBuffer(payment.paymentPreimage), + }); } } catch (e) { /* empty */ @@ -175,10 +183,12 @@ class PaymentHandler { return undefined; } - this.logger.debug( - `Resetting ${lightningCurrency.symbol} lightning mission control`, - ); - await lightningCurrency.lndClient!.resetMissionControl(); + if (lightningCurrency.lndClient instanceof LndClient) { + this.logger.debug( + `Resetting ${lightningCurrency.symbol} lightning mission control`, + ); + await lightningCurrency.lndClient!.resetMissionControl(); + } // If the invoice could not be paid but the Swap has a Channel Creation attached to it, a channel will be opened if ( @@ -203,13 +213,10 @@ class PaymentHandler { private settleInvoice = async ( swap: Swap, - response: { - paymentPreimage: string; - feeMsat: number; - }, + response: PaymentResponse, ): Promise => { this.logger.verbose( - `Paid invoice of Swap ${swap.id}: ${response.paymentPreimage}`, + `Paid invoice of Swap ${swap.id}: ${getHexString(response.preimage)}`, ); this.emit( @@ -217,7 +224,7 @@ class PaymentHandler { await SwapRepository.setInvoicePaid(swap, response.feeMsat), ); - return getHexBuffer(response.paymentPreimage); + return response.preimage; }; } diff --git a/lib/swap/RoutingHintsProvider.ts b/lib/swap/RoutingHintsProvider.ts deleted file mode 100644 index 46dca1a51..000000000 --- a/lib/swap/RoutingHintsProvider.ts +++ /dev/null @@ -1,109 +0,0 @@ -import Logger from '../Logger'; -import LndClient from '../lightning/LndClient'; -import { minutesToMilliseconds } from '../Utils'; -import { Channel, ChannelEdge, HopHint, RouteHint } from '../proto/lnd/rpc_pb'; - -type ChannelWithRoutingInfo = { - channel: Channel.AsObject; - routingInfo: ChannelEdge.AsObject; -}; - -class RoutingHintsProvider { - // How often the channel lists should be updated in minutes - private static readonly channelFetchInterval = 5; - - private interval: any; - - private channels = new Map(); - - constructor( - private logger: Logger, - private lndClients: LndClient[], - ) { - const lndSymbols: string[] = []; - this.lndClients.forEach((client) => lndSymbols.push(client.symbol)); - - this.logger.debug( - `Initializing routing hints provider for LND clients: ${lndSymbols.join( - ', ', - )}`, - ); - } - - public start = async (): Promise => { - await this.updateChannels(); - - this.logger.debug( - `Fetching channels for routing hints provider every ${RoutingHintsProvider.channelFetchInterval} minutes`, - ); - - this.interval = setInterval(async () => { - await this.updateChannels(); - }, minutesToMilliseconds(RoutingHintsProvider.channelFetchInterval)); - }; - - public stop = (): void => { - if (this.interval !== undefined) { - clearInterval(this.interval); - this.interval = undefined; - } - }; - - public getRoutingHints = (symbol: string, nodeId: string): RouteHint[] => { - const relevantChannels = this.channels - .get(symbol)! - .filter((channelInfo) => channelInfo.channel.remotePubkey === nodeId); - - const routeHints: RouteHint[] = []; - - for (const channelInfo of relevantChannels) { - const { channel, routingInfo } = channelInfo; - - const remotePolicy = - routingInfo.node1Pub === nodeId - ? routingInfo.node1Policy - : routingInfo.node2Policy; - - if (remotePolicy) { - const hopHint = new HopHint(); - - hopHint.setNodeId(nodeId); - hopHint.setChanId(channel.chanId); - hopHint.setFeeBaseMsat(remotePolicy.feeBaseMsat); - hopHint.setCltvExpiryDelta(remotePolicy.timeLockDelta); - hopHint.setFeeProportionalMillionths(remotePolicy.feeRateMilliMsat); - - const routeHint = new RouteHint(); - routeHint.addHopHints(hopHint); - - routeHints.push(routeHint); - } - } - - return routeHints; - }; - - private updateChannels = async () => { - this.logger.silly('Updating channel lists for routing hint provider'); - - for (const client of this.lndClients) { - const channelInfos: ChannelWithRoutingInfo[] = []; - - const channels = await client.listChannels(true, true); - - for (const channel of channels.channelsList) { - channelInfos.push({ - channel, - routingInfo: await client.getChannelInfo(channel.chanId), - }); - } - - this.logger.silly( - `Found ${channelInfos.length} private ${client.symbol} channels`, - ); - this.channels.set(client.symbol, channelInfos); - } - }; -} - -export default RoutingHintsProvider; diff --git a/lib/swap/SwapManager.ts b/lib/swap/SwapManager.ts index ea9365eb8..e48d3e22c 100644 --- a/lib/swap/SwapManager.ts +++ b/lib/swap/SwapManager.ts @@ -7,14 +7,13 @@ import Logger from '../Logger'; import Swap from '../db/models/Swap'; import SwapNursery from './SwapNursery'; import SwapOutputType from './SwapOutputType'; -import LndClient from '../lightning/LndClient'; import RateProvider from '../rates/RateProvider'; +import RoutingHints from './routing/RoutingHints'; import WalletLiquid from '../wallet/WalletLiquid'; -import ReverseSwap from '../db/models/ReverseSwap'; import { ReverseSwapOutputType } from '../consts/Consts'; -import RoutingHintsProvider from './RoutingHintsProvider'; import SwapRepository from '../db/repositories/SwapRepository'; import InvoiceExpiryHelper from '../service/InvoiceExpiryHelper'; +import ReverseSwap, { NodeType } from '../db/models/ReverseSwap'; import WalletManager, { Currency } from '../wallet/WalletManager'; import TimeoutDeltaProvider from '../service/TimeoutDeltaProvider'; import ReverseSwapRepository from '../db/repositories/ReverseSwapRepository'; @@ -42,6 +41,7 @@ import { reverseBuffer, splitPairId, } from '../Utils'; +import NodeSwitch from './NodeSwitch'; type ChannelCreationInfo = { auto: boolean; @@ -58,7 +58,7 @@ class SwapManager { public nursery: SwapNursery; - public routingHints!: RoutingHintsProvider; + public routingHints!: RoutingHints; constructor( private logger: Logger, @@ -116,15 +116,7 @@ class SwapManager { 'Recreated input and output filters and invoice subscriptions', ); - const lndClients: LndClient[] = []; - - for (const currency of currencies) { - if (currency.lndClient) { - lndClients.push(currency.lndClient); - } - } - - this.routingHints = new RoutingHintsProvider(this.logger, lndClients); + this.routingHints = new RoutingHints(this.logger, currencies); await this.routingHints.start(); }; @@ -169,7 +161,7 @@ class SwapManager { args.orderSide, ); - if (!sendingCurrency.lndClient) { + if (!NodeSwitch.hasClient(sendingCurrency)) { throw Errors.NO_LIGHTNING_SUPPORT(sendingCurrency.symbol); } @@ -493,7 +485,7 @@ class SwapManager { args.orderSide, ); - if (!receivingCurrency.lndClient) { + if (!NodeSwitch.hasClient(receivingCurrency)) { throw Errors.NO_LIGHTNING_SUPPORT(receivingCurrency.symbol); } @@ -503,6 +495,13 @@ class SwapManager { `Creating new Reverse Swap from ${receivingCurrency.symbol} to ${sendingCurrency.symbol}: ${id}`, ); + const { nodeType, lightningClient } = NodeSwitch.getNodeForReverseSwap( + this.logger, + id, + receivingCurrency, + args.holdInvoiceAmount, + ); + if (args.referralId) { this.logger.silly( `Using referral ID ${args.referralId} for Reverse Swap ${id}`, @@ -511,13 +510,13 @@ class SwapManager { const routingHints = args.routingNode !== undefined - ? this.routingHints.getRoutingHints( + ? await this.routingHints.getRoutingHints( receivingCurrency.symbol, args.routingNode, ) : undefined; - const { paymentRequest } = await receivingCurrency.lndClient.addHoldInvoice( + const paymentRequest = await lightningClient.addHoldInvoice( args.holdInvoiceAmount, args.preimageHash, args.lightningTimeoutBlockDelta, @@ -526,7 +525,7 @@ class SwapManager { routingHints, ); - receivingCurrency.lndClient.subscribeSingleInvoice(args.preimageHash); + lightningClient.subscribeSingleInvoice(args.preimageHash); let minerFeeInvoice: string | undefined = undefined; let minerFeeInvoicePreimage: string | undefined = undefined; @@ -537,7 +536,7 @@ class SwapManager { const minerFeeInvoicePreimageHash = crypto.sha256(preimage); - const prepayInvoice = await receivingCurrency.lndClient.addHoldInvoice( + minerFeeInvoice = await lightningClient.addHoldInvoice( args.prepayMinerFeeInvoiceAmount, minerFeeInvoicePreimageHash, undefined, @@ -545,11 +544,8 @@ class SwapManager { getPrepayMinerFeeInvoiceMemo(sendingCurrency.symbol), routingHints, ); - minerFeeInvoice = prepayInvoice.paymentRequest; - receivingCurrency.lndClient.subscribeSingleInvoice( - minerFeeInvoicePreimageHash, - ); + lightningClient.subscribeSingleInvoice(minerFeeInvoicePreimageHash); if (args.prepayMinerFeeOnchainAmount) { this.logger.debug( @@ -604,6 +600,7 @@ class SwapManager { minerFeeInvoice, timeoutBlockHeight, + node: nodeType, keyIndex: index, fee: args.percentageFee, invoice: paymentRequest, @@ -633,6 +630,7 @@ class SwapManager { minerFeeInvoice, timeoutBlockHeight, + node: nodeType, fee: args.percentageFee, invoice: paymentRequest, orderSide: args.orderSide, @@ -689,6 +687,7 @@ class SwapManager { const { lndClient } = this.currencies.get(lightningCurrency)!; if ( + reverseSwap.node === NodeType.LND && reverseSwap.minerFeeInvoice && swap.status !== SwapUpdateEvent.MinerFeePaid ) { diff --git a/lib/swap/SwapNursery.ts b/lib/swap/SwapNursery.ts index 24ddceb6b..ce290529f 100644 --- a/lib/swap/SwapNursery.ts +++ b/lib/swap/SwapNursery.ts @@ -14,9 +14,7 @@ import SwapOutputType from './SwapOutputType'; import ChannelNursery from './ChannelNursery'; import InvoiceNursery from './InvoiceNursery'; import PaymentHandler from './PaymentHandler'; -import { Invoice } from '../proto/lnd/rpc_pb'; import FeeProvider from '../rates/FeeProvider'; -import LndClient from '../lightning/LndClient'; import ChainClient from '../chain/ChainClient'; import EthereumNursery from './EthereumNursery'; import RateProvider from '../rates/RateProvider'; @@ -32,6 +30,7 @@ import { ERC20SwapValues, EtherSwapValues } from '../consts/Types'; import { etherDecimals, ReverseSwapOutputType } from '../consts/Consts'; import ERC20WalletProvider from '../wallet/providers/ERC20WalletProvider'; import ReverseSwapRepository from '../db/repositories/ReverseSwapRepository'; +import { InvoiceState, LightningClient } from '../lightning/LightningClient'; import ChannelCreationRepository from '../db/repositories/ChannelCreationRepository'; import { queryERC20SwapValuesFromLock, @@ -59,6 +58,7 @@ import { constructClaimTransaction, constructRefundTransaction, } from '../Core'; +import NodeSwitch from './NodeSwitch'; interface ISwapNursery { // UTXO based chains emit the "Transaction" object and Ethereum based ones just the transaction hash @@ -332,7 +332,10 @@ class SwapNursery extends EventEmitter implements ISwapNursery { ); const chainCurrency = this.currencies.get(chainSymbol)!; - const { lndClient } = this.currencies.get(lightningSymbol)!; + const lightningClient = NodeSwitch.getReverseSwapNode( + this.currencies.get(lightningSymbol)!, + reverseSwap, + ); const wallet = this.walletManager.wallets.get(chainSymbol)!; @@ -342,17 +345,17 @@ class SwapNursery extends EventEmitter implements ISwapNursery { await this.lockupUtxo( chainCurrency.chainClient!, this.walletManager.wallets.get(chainSymbol)!, - lndClient!, + lightningClient, reverseSwap, ); break; case CurrencyType.Ether: - await this.lockupEther(wallet, lndClient!, reverseSwap); + await this.lockupEther(wallet, lightningClient, reverseSwap); break; case CurrencyType.ERC20: - await this.lockupERC20(wallet, lndClient!, reverseSwap); + await this.lockupERC20(wallet, lightningClient, reverseSwap); break; } }); @@ -378,23 +381,26 @@ class SwapNursery extends EventEmitter implements ISwapNursery { reverseSwap.orderSide, true, ); - const lndClient = this.currencies.get(receiveCurrency)!.lndClient!; + const lightningClient = NodeSwitch.getReverseSwapNode( + this.currencies.get(receiveCurrency)!, + reverseSwap, + ); const plural = reverseSwap.minerFeeInvoicePreimage === null ? '' : 's'; try { // Check if the hold invoice has pending HTLCs before actually cancelling - const { htlcsList, state } = await lndClient.lookupInvoice( + const { htlcs, state } = await lightningClient.lookupHoldInvoice( getHexBuffer(reverseSwap.preimageHash), ); - if (state === Invoice.InvoiceState.CANCELED) { + if (state === InvoiceState.Cancelled) { this.logger.debug( `Invoice${plural} of Reverse Swap ${reverseSwap.id} already cancelled`, ); } else { - if (htlcsList.length !== 0) { + if (htlcs.length !== 0) { this.logger.info( `Not cancelling expired hold invoice${plural} of Reverse Swap ${reverseSwap.id} because it has pending HTLCs`, ); @@ -405,12 +411,12 @@ class SwapNursery extends EventEmitter implements ISwapNursery { `Cancelling expired hold invoice${plural} of Reverse Swap ${reverseSwap.id}`, ); - await lndClient.cancelInvoice( + await lightningClient.cancelHoldInvoice( getHexBuffer(reverseSwap.preimageHash), ); if (reverseSwap.minerFeeInvoicePreimage) { - await lndClient.cancelInvoice( + await lightningClient.cancelHoldInvoice( crypto.sha256( getHexBuffer(reverseSwap.minerFeeInvoicePreimage), ), @@ -623,7 +629,10 @@ class SwapNursery extends EventEmitter implements ISwapNursery { await this.handleReverseSwapSendFailed( reverseSwap, chainSymbol, - this.currencies.get(lightningSymbol)!.lndClient!, + NodeSwitch.getReverseSwapNode( + this.currencies.get(lightningSymbol)!, + reverseSwap, + ), reason, ); }); @@ -666,7 +675,7 @@ class SwapNursery extends EventEmitter implements ISwapNursery { private lockupUtxo = async ( chainClient: ChainClient, wallet: Wallet, - lndClient: LndClient, + lightningClient: LightningClient, reverseSwap: ReverseSwap, ) => { try { @@ -720,7 +729,7 @@ class SwapNursery extends EventEmitter implements ISwapNursery { await this.handleReverseSwapSendFailed( reverseSwap, wallet.symbol, - lndClient, + lightningClient, error, ); } @@ -728,7 +737,7 @@ class SwapNursery extends EventEmitter implements ISwapNursery { private lockupEther = async ( wallet: Wallet, - lndClient: LndClient, + lightningClient: LightningClient, reverseSwap: ReverseSwap, ) => { try { @@ -774,7 +783,7 @@ class SwapNursery extends EventEmitter implements ISwapNursery { await this.handleReverseSwapSendFailed( reverseSwap, wallet.symbol, - lndClient, + lightningClient, error, ); } @@ -782,7 +791,7 @@ class SwapNursery extends EventEmitter implements ISwapNursery { private lockupERC20 = async ( wallet: Wallet, - lndClient: LndClient, + lightningClient: LightningClient, reverseSwap: ReverseSwap, ) => { try { @@ -832,7 +841,7 @@ class SwapNursery extends EventEmitter implements ISwapNursery { await this.handleReverseSwapSendFailed( reverseSwap, wallet.symbol, - lndClient, + lightningClient, error, ); } @@ -1003,9 +1012,12 @@ class SwapNursery extends EventEmitter implements ISwapNursery { true, ); - const { lndClient } = this.currencies.get(lightningCurrency)!; + const lightningClient = NodeSwitch.getReverseSwapNode( + this.currencies.get(lightningCurrency)!, + reverseSwap, + ); try { - await lndClient!.settleInvoice(preimage); + await lightningClient.settleHoldInvoice(preimage); this.logger.info(`Settled Reverse Swap ${reverseSwap.id}`); @@ -1024,10 +1036,12 @@ class SwapNursery extends EventEmitter implements ISwapNursery { private handleReverseSwapSendFailed = async ( reverseSwap: ReverseSwap, chainSymbol: string, - lndClient: LndClient, + lightningClient: LightningClient, error: unknown, ) => { - await lndClient.cancelInvoice(getHexBuffer(reverseSwap.preimageHash)); + await lightningClient.cancelHoldInvoice( + getHexBuffer(reverseSwap.preimageHash), + ); this.logger.warn( `Failed to lockup ${ @@ -1138,13 +1152,18 @@ class SwapNursery extends EventEmitter implements ISwapNursery { ); } + const lightningClient = NodeSwitch.getReverseSwapNode( + lightningCurrency, + reverseSwap, + ); + try { - await lightningCurrency.lndClient!.cancelInvoice( + await lightningClient.cancelHoldInvoice( getHexBuffer(reverseSwap.preimageHash), ); if (reverseSwap.minerFeeInvoicePreimage) { - await lightningCurrency.lndClient!.cancelInvoice( + await lightningClient.cancelHoldInvoice( crypto.sha256(getHexBuffer(reverseSwap.minerFeeInvoicePreimage)), ); } diff --git a/lib/swap/UtxoNursery.ts b/lib/swap/UtxoNursery.ts index de4f7495c..2fcb5d84b 100644 --- a/lib/swap/UtxoNursery.ts +++ b/lib/swap/UtxoNursery.ts @@ -557,9 +557,8 @@ class UtxoNursery extends EventEmitter { // Check for inherited signalling from unconfirmed inputs for (const input of transaction.ins) { const inputId = transactionHashToId(input.hash); - const inputTransaction = await chainClient.getRawTransactionVerbose( - inputId, - ); + const inputTransaction = + await chainClient.getRawTransactionVerbose(inputId); if (!inputTransaction.confirmations) { const inputSignalsRbf = await this.transactionSignalsRbf( diff --git a/lib/swap/routing/RoutingHints.ts b/lib/swap/routing/RoutingHints.ts new file mode 100644 index 000000000..c50e6d5a5 --- /dev/null +++ b/lib/swap/routing/RoutingHints.ts @@ -0,0 +1,67 @@ +import Logger from '../../Logger'; +import RoutingHintsLnd from './RoutingHintsLnd'; +import ClnClient from '../../lightning/ClnClient'; +import LndClient from '../../lightning/LndClient'; +import { Currency } from '../../wallet/WalletManager'; +import { HopHint } from '../../lightning/LightningClient'; + +type Providers = { lnd?: RoutingHintsLnd; cln?: ClnClient }; + +class RoutingHints { + private providers = new Map(); + + constructor( + private logger: Logger, + currencies: Currency[], + ) { + currencies + .filter( + (cur) => cur.lndClient !== undefined || cur.clnClient !== undefined, + ) + .forEach((cur) => { + this.providers.set(cur.symbol, { + lnd: + cur.lndClient !== undefined + ? new RoutingHintsLnd(this.logger, cur.lndClient as LndClient) + : undefined, + cln: cur.clnClient, + }); + }); + + this.logger.debug( + `Initializing routing hints provider for: ${Array.from( + this.providers.keys(), + ).join(', ')}`, + ); + } + + public start = async (): Promise => { + const startPromises = Array.from(this.providers.values()) + .filter((prov) => prov.lnd !== undefined) + .map((prov) => prov.lnd?.start()); + + await Promise.all(startPromises); + }; + + public stop = (): void => { + Array.from(this.providers.values()) + .map((prov) => prov.lnd) + .filter((prov): prov is RoutingHintsLnd => prov !== undefined) + .forEach((prov) => prov.stop()); + }; + + public getRoutingHints = async ( + symbol: string, + nodeId: string, + ): Promise => { + const providers = this.providers.get(symbol); + if (providers === undefined) { + return []; + } + + // Prefer the LND routing hints provider + return (providers.lnd || providers.cln)?.routingHints(nodeId) || []; + }; +} + +export default RoutingHints; diff --git a/lib/swap/routing/RoutingHintsLnd.ts b/lib/swap/routing/RoutingHintsLnd.ts new file mode 100644 index 000000000..40a077bd2 --- /dev/null +++ b/lib/swap/routing/RoutingHintsLnd.ts @@ -0,0 +1,91 @@ +import Logger from '../../Logger'; +import LndClient from '../../lightning/LndClient'; +import { minutesToMilliseconds } from '../../Utils'; +import { HopHint, RoutingHintsProvider } from '../../lightning/LightningClient'; + +class RoutingHintsLnd implements RoutingHintsProvider { + // How often the channel lists should be updated in minutes + private static readonly channelFetchInterval = 15; + + private readonly name: string; + + private ourPubkey!: string; + private interval: any; + private channelInfos = new Map(); + + constructor( + private logger: Logger, + private lnd: LndClient, + ) { + this.name = `${this.lnd.symbol} ${LndClient.serviceName}`; + } + + public start = async (): Promise => { + const info = await this.lnd.getInfo(); + this.ourPubkey = info.pubkey; + + await this.update(); + + this.logger.debug( + `Fetching channels for routing hints provider of ${this.name} every ${RoutingHintsLnd.channelFetchInterval} minutes`, + ); + + this.interval = setInterval(async () => { + await this.update(); + }, minutesToMilliseconds(RoutingHintsLnd.channelFetchInterval)); + }; + + public stop = (): void => { + if (this.interval !== undefined) { + clearInterval(this.interval); + this.interval = undefined; + } + }; + + public routingHints = async (nodeId: string): Promise => { + return this.channelInfos.get(nodeId) || []; + }; + + private update = async () => { + this.logger.silly( + `Updating channel list for ${this.name} routing hint provider`, + ); + + const channelInfos = new Map(); + + const channels = await this.lnd.listChannels(true, true); + + for (const channel of channels) { + const routingInfo = await this.lnd.getChannelInfo(channel.chanId); + const remotePolicy = + routingInfo.node1Pub === this.ourPubkey + ? routingInfo.node2Policy + : routingInfo.node1Policy; + + if (remotePolicy === undefined) { + continue; + } + + if (!channelInfos.has(channel.remotePubkey)) { + channelInfos.set(channel.remotePubkey, []); + } + + channelInfos.get(channel.remotePubkey)!.push([ + { + nodeId: channel.remotePubkey, + chanId: channel.chanId, + feeBaseMsat: remotePolicy.feeBaseMsat, + cltvExpiryDelta: remotePolicy.timeLockDelta, + feeProportionalMillionths: remotePolicy.feeRateMilliMsat, + }, + ]); + } + + this.logger.silly( + `Found ${channelInfos.size} private ${this.name} channels`, + ); + this.channelInfos = channelInfos; + }; +} + +export default RoutingHintsLnd; diff --git a/lib/wallet/WalletManager.ts b/lib/wallet/WalletManager.ts index 9840087b8..68f6126f4 100644 --- a/lib/wallet/WalletManager.ts +++ b/lib/wallet/WalletManager.ts @@ -1,9 +1,9 @@ import fs from 'fs'; import { Provider } from 'ethers'; import * as ecc from 'tiny-secp256k1'; -import { SLIP77Factory, Slip77Interface } from 'slip77'; import { Network } from 'bitcoinjs-lib'; import BIP32Factory, { BIP32Interface } from 'bip32'; +import { SLIP77Factory, Slip77Interface } from 'slip77'; import { mnemonicToSeedSync, validateMnemonic } from 'bip39'; import Errors from './Errors'; import Wallet from './Wallet'; @@ -12,8 +12,9 @@ import WalletLiquid from './WalletLiquid'; import { CurrencyConfig } from '../Config'; import { splitDerivationPath } from '../Utils'; import ChainClient from '../chain/ChainClient'; -import LndClient from '../lightning/LndClient'; import { CurrencyType } from '../consts/Enums'; +import ClnClient from '../lightning/ClnClient'; +import LndClient from '../lightning/LndClient'; import ElementsClient from 'lib/chain/ElementsClient'; import EthereumManager from './ethereum/EthereumManager'; import { KeyProviderType } from '../db/models/KeyProvider'; @@ -40,6 +41,7 @@ type Currency = { // Needed for UTXO based coins network?: Network; lndClient?: LndClient; + clnClient?: ClnClient; chainClient?: ChainClient; // Needed for Ether and tokens on Ethereum diff --git a/lib/wallet/ethereum/ContractUtils.ts b/lib/wallet/ethereum/ContractUtils.ts index 2b69d5bc5..05debe5cf 100644 --- a/lib/wallet/ethereum/ContractUtils.ts +++ b/lib/wallet/ethereum/ContractUtils.ts @@ -18,9 +18,8 @@ export const queryEtherSwapValuesFromLock = async ( etherSwap: EtherSwap, lockTransactionHash: string, ): Promise => { - const lockTransactionReceipt = await provider.getTransactionReceipt( - lockTransactionHash, - ); + const lockTransactionReceipt = + await provider.getTransactionReceipt(lockTransactionHash); const topicHash = etherSwap.filters.Lockup().fragment.topicHash; @@ -41,9 +40,8 @@ export const queryERC20SwapValuesFromLock = async ( erc20Swap: ERC20Swap, lockTransactionHash: string, ): Promise => { - const lockTransactionReceipt = await provider.getTransactionReceipt( - lockTransactionHash, - ); + const lockTransactionReceipt = + await provider.getTransactionReceipt(lockTransactionHash); const topicHash = erc20Swap.filters.Lockup().fragment.topicHash; diff --git a/lib/wallet/providers/LndWalletProvider.ts b/lib/wallet/providers/LndWalletProvider.ts index 8beb29f26..ee3bf986a 100644 --- a/lib/wallet/providers/LndWalletProvider.ts +++ b/lib/wallet/providers/LndWalletProvider.ts @@ -68,9 +68,8 @@ class LndWalletProvider implements WalletProviderInterface { address: string, listStartHeight: number, ): Promise => { - const rawTransaction = await this.chainClient.getRawTransactionVerbose( - transactionId, - ); + const rawTransaction = + await this.chainClient.getRawTransactionVerbose(transactionId); let vout = 0; @@ -87,9 +86,8 @@ class LndWalletProvider implements WalletProviderInterface { let fee = 0; // To limit the number of onchain transactions LND has to query, the start height is set - const { transactionsList } = await this.lndClient.getOnchainTransactions( - listStartHeight, - ); + const { transactionsList } = + await this.lndClient.getOnchainTransactions(listStartHeight); for (let i = 0; i < transactionsList.length; i += 1) { const transaction = transactionsList[i]; diff --git a/package-lock.json b/package-lock.json index 3ca5b150c..6865874ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "AGPL-3.0", "dependencies": { "@boltz/bolt11": "^1.2.7", - "@google-cloud/storage": "^6.12.0", + "@google-cloud/storage": "^7.0.1", "@grpc/grpc-js": "^1.9.0", "@iarna/toml": "^2.2.5", "@vulpemventures/secp256k1-zkp": "^3.1.0", @@ -20,16 +20,17 @@ "bip32": "^4.0.0", "bip39": "^3.1.0", "bitcoinjs-lib": "^6.1.3", + "bolt11": "^1.4.1", "boltz-core": "^1.0.3", "colors": "^1.4.0", "cors": "^2.8.5", "cross-os": "^1.5.0", - "discord.js": "^14.12.1", + "discord.js": "^14.13.0", "ecpair": "^2.1.0", - "ethers": "^6.6.7", + "ethers": "^6.7.1", "express": "^4.18.2", "google-protobuf": "^3.21.2", - "liquidjs-lib": "^6.0.2-liquid.28", + "liquidjs-lib": "^6.0.2-liquid.29", "node-forge": "^1.3.1", "node-schedule": "^2.1.1", "otplib": "^12.0.1", @@ -57,16 +58,16 @@ "@types/node-schedule": "^2.1.0", "@types/yargs": "^17.0.24", "@types/zeromq": "^5.2.2", - "@typescript-eslint/eslint-plugin": "^6.2.1", - "@typescript-eslint/parser": "^6.2.1", - "eslint": "^8.46.0", - "eslint-plugin-import": "^2.28.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", + "eslint": "^8.47.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-node": "^11.1.0", "grpc_tools_node_protoc_ts": "^5.3.3", "grpc-tools": "^1.12.4", "jest": "29.6.2", - "prettier": "^3.0.0", + "prettier": "^3.0.2", "ts-jest": "29.1.1", "ts-node": "10.9.1", "typescript": "^5.1.6" @@ -792,85 +793,85 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.4.tgz", - "integrity": "sha512-ARFKvmAkLhfkQQiNxqi0YIWqwUExvBRtvdtMFVJXvJoibsGkFrB/DWTf9byU7BTVUfsmW8w7NM55tYXR5S/iSg==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.5.tgz", + "integrity": "sha512-SdweyCs/+mHj+PNhGLLle7RrRFX9ZAhzynHahMCLqp5Zeq7np7XC6/mgzHc79QoVlQ1zZtOkTTiJpOZu5V8Ufg==", "dependencies": { - "@discordjs/formatters": "^0.3.1", - "@discordjs/util": "^1.0.0", + "@discordjs/formatters": "^0.3.2", + "@discordjs/util": "^1.0.1", "@sapphire/shapeshift": "^3.9.2", - "discord-api-types": "^0.37.50", + "discord-api-types": "0.37.50", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.3", "tslib": "^2.6.1" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/collection": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.2.tgz", - "integrity": "sha512-LDplPy8SPbc8MYkuCdnLRGWqygAX97E8NH7gA9uz+NZ/hXknUKJHuxsOmhC6pmHnF9Zmg0kvfwrDjGsRIljt9g==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/formatters": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz", - "integrity": "sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.2.tgz", + "integrity": "sha512-lE++JZK8LSSDRM5nLjhuvWhGuKiXqu+JZ/DsOR89DVVia3z9fdCJVcHF2W/1Zxgq0re7kCzmAJlCMMX3tetKpA==", "dependencies": { - "discord-api-types": "^0.37.41" + "discord-api-types": "0.37.50" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/rest": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.0.tgz", - "integrity": "sha512-CW9ldfzsRzUbHcS4Oqu5+Moo+yrQ5qQ9groKNxPOzcoq2nuXa/fXOXkuQtQHcTeSVXsC9cmJ56M8gBDBUyLgGA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.0.1.tgz", + "integrity": "sha512-/eWAdDRvwX/rIE2tuQUmKaxmWeHmGealttIzGzlYfI4+a7y9b6ZoMp8BG/jaohs8D8iEnCNYaZiOFLVFLQb8Zg==", "dependencies": { - "@discordjs/collection": "^1.5.2", - "@discordjs/util": "^1.0.0", + "@discordjs/collection": "^1.5.3", + "@discordjs/util": "^1.0.1", "@sapphire/async-queue": "^1.5.0", "@sapphire/snowflake": "^3.5.1", "@vladfrangu/async_event_emitter": "^2.2.2", - "discord-api-types": "^0.37.50", + "discord-api-types": "0.37.50", "magic-bytes.js": "^1.0.15", "tslib": "^2.6.1", - "undici": "^5.22.1" + "undici": "5.22.1" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/util": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.0.tgz", - "integrity": "sha512-U2Iiab0mo8cFe+o4ZY4GROoAetGjFYA1PhhxiXEW82LuPUjOU/seHZDtVjDpOf6n3rz4IRm84wNtgHdpqRY5CA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.0.1.tgz", + "integrity": "sha512-d0N2yCxB8r4bn00/hvFZwM7goDcUhtViC5un4hPj73Ba4yrChLSJD8fy7Ps5jpTLg1fE9n4K0xBLc1y9WGwSsA==", "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/ws": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.0.tgz", - "integrity": "sha512-POiImjuQJzwCxjJs4JCtDcTjzvjVsVQbnsaoW/F03yTVdrj/xSpmgv4383AnpNEYXI+CA6ggkz37phZDsZQ1NQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.1.tgz", + "integrity": "sha512-avvAolBqN3yrSvdBPcJ/0j2g42ABzrv3PEL76e3YTp2WYMGH7cuspkjfSyNWaqYl1J+669dlLp+YFMxSVQyS5g==", "dependencies": { - "@discordjs/collection": "^1.5.2", - "@discordjs/rest": "^2.0.0", - "@discordjs/util": "^1.0.0", + "@discordjs/collection": "^1.5.3", + "@discordjs/rest": "^2.0.1", + "@discordjs/util": "^1.0.1", "@sapphire/async-queue": "^1.5.0", "@types/ws": "^8.5.5", "@vladfrangu/async_event_emitter": "^2.2.2", - "discord-api-types": "^0.37.50", + "discord-api-types": "0.37.50", "tslib": "^2.6.1", "ws": "^8.13.0" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@eslint-community/eslint-utils": { @@ -898,9 +899,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -921,9 +922,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -960,9 +961,9 @@ } }, "node_modules/@google-cloud/storage": { - "version": "6.12.0", - "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.12.0.tgz", - "integrity": "sha512-78nNAY7iiZ4O/BouWMWTD/oSF2YtYgYB3GZirn0To6eBOugjXVoK+GXgUXOl+HlqbAOyHxAVXOlsj3snfbQ1dw==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-7.0.1.tgz", + "integrity": "sha512-YBJ8HaDZvbeVDgEGWuC6sCsfZNCooVfKg1J+CJ4iXwRejIWbKFjl8laWz8w+/+ucJHM9qOdGkB95Q/mhh2CX/A==", "dependencies": { "@google-cloud/paginator": "^3.0.7", "@google-cloud/projectify": "^3.0.0", @@ -972,19 +973,18 @@ "compressible": "^2.0.12", "duplexify": "^4.0.0", "ent": "^2.2.0", - "extend": "^3.0.2", "fast-xml-parser": "^4.2.2", - "gaxios": "^5.0.0", - "google-auth-library": "^8.0.1", + "gaxios": "^6.0.2", + "google-auth-library": "^9.0.0", "mime": "^3.0.0", "mime-types": "^2.0.8", "p-limit": "^3.0.1", - "retry-request": "^5.0.0", - "teeny-request": "^8.0.0", + "retry-request": "^6.0.0", + "teeny-request": "^9.0.0", "uuid": "^8.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/@grpc/grpc-js": { @@ -2409,13 +2409,6 @@ "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz", "integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ==" }, - "node_modules/@types/wif": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/ws": { "version": "8.5.5", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz", @@ -2448,21 +2441,20 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.2.1.tgz", - "integrity": "sha512-iZVM/ALid9kO0+I81pnp1xmYiFyqibAHzrqX4q5YvvVEyJqY+e6rfTXSCsc2jUxGNqJqTfFSSij/NFkZBiBzLw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.4.0.tgz", + "integrity": "sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.2.1", - "@typescript-eslint/type-utils": "6.2.1", - "@typescript-eslint/utils": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/type-utils": "6.4.0", + "@typescript-eslint/utils": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", "natural-compare": "^1.4.0", - "natural-compare-lite": "^1.4.0", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -2484,13 +2476,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz", - "integrity": "sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz", + "integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1" + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2501,9 +2493,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.1.tgz", - "integrity": "sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz", + "integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2514,13 +2506,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz", - "integrity": "sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz", + "integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2541,17 +2533,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.1.tgz", - "integrity": "sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz", + "integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.2.1", - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/typescript-estree": "6.2.1", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", "semver": "^7.5.4" }, "engines": { @@ -2566,12 +2558,12 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz", - "integrity": "sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz", + "integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", + "@typescript-eslint/types": "6.4.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2598,15 +2590,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.2.1.tgz", - "integrity": "sha512-Ld+uL1kYFU8e6btqBFpsHkwQ35rw30IWpdQxgOqOh4NfxSDH6uCkah1ks8R/RgQqI5hHPXMaLy9fbFseIe+dIg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.0.tgz", + "integrity": "sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.2.1", - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/typescript-estree": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4" }, "engines": { @@ -2626,13 +2618,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz", - "integrity": "sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz", + "integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1" + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2643,9 +2635,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.1.tgz", - "integrity": "sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz", + "integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2656,13 +2648,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz", - "integrity": "sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz", + "integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2683,12 +2675,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz", - "integrity": "sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz", + "integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", + "@typescript-eslint/types": "6.4.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2732,13 +2724,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.2.1.tgz", - "integrity": "sha512-fTfCgomBMIgu2Dh2Or3gMYgoNAnQm3RLtRp+jP7A8fY+LJ2+9PNpi5p6QB5C4RSP+U3cjI0vDlI3mspAkpPVbQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.4.0.tgz", + "integrity": "sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.2.1", - "@typescript-eslint/utils": "6.2.1", + "@typescript-eslint/typescript-estree": "6.4.0", + "@typescript-eslint/utils": "6.4.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -2759,13 +2751,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.2.1.tgz", - "integrity": "sha512-UCqBF9WFqv64xNsIEPfBtenbfodPXsJ3nPAr55mGPkQIkiQvgoWNo+astj9ZUfJfVKiYgAZDMnM6dIpsxUMp3Q==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.0.tgz", + "integrity": "sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1" + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2776,9 +2768,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.2.1.tgz", - "integrity": "sha512-528bGcoelrpw+sETlyM91k51Arl2ajbNT9L4JwoXE2dvRe1yd8Q64E4OL7vHYw31mlnVsf+BeeLyAZUEQtqahQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.0.tgz", + "integrity": "sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2789,13 +2781,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.2.1.tgz", - "integrity": "sha512-G+UJeQx9AKBHRQBpmvr8T/3K5bJa485eu+4tQBxFq0KoT22+jJyzo1B50JDT9QdC1DEmWQfdKsa8ybiNWYsi0Q==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.0.tgz", + "integrity": "sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/visitor-keys": "6.2.1", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/visitor-keys": "6.4.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2816,17 +2808,17 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.2.1.tgz", - "integrity": "sha512-eBIXQeupYmxVB6S7x+B9SdBeB6qIdXKjgQBge2J+Ouv8h9Cxm5dHf/gfAZA6dkMaag+03HdbVInuXMmqFB/lKQ==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.4.0.tgz", + "integrity": "sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.2.1", - "@typescript-eslint/types": "6.2.1", - "@typescript-eslint/typescript-estree": "6.2.1", + "@typescript-eslint/scope-manager": "6.4.0", + "@typescript-eslint/types": "6.4.0", + "@typescript-eslint/typescript-estree": "6.4.0", "semver": "^7.5.4" }, "engines": { @@ -2841,12 +2833,12 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.2.1.tgz", - "integrity": "sha512-iTN6w3k2JEZ7cyVdZJTVJx2Lv7t6zFA8DCrJEHD2mwfc16AEvvBWVhbFh34XyG2NORCd0viIgQY1+u7kPI0WpA==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.0.tgz", + "integrity": "sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.2.1", + "@typescript-eslint/types": "6.4.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -3534,6 +3526,8 @@ }, "node_modules/base64-js": { "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "funding": [ { "type": "github", @@ -3547,8 +3541,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/bech32": { "version": "1.1.4", @@ -3559,7 +3552,8 @@ }, "node_modules/bignumber.js": { "version": "9.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", "engines": { "node": "*" } @@ -3720,6 +3714,35 @@ "version": "2.0.0", "license": "MIT" }, + "node_modules/bolt11": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/bolt11/-/bolt11-1.4.1.tgz", + "integrity": "sha512-jR0Y+MO+CK2at1Cg5mltLJ+6tdOwNKoTS/DJOBDdzVkQ+R9D6UgZMayTWOsuzY7OgV1gEqlyT5Tzk6t6r4XcNQ==", + "dependencies": { + "@types/bn.js": "^4.11.3", + "bech32": "^1.1.2", + "bitcoinjs-lib": "^6.0.0", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "lodash": "^4.17.11", + "safe-buffer": "^5.1.1", + "secp256k1": "^4.0.2" + } + }, + "node_modules/bolt11/node_modules/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==", + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.4", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/boltz-core": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/boltz-core/-/boltz-core-1.0.3.tgz", @@ -3852,7 +3875,8 @@ }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "node_modules/buffer-from": { "version": "1.1.2", @@ -4412,32 +4436,32 @@ } }, "node_modules/discord-api-types": { - "version": "0.37.51", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.51.tgz", - "integrity": "sha512-tdmdH98t3zgjQF6zwOHl0OB/PCBiE4aVsNTuN7m0PfU2jOLx3lNoU6xTeFALntUtlIxN80GTr9RPQR4t7msjSg==" + "version": "0.37.50", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.50.tgz", + "integrity": "sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==" }, "node_modules/discord.js": { - "version": "14.12.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.12.1.tgz", - "integrity": "sha512-gGjhTkauIPgFXxpBl0UZgyehrKhDe90cIS8Hn1xFBYQ63EuUAkKoUqRNmc/pcla6DD16s4cUz5tAbdSpXivnxw==", - "dependencies": { - "@discordjs/builders": "^1.6.4", - "@discordjs/collection": "^1.5.2", - "@discordjs/formatters": "^0.3.1", - "@discordjs/rest": "^2.0.0", - "@discordjs/util": "^1.0.0", - "@discordjs/ws": "^1.0.0", + "version": "14.13.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.13.0.tgz", + "integrity": "sha512-Kufdvg7fpyTEwANGy9x7i4od4yu5c6gVddGi5CKm4Y5a6sF0VBODObI3o0Bh7TGCj0LfNT8Qp8z04wnLFzgnbA==", + "dependencies": { + "@discordjs/builders": "^1.6.5", + "@discordjs/collection": "^1.5.3", + "@discordjs/formatters": "^0.3.2", + "@discordjs/rest": "^2.0.1", + "@discordjs/util": "^1.0.1", + "@discordjs/ws": "^1.0.1", "@sapphire/snowflake": "^3.5.1", "@types/ws": "^8.5.5", - "discord-api-types": "^0.37.50", + "discord-api-types": "0.37.50", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.6.1", - "undici": "^5.22.1", + "undici": "5.22.1", "ws": "^8.13.0" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/doctrine": { @@ -4480,7 +4504,8 @@ }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "dependencies": { "safe-buffer": "^5.0.1" } @@ -4719,15 +4744,15 @@ } }, "node_modules/eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", - "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4738,7 +4763,7 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", + "eslint-visitor-keys": "^3.4.3", "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", @@ -4857,9 +4882,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz", - "integrity": "sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==", + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", + "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", "dev": true, "dependencies": { "array-includes": "^3.1.6", @@ -4871,13 +4896,12 @@ "eslint-import-resolver-node": "^0.3.7", "eslint-module-utils": "^2.8.0", "has": "^1.0.3", - "is-core-module": "^2.12.1", + "is-core-module": "^2.13.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", "object.fromentries": "^2.0.6", "object.groupby": "^1.0.0", "object.values": "^1.1.6", - "resolve": "^1.22.3", "semver": "^6.3.1", "tsconfig-paths": "^3.14.2" }, @@ -4986,9 +5010,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", - "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -5188,9 +5212,9 @@ } }, "node_modules/ethers": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.6.7.tgz", - "integrity": "sha512-1SdT3W5/IPAcx9l5/+9qKRYR/iqVIdNQIct18yeh+XvN+I4RK44mvOsAerMwJYCAwdQfsOgf3OkfozeuMInbtQ==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.1.tgz", + "integrity": "sha512-qX5kxIFMfg1i+epfgb0xF4WM7IqapIIu50pOJ17aebkxxa4BacW5jFrQRmCJpDEg2ZK2oNtR5QjrQ1WDBF29dA==", "funding": [ { "type": "individual", @@ -5409,10 +5433,6 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "node_modules/fast-text-encoding": { - "version": "1.0.6", - "license": "Apache-2.0" - }, "node_modules/fast-xml-parser": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", @@ -5726,27 +5746,52 @@ } }, "node_modules/gaxios": { - "version": "5.1.0", - "license": "Apache-2.0", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.1.0.tgz", + "integrity": "sha512-EIHuesZxNyIkUGcTQKQPMICyOpDD/bi+LJIJx+NLsSGmnS7N+xCLRX5bi4e9yAu9AlSZdVq+qlyWWVuTh/483w==", "dependencies": { "extend": "^3.0.2", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^7.0.1", "is-stream": "^2.0.0", - "node-fetch": "^2.6.7" + "node-fetch": "^2.6.9" }, "engines": { - "node": ">=12" + "node": ">=14" + } + }, + "node_modules/gaxios/node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/gaxios/node_modules/https-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz", + "integrity": "sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" } }, "node_modules/gcp-metadata": { - "version": "5.2.0", - "license": "Apache-2.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.0.0.tgz", + "integrity": "sha512-Ozxyi23/1Ar51wjUT2RDklK+3HxqDr8TLBNK8rBBFQ7T85iIGnXnVusauj06QyqCXRFZig8LZC+TUddWbndlpQ==", "dependencies": { - "gaxios": "^5.0.0", + "gaxios": "^6.0.0", "json-bigint": "^1.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/gensync": { @@ -5843,9 +5888,9 @@ } }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -5892,34 +5937,20 @@ } }, "node_modules/google-auth-library": { - "version": "8.7.0", - "license": "Apache-2.0", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.0.0.tgz", + "integrity": "sha512-IQGjgQoVUAfOk6khqTVMLvWx26R+yPw9uLyb1MNyMQpdKiKt0Fd9sp4NWoINjyGHR8S3iw12hMTYK7O8J07c6Q==", "dependencies": { - "arrify": "^2.0.0", "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "fast-text-encoding": "^1.0.0", - "gaxios": "^5.0.0", - "gcp-metadata": "^5.0.0", - "gtoken": "^6.1.0", + "gaxios": "^6.0.0", + "gcp-metadata": "^6.0.0", + "gtoken": "^7.0.0", "jws": "^4.0.0", "lru-cache": "^6.0.0" }, "engines": { - "node": ">=12" - } - }, - "node_modules/google-p12-pem": { - "version": "4.0.1", - "license": "MIT", - "dependencies": { - "node-forge": "^1.3.1" - }, - "bin": { - "gp12-pem": "build/src/bin/gp12-pem.js" - }, - "engines": { - "node": ">=12.0.0" + "node": ">=14" } }, "node_modules/google-protobuf": { @@ -5980,15 +6011,15 @@ } }, "node_modules/gtoken": { - "version": "6.1.2", - "license": "MIT", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.0.1.tgz", + "integrity": "sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==", "dependencies": { - "gaxios": "^5.0.1", - "google-p12-pem": "^4.0.0", + "gaxios": "^6.0.0", "jws": "^4.0.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/handlebars": { @@ -6374,9 +6405,9 @@ } }, "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -8269,7 +8300,8 @@ }, "node_modules/json-bigint": { "version": "1.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", "dependencies": { "bignumber.js": "^9.0.0" } @@ -8304,7 +8336,8 @@ }, "node_modules/jwa": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -8313,7 +8346,8 @@ }, "node_modules/jws": { "version": "4.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", "dependencies": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" @@ -8365,17 +8399,14 @@ "dev": true }, "node_modules/liquidjs-lib": { - "version": "6.0.2-liquid.28", - "resolved": "https://registry.npmjs.org/liquidjs-lib/-/liquidjs-lib-6.0.2-liquid.28.tgz", - "integrity": "sha512-xV8BvhgIRmx32zKz4oQUC6c/s6cYGf2PMKyDQcjMJxQ5diiPVBCs7STmI/saFxH0KjdVodhWm52KkemTF9M7hA==", + "version": "6.0.2-liquid.29", + "resolved": "https://registry.npmjs.org/liquidjs-lib/-/liquidjs-lib-6.0.2-liquid.29.tgz", + "integrity": "sha512-+aQyPpnsP4FgCwTFs8ROPW/prMVXV7MQCrfb5HKXqjFOg8ISdaVOG/ZYwtQvc5d9zn/yTIo4qWE9bXvVTO20Mg==", "dependencies": { "@types/randombytes": "^2.0.0", - "@types/wif": "^2.0.2", - "axios": "^0.21.1", "bech32": "^2.0.0", "bip174-liquid": "^1.0.3", "bip66": "^1.1.0", - "bitcoin-ops": "^1.4.0", "bitcoinjs-lib": "^6.0.2", "bitset": "^5.1.1", "blech32": "^1.0.1", @@ -8384,20 +8415,12 @@ "ecpair": "^2.1.0", "slip77": "^0.2.0", "typeforce": "^1.11.3", - "varuint-bitcoin": "^1.1.2", - "wif": "^2.0.1" + "varuint-bitcoin": "^1.1.2" }, "engines": { "node": ">=8.0.0" } }, - "node_modules/liquidjs-lib/node_modules/axios": { - "version": "0.21.4", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, "node_modules/liquidjs-lib/node_modules/bech32": { "version": "2.0.0", "license": "MIT" @@ -8775,11 +8798,6 @@ "dev": true, "license": "MIT" }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/negotiator": { "version": "0.6.3", "license": "MIT", @@ -8797,6 +8815,11 @@ "version": "4.0.0", "license": "MIT" }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" + }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -9405,9 +9428,9 @@ } }, "node_modules/prettier": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", - "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz", + "integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -9743,14 +9766,15 @@ "license": "MIT" }, "node_modules/retry-request": { - "version": "5.0.2", - "license": "MIT", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-6.0.0.tgz", + "integrity": "sha512-24kaFMd3wCnT3n4uPnsQh90ZSV8OISpfTFXJ00Wi+/oD2OPrp63EQ8hznk6rhxdlpwx2QBhQSDz2Fg46ki852g==", "dependencies": { "debug": "^4.1.1", "extend": "^3.0.2" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/reusify": { @@ -10263,7 +10287,8 @@ }, "node_modules/stream-events": { "version": "1.0.5", - "license": "MIT", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", + "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", "dependencies": { "stubs": "^3.0.0" } @@ -10418,7 +10443,8 @@ }, "node_modules/stubs": { "version": "3.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==" }, "node_modules/supports-color": { "version": "5.5.0", @@ -10476,29 +10502,32 @@ } }, "node_modules/teeny-request": { - "version": "8.0.3", - "license": "Apache-2.0", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-9.0.0.tgz", + "integrity": "sha512-resvxdc6Mgb7YEThw6G6bExlXKkv6+YbuzGg9xuXxSgxJF7Ozs+o8Y9+2R3sArdWdW8nOokoQb1yrpFB0pQK2g==", "dependencies": { "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", + "node-fetch": "^2.6.9", "stream-events": "^1.0.5", "uuid": "^9.0.0" }, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/teeny-request/node_modules/@tootallnate/once": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "engines": { "node": ">= 10" } }, "node_modules/teeny-request/node_modules/http-proxy-agent": { "version": "5.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dependencies": { "@tootallnate/once": "2", "agent-base": "6", @@ -10510,7 +10539,8 @@ }, "node_modules/teeny-request/node_modules/uuid": { "version": "9.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "bin": { "uuid": "dist/bin/uuid" } @@ -10762,9 +10792,9 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsutils": { "version": "3.21.0", diff --git a/package.json b/package.json index 839ca4c1d..5b9af6785 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ }, "dependencies": { "@boltz/bolt11": "^1.2.7", - "@google-cloud/storage": "^6.12.0", + "@google-cloud/storage": "^7.0.1", "@grpc/grpc-js": "^1.9.0", "@iarna/toml": "^2.2.5", "@vulpemventures/secp256k1-zkp": "^3.1.0", @@ -70,16 +70,17 @@ "bip32": "^4.0.0", "bip39": "^3.1.0", "bitcoinjs-lib": "^6.1.3", + "bolt11": "^1.4.1", "boltz-core": "^1.0.3", "colors": "^1.4.0", "cors": "^2.8.5", "cross-os": "^1.5.0", - "discord.js": "^14.12.1", + "discord.js": "^14.13.0", "ecpair": "^2.1.0", - "ethers": "^6.6.7", + "ethers": "^6.7.1", "express": "^4.18.2", "google-protobuf": "^3.21.2", - "liquidjs-lib": "^6.0.2-liquid.28", + "liquidjs-lib": "^6.0.2-liquid.29", "node-forge": "^1.3.1", "node-schedule": "^2.1.1", "otplib": "^12.0.1", @@ -103,16 +104,16 @@ "@types/node-schedule": "^2.1.0", "@types/yargs": "^17.0.24", "@types/zeromq": "^5.2.2", - "@typescript-eslint/eslint-plugin": "^6.2.1", - "@typescript-eslint/parser": "^6.2.1", - "eslint": "^8.46.0", - "eslint-plugin-import": "^2.28.0", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "@typescript-eslint/parser": "^6.4.0", + "eslint": "^8.47.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-node": "^11.1.0", "grpc_tools_node_protoc_ts": "^5.3.3", "grpc-tools": "^1.12.4", "jest": "29.6.2", - "prettier": "^3.0.0", + "prettier": "^3.0.2", "ts-jest": "29.1.1", "ts-node": "10.9.1", "typescript": "^5.1.6" diff --git a/proto/cln/node.proto b/proto/cln/node.proto new file mode 100644 index 000000000..305ad8a62 --- /dev/null +++ b/proto/cln/node.proto @@ -0,0 +1,1700 @@ +syntax = "proto3"; +package cln; + +import "cln/primitives.proto"; + +service Node { + rpc Getinfo(GetinfoRequest) returns (GetinfoResponse) {} + rpc ListPeers(ListpeersRequest) returns (ListpeersResponse) {} + rpc ListFunds(ListfundsRequest) returns (ListfundsResponse) {} + rpc SendPay(SendpayRequest) returns (SendpayResponse) {} + rpc ListChannels(ListchannelsRequest) returns (ListchannelsResponse) {} + rpc AddGossip(AddgossipRequest) returns (AddgossipResponse) {} + rpc AutoCleanInvoice(AutocleaninvoiceRequest) returns (AutocleaninvoiceResponse) {} + rpc CheckMessage(CheckmessageRequest) returns (CheckmessageResponse) {} + rpc Close(CloseRequest) returns (CloseResponse) {} + rpc ConnectPeer(ConnectRequest) returns (ConnectResponse) {} + rpc CreateInvoice(CreateinvoiceRequest) returns (CreateinvoiceResponse) {} + rpc Datastore(DatastoreRequest) returns (DatastoreResponse) {} + rpc CreateOnion(CreateonionRequest) returns (CreateonionResponse) {} + rpc DelDatastore(DeldatastoreRequest) returns (DeldatastoreResponse) {} + rpc DelExpiredInvoice(DelexpiredinvoiceRequest) returns (DelexpiredinvoiceResponse) {} + rpc DelInvoice(DelinvoiceRequest) returns (DelinvoiceResponse) {} + rpc Invoice(InvoiceRequest) returns (InvoiceResponse) {} + rpc ListDatastore(ListdatastoreRequest) returns (ListdatastoreResponse) {} + rpc ListInvoices(ListinvoicesRequest) returns (ListinvoicesResponse) {} + rpc SendOnion(SendonionRequest) returns (SendonionResponse) {} + rpc ListSendPays(ListsendpaysRequest) returns (ListsendpaysResponse) {} + rpc ListTransactions(ListtransactionsRequest) returns (ListtransactionsResponse) {} + rpc Pay(PayRequest) returns (PayResponse) {} + rpc ListNodes(ListnodesRequest) returns (ListnodesResponse) {} + rpc WaitAnyInvoice(WaitanyinvoiceRequest) returns (WaitanyinvoiceResponse) {} + rpc WaitInvoice(WaitinvoiceRequest) returns (WaitinvoiceResponse) {} + rpc WaitSendPay(WaitsendpayRequest) returns (WaitsendpayResponse) {} + rpc NewAddr(NewaddrRequest) returns (NewaddrResponse) {} + rpc Withdraw(WithdrawRequest) returns (WithdrawResponse) {} + rpc KeySend(KeysendRequest) returns (KeysendResponse) {} + rpc FundPsbt(FundpsbtRequest) returns (FundpsbtResponse) {} + rpc SendPsbt(SendpsbtRequest) returns (SendpsbtResponse) {} + rpc SignPsbt(SignpsbtRequest) returns (SignpsbtResponse) {} + rpc UtxoPsbt(UtxopsbtRequest) returns (UtxopsbtResponse) {} + rpc TxDiscard(TxdiscardRequest) returns (TxdiscardResponse) {} + rpc TxPrepare(TxprepareRequest) returns (TxprepareResponse) {} + rpc TxSend(TxsendRequest) returns (TxsendResponse) {} + rpc ListPeerChannels(ListpeerchannelsRequest) returns (ListpeerchannelsResponse) {} + rpc ListClosedChannels(ListclosedchannelsRequest) returns (ListclosedchannelsResponse) {} + rpc DecodePay(DecodepayRequest) returns (DecodepayResponse) {} + rpc Decode(DecodeRequest) returns (DecodeResponse) {} + rpc Disconnect(DisconnectRequest) returns (DisconnectResponse) {} + rpc Feerates(FeeratesRequest) returns (FeeratesResponse) {} + rpc FundChannel(FundchannelRequest) returns (FundchannelResponse) {} + rpc GetRoute(GetrouteRequest) returns (GetrouteResponse) {} + rpc ListForwards(ListforwardsRequest) returns (ListforwardsResponse) {} + rpc ListPays(ListpaysRequest) returns (ListpaysResponse) {} + rpc Ping(PingRequest) returns (PingResponse) {} + rpc SendCustomMsg(SendcustommsgRequest) returns (SendcustommsgResponse) {} + rpc SetChannel(SetchannelRequest) returns (SetchannelResponse) {} + rpc SignInvoice(SigninvoiceRequest) returns (SigninvoiceResponse) {} + rpc SignMessage(SignmessageRequest) returns (SignmessageResponse) {} + rpc Stop(StopRequest) returns (StopResponse) {} +} + +message GetinfoRequest { +} + +message GetinfoResponse { + bytes id = 1; + string alias = 2; + bytes color = 3; + uint32 num_peers = 4; + uint32 num_pending_channels = 5; + uint32 num_active_channels = 6; + uint32 num_inactive_channels = 7; + string version = 8; + string lightning_dir = 9; + optional GetinfoOur_features our_features = 10; + uint32 blockheight = 11; + string network = 12; + Amount fees_collected_msat = 13; + repeated GetinfoAddress address = 14; + repeated GetinfoBinding binding = 15; + optional string warning_bitcoind_sync = 16; + optional string warning_lightningd_sync = 17; +} + +message GetinfoOur_features { + bytes init = 1; + bytes node = 2; + bytes channel = 3; + bytes invoice = 4; +} + +message GetinfoAddress { + // Getinfo.address[].type + enum GetinfoAddressType { + DNS = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + WEBSOCKET = 5; + } + GetinfoAddressType item_type = 1; + uint32 port = 2; + optional string address = 3; +} + +message GetinfoBinding { + // Getinfo.binding[].type + enum GetinfoBindingType { + LOCAL_SOCKET = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + } + GetinfoBindingType item_type = 1; + optional string address = 2; + optional uint32 port = 3; + optional string socket = 4; +} + +message ListpeersRequest { + optional bytes id = 1; + optional string level = 2; +} + +message ListpeersResponse { + repeated ListpeersPeers peers = 1; +} + +message ListpeersPeers { + bytes id = 1; + bool connected = 2; + optional uint32 num_channels = 8; + repeated ListpeersPeersLog log = 3; + repeated ListpeersPeersChannels channels = 4; + repeated string netaddr = 5; + optional string remote_addr = 7; + optional bytes features = 6; +} + +message ListpeersPeersLog { + // ListPeers.peers[].log[].type + enum ListpeersPeersLogType { + SKIPPED = 0; + BROKEN = 1; + UNUSUAL = 2; + INFO = 3; + DEBUG = 4; + IO_IN = 5; + IO_OUT = 6; + } + ListpeersPeersLogType item_type = 1; + optional uint32 num_skipped = 2; + optional string time = 3; + optional string source = 4; + optional string log = 5; + optional bytes node_id = 6; + optional bytes data = 7; +} + +message ListpeersPeersChannels { + // ListPeers.peers[].channels[].state + enum ListpeersPeersChannelsState { + OPENINGD = 0; + CHANNELD_AWAITING_LOCKIN = 1; + CHANNELD_NORMAL = 2; + CHANNELD_SHUTTING_DOWN = 3; + CLOSINGD_SIGEXCHANGE = 4; + CLOSINGD_COMPLETE = 5; + AWAITING_UNILATERAL = 6; + FUNDING_SPEND_SEEN = 7; + ONCHAIN = 8; + DUALOPEND_OPEN_INIT = 9; + DUALOPEND_AWAITING_LOCKIN = 10; + } + ListpeersPeersChannelsState state = 1; + optional bytes scratch_txid = 2; + optional ListpeersPeersChannelsFeerate feerate = 3; + optional string owner = 4; + optional string short_channel_id = 5; + optional bytes channel_id = 6; + optional bytes funding_txid = 7; + optional uint32 funding_outnum = 8; + optional string initial_feerate = 9; + optional string last_feerate = 10; + optional string next_feerate = 11; + optional uint32 next_fee_step = 12; + repeated ListpeersPeersChannelsInflight inflight = 13; + optional bytes close_to = 14; + optional bool private = 15; + ChannelSide opener = 16; + optional ChannelSide closer = 17; + repeated string features = 18; + optional ListpeersPeersChannelsFunding funding = 19; + optional Amount to_us_msat = 20; + optional Amount min_to_us_msat = 21; + optional Amount max_to_us_msat = 22; + optional Amount total_msat = 23; + optional Amount fee_base_msat = 24; + optional uint32 fee_proportional_millionths = 25; + optional Amount dust_limit_msat = 26; + optional Amount max_total_htlc_in_msat = 27; + optional Amount their_reserve_msat = 28; + optional Amount our_reserve_msat = 29; + optional Amount spendable_msat = 30; + optional Amount receivable_msat = 31; + optional Amount minimum_htlc_in_msat = 32; + optional Amount minimum_htlc_out_msat = 48; + optional Amount maximum_htlc_out_msat = 49; + optional uint32 their_to_self_delay = 33; + optional uint32 our_to_self_delay = 34; + optional uint32 max_accepted_htlcs = 35; + optional ListpeersPeersChannelsAlias alias = 50; + repeated string status = 37; + optional uint64 in_payments_offered = 38; + optional Amount in_offered_msat = 39; + optional uint64 in_payments_fulfilled = 40; + optional Amount in_fulfilled_msat = 41; + optional uint64 out_payments_offered = 42; + optional Amount out_offered_msat = 43; + optional uint64 out_payments_fulfilled = 44; + optional Amount out_fulfilled_msat = 45; + repeated ListpeersPeersChannelsHtlcs htlcs = 46; + optional string close_to_addr = 47; +} + +message ListpeersPeersChannelsFeerate { + uint32 perkw = 1; + uint32 perkb = 2; +} + +message ListpeersPeersChannelsInflight { + bytes funding_txid = 1; + uint32 funding_outnum = 2; + string feerate = 3; + Amount total_funding_msat = 4; + Amount our_funding_msat = 5; + bytes scratch_txid = 6; +} + +message ListpeersPeersChannelsFunding { + optional Amount pushed_msat = 3; + Amount local_funds_msat = 4; + Amount remote_funds_msat = 7; + optional Amount fee_paid_msat = 5; + optional Amount fee_rcvd_msat = 6; +} + +message ListpeersPeersChannelsAlias { + optional string local = 1; + optional string remote = 2; +} + +message ListpeersPeersChannelsHtlcs { + // ListPeers.peers[].channels[].htlcs[].direction + enum ListpeersPeersChannelsHtlcsDirection { + IN = 0; + OUT = 1; + } + ListpeersPeersChannelsHtlcsDirection direction = 1; + uint64 id = 2; + Amount amount_msat = 3; + uint32 expiry = 4; + bytes payment_hash = 5; + optional bool local_trimmed = 6; + optional string status = 7; + HtlcState state = 8; +} + +message ListfundsRequest { + optional bool spent = 1; +} + +message ListfundsResponse { + repeated ListfundsOutputs outputs = 1; + repeated ListfundsChannels channels = 2; +} + +message ListfundsOutputs { + // ListFunds.outputs[].status + enum ListfundsOutputsStatus { + UNCONFIRMED = 0; + CONFIRMED = 1; + SPENT = 2; + IMMATURE = 3; + } + bytes txid = 1; + uint32 output = 2; + Amount amount_msat = 3; + bytes scriptpubkey = 4; + optional string address = 5; + optional bytes redeemscript = 6; + ListfundsOutputsStatus status = 7; + bool reserved = 9; + optional uint32 blockheight = 8; +} + +message ListfundsChannels { + bytes peer_id = 1; + Amount our_amount_msat = 2; + Amount amount_msat = 3; + bytes funding_txid = 4; + uint32 funding_output = 5; + bool connected = 6; + ChannelState state = 7; + optional bytes channel_id = 9; + optional string short_channel_id = 8; +} + +message SendpayRequest { + repeated SendpayRoute route = 1; + bytes payment_hash = 2; + optional string label = 3; + optional Amount amount_msat = 10; + optional string bolt11 = 5; + optional bytes payment_secret = 6; + optional uint32 partid = 7; + optional bytes localinvreqid = 11; + optional uint64 groupid = 9; +} + +message SendpayResponse { + // SendPay.status + enum SendpayStatus { + PENDING = 0; + COMPLETE = 1; + } + uint64 id = 1; + optional uint64 groupid = 2; + bytes payment_hash = 3; + SendpayStatus status = 4; + optional Amount amount_msat = 5; + optional bytes destination = 6; + uint64 created_at = 7; + optional uint64 completed_at = 15; + Amount amount_sent_msat = 8; + optional string label = 9; + optional uint64 partid = 10; + optional string bolt11 = 11; + optional string bolt12 = 12; + optional bytes payment_preimage = 13; + optional string message = 14; +} + +message SendpayRoute { + Amount amount_msat = 5; + bytes id = 2; + uint32 delay = 3; + string channel = 4; +} + +message ListchannelsRequest { + optional string short_channel_id = 1; + optional bytes source = 2; + optional bytes destination = 3; +} + +message ListchannelsResponse { + repeated ListchannelsChannels channels = 1; +} + +message ListchannelsChannels { + bytes source = 1; + bytes destination = 2; + string short_channel_id = 3; + uint32 direction = 16; + bool public = 4; + Amount amount_msat = 5; + uint32 message_flags = 6; + uint32 channel_flags = 7; + bool active = 8; + uint32 last_update = 9; + uint32 base_fee_millisatoshi = 10; + uint32 fee_per_millionth = 11; + uint32 delay = 12; + Amount htlc_minimum_msat = 13; + optional Amount htlc_maximum_msat = 14; + bytes features = 15; +} + +message AddgossipRequest { + bytes message = 1; +} + +message AddgossipResponse { +} + +message AutocleaninvoiceRequest { + optional uint64 expired_by = 1; + optional uint64 cycle_seconds = 2; +} + +message AutocleaninvoiceResponse { + bool enabled = 1; + optional uint64 expired_by = 2; + optional uint64 cycle_seconds = 3; +} + +message CheckmessageRequest { + string message = 1; + string zbase = 2; + optional bytes pubkey = 3; +} + +message CheckmessageResponse { + bool verified = 1; + bytes pubkey = 2; +} + +message CloseRequest { + string id = 1; + optional uint32 unilateraltimeout = 2; + optional string destination = 3; + optional string fee_negotiation_step = 4; + optional Outpoint wrong_funding = 5; + optional bool force_lease_closed = 6; + repeated Feerate feerange = 7; +} + +message CloseResponse { + // Close.type + enum CloseType { + MUTUAL = 0; + UNILATERAL = 1; + UNOPENED = 2; + } + CloseType item_type = 1; + optional bytes tx = 2; + optional bytes txid = 3; +} + +message ConnectRequest { + string id = 1; + optional string host = 2; + optional uint32 port = 3; +} + +message ConnectResponse { + // Connect.direction + enum ConnectDirection { + IN = 0; + OUT = 1; + } + bytes id = 1; + bytes features = 2; + ConnectDirection direction = 3; + ConnectAddress address = 4; +} + +message ConnectAddress { + // Connect.address.type + enum ConnectAddressType { + LOCAL_SOCKET = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + } + ConnectAddressType item_type = 1; + optional string socket = 2; + optional string address = 3; + optional uint32 port = 4; +} + +message CreateinvoiceRequest { + string invstring = 1; + string label = 2; + bytes preimage = 3; +} + +message CreateinvoiceResponse { + // CreateInvoice.status + enum CreateinvoiceStatus { + PAID = 0; + EXPIRED = 1; + UNPAID = 2; + } + string label = 1; + optional string bolt11 = 2; + optional string bolt12 = 3; + bytes payment_hash = 4; + optional Amount amount_msat = 5; + CreateinvoiceStatus status = 6; + string description = 7; + uint64 expires_at = 8; + optional uint64 pay_index = 9; + optional Amount amount_received_msat = 10; + optional uint64 paid_at = 11; + optional bytes payment_preimage = 12; + optional bytes local_offer_id = 13; + optional string invreq_payer_note = 15; +} + +message DatastoreRequest { + // Datastore.mode + enum DatastoreMode { + MUST_CREATE = 0; + MUST_REPLACE = 1; + CREATE_OR_REPLACE = 2; + MUST_APPEND = 3; + CREATE_OR_APPEND = 4; + } + repeated string key = 5; + optional string string = 6; + optional bytes hex = 2; + optional DatastoreMode mode = 3; + optional uint64 generation = 4; +} + +message DatastoreResponse { + repeated string key = 5; + optional uint64 generation = 2; + optional bytes hex = 3; + optional string string = 4; +} + +message CreateonionRequest { + repeated CreateonionHops hops = 1; + bytes assocdata = 2; + optional bytes session_key = 3; + optional uint32 onion_size = 4; +} + +message CreateonionResponse { + bytes onion = 1; + repeated bytes shared_secrets = 2; +} + +message CreateonionHops { + bytes pubkey = 1; + bytes payload = 2; +} + +message DeldatastoreRequest { + repeated string key = 3; + optional uint64 generation = 2; +} + +message DeldatastoreResponse { + repeated string key = 5; + optional uint64 generation = 2; + optional bytes hex = 3; + optional string string = 4; +} + +message DelexpiredinvoiceRequest { + optional uint64 maxexpirytime = 1; +} + +message DelexpiredinvoiceResponse { +} + +message DelinvoiceRequest { + // DelInvoice.status + enum DelinvoiceStatus { + PAID = 0; + EXPIRED = 1; + UNPAID = 2; + } + string label = 1; + DelinvoiceStatus status = 2; + optional bool desconly = 3; +} + +message DelinvoiceResponse { + // DelInvoice.status + enum DelinvoiceStatus { + PAID = 0; + EXPIRED = 1; + UNPAID = 2; + } + string label = 1; + optional string bolt11 = 2; + optional string bolt12 = 3; + optional Amount amount_msat = 4; + optional string description = 5; + bytes payment_hash = 6; + DelinvoiceStatus status = 7; + uint64 expires_at = 8; + optional bytes local_offer_id = 9; + optional string invreq_payer_note = 11; +} + +message InvoiceRequest { + AmountOrAny amount_msat = 10; + string description = 2; + string label = 3; + optional uint64 expiry = 7; + repeated string fallbacks = 4; + optional bytes preimage = 5; + optional uint32 cltv = 6; + optional bool deschashonly = 9; +} + +message InvoiceResponse { + string bolt11 = 1; + bytes payment_hash = 2; + bytes payment_secret = 3; + uint64 expires_at = 4; + optional string warning_capacity = 5; + optional string warning_offline = 6; + optional string warning_deadends = 7; + optional string warning_private_unused = 8; + optional string warning_mpp = 9; +} + +message ListdatastoreRequest { + repeated string key = 2; +} + +message ListdatastoreResponse { + repeated ListdatastoreDatastore datastore = 1; +} + +message ListdatastoreDatastore { + repeated string key = 1; + optional uint64 generation = 2; + optional bytes hex = 3; + optional string string = 4; +} + +message ListinvoicesRequest { + optional string label = 1; + optional string invstring = 2; + optional bytes payment_hash = 3; + optional string offer_id = 4; +} + +message ListinvoicesResponse { + repeated ListinvoicesInvoices invoices = 1; +} + +message ListinvoicesInvoices { + // ListInvoices.invoices[].status + enum ListinvoicesInvoicesStatus { + UNPAID = 0; + PAID = 1; + EXPIRED = 2; + } + string label = 1; + optional string description = 2; + bytes payment_hash = 3; + ListinvoicesInvoicesStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt11 = 7; + optional string bolt12 = 8; + optional bytes local_offer_id = 9; + optional string invreq_payer_note = 15; + optional uint64 pay_index = 11; + optional Amount amount_received_msat = 12; + optional uint64 paid_at = 13; + optional bytes payment_preimage = 14; +} + +message SendonionRequest { + bytes onion = 1; + SendonionFirst_hop first_hop = 2; + bytes payment_hash = 3; + optional string label = 4; + repeated bytes shared_secrets = 5; + optional uint32 partid = 6; + optional string bolt11 = 7; + optional Amount amount_msat = 12; + optional bytes destination = 9; + optional bytes localinvreqid = 13; + optional uint64 groupid = 11; +} + +message SendonionResponse { + // SendOnion.status + enum SendonionStatus { + PENDING = 0; + COMPLETE = 1; + } + uint64 id = 1; + bytes payment_hash = 2; + SendonionStatus status = 3; + optional Amount amount_msat = 4; + optional bytes destination = 5; + uint64 created_at = 6; + Amount amount_sent_msat = 7; + optional string label = 8; + optional string bolt11 = 9; + optional string bolt12 = 10; + optional uint64 partid = 13; + optional bytes payment_preimage = 11; + optional string message = 12; +} + +message SendonionFirst_hop { + bytes id = 1; + Amount amount_msat = 2; + uint32 delay = 3; +} + +message ListsendpaysRequest { + // ListSendPays.status + enum ListsendpaysStatus { + PENDING = 0; + COMPLETE = 1; + FAILED = 2; + } + optional string bolt11 = 1; + optional bytes payment_hash = 2; + optional ListsendpaysStatus status = 3; +} + +message ListsendpaysResponse { + repeated ListsendpaysPayments payments = 1; +} + +message ListsendpaysPayments { + // ListSendPays.payments[].status + enum ListsendpaysPaymentsStatus { + PENDING = 0; + FAILED = 1; + COMPLETE = 2; + } + uint64 id = 1; + uint64 groupid = 2; + optional uint64 partid = 15; + bytes payment_hash = 3; + ListsendpaysPaymentsStatus status = 4; + optional Amount amount_msat = 5; + optional bytes destination = 6; + uint64 created_at = 7; + Amount amount_sent_msat = 8; + optional string label = 9; + optional string bolt11 = 10; + optional string description = 14; + optional string bolt12 = 11; + optional bytes payment_preimage = 12; + optional bytes erroronion = 13; +} + +message ListtransactionsRequest { +} + +message ListtransactionsResponse { + repeated ListtransactionsTransactions transactions = 1; +} + +message ListtransactionsTransactions { + bytes hash = 1; + bytes rawtx = 2; + uint32 blockheight = 3; + uint32 txindex = 4; + uint32 locktime = 7; + uint32 version = 8; + repeated ListtransactionsTransactionsInputs inputs = 9; + repeated ListtransactionsTransactionsOutputs outputs = 10; +} + +message ListtransactionsTransactionsInputs { + // ListTransactions.transactions[].inputs[].type + enum ListtransactionsTransactionsInputsType { + THEIRS = 0; + DEPOSIT = 1; + WITHDRAW = 2; + CHANNEL_FUNDING = 3; + CHANNEL_MUTUAL_CLOSE = 4; + CHANNEL_UNILATERAL_CLOSE = 5; + CHANNEL_SWEEP = 6; + CHANNEL_HTLC_SUCCESS = 7; + CHANNEL_HTLC_TIMEOUT = 8; + CHANNEL_PENALTY = 9; + CHANNEL_UNILATERAL_CHEAT = 10; + } + bytes txid = 1; + uint32 index = 2; + uint32 sequence = 3; + optional ListtransactionsTransactionsInputsType item_type = 4; + optional string channel = 5; +} + +message ListtransactionsTransactionsOutputs { + // ListTransactions.transactions[].outputs[].type + enum ListtransactionsTransactionsOutputsType { + THEIRS = 0; + DEPOSIT = 1; + WITHDRAW = 2; + CHANNEL_FUNDING = 3; + CHANNEL_MUTUAL_CLOSE = 4; + CHANNEL_UNILATERAL_CLOSE = 5; + CHANNEL_SWEEP = 6; + CHANNEL_HTLC_SUCCESS = 7; + CHANNEL_HTLC_TIMEOUT = 8; + CHANNEL_PENALTY = 9; + CHANNEL_UNILATERAL_CHEAT = 10; + } + uint32 index = 1; + Amount amount_msat = 6; + bytes scriptPubKey = 3; + optional ListtransactionsTransactionsOutputsType item_type = 4; + optional string channel = 5; +} + +message PayRequest { + string bolt11 = 1; + optional Amount amount_msat = 13; + optional string label = 3; + optional double riskfactor = 8; + optional double maxfeepercent = 4; + optional uint32 retry_for = 5; + optional uint32 maxdelay = 6; + optional Amount exemptfee = 7; + optional bytes localinvreqid = 14; + repeated string exclude = 10; + optional Amount maxfee = 11; + optional string description = 12; +} + +message PayResponse { + // Pay.status + enum PayStatus { + COMPLETE = 0; + PENDING = 1; + FAILED = 2; + } + bytes payment_preimage = 1; + optional bytes destination = 2; + bytes payment_hash = 3; + double created_at = 4; + uint32 parts = 5; + Amount amount_msat = 6; + Amount amount_sent_msat = 7; + optional string warning_partial_completion = 8; + PayStatus status = 9; +} + +message ListnodesRequest { + optional bytes id = 1; +} + +message ListnodesResponse { + repeated ListnodesNodes nodes = 1; +} + +message ListnodesNodes { + bytes nodeid = 1; + optional uint32 last_timestamp = 2; + optional string alias = 3; + optional bytes color = 4; + optional bytes features = 5; + repeated ListnodesNodesAddresses addresses = 6; +} + +message ListnodesNodesAddresses { + // ListNodes.nodes[].addresses[].type + enum ListnodesNodesAddressesType { + DNS = 0; + IPV4 = 1; + IPV6 = 2; + TORV2 = 3; + TORV3 = 4; + WEBSOCKET = 5; + } + ListnodesNodesAddressesType item_type = 1; + uint32 port = 2; + optional string address = 3; +} + +message WaitanyinvoiceRequest { + optional uint64 lastpay_index = 1; + optional uint64 timeout = 2; +} + +message WaitanyinvoiceResponse { + // WaitAnyInvoice.status + enum WaitanyinvoiceStatus { + PAID = 0; + EXPIRED = 1; + } + string label = 1; + string description = 2; + bytes payment_hash = 3; + WaitanyinvoiceStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt11 = 7; + optional string bolt12 = 8; + optional uint64 pay_index = 9; + optional Amount amount_received_msat = 10; + optional uint64 paid_at = 11; + optional bytes payment_preimage = 12; +} + +message WaitinvoiceRequest { + string label = 1; +} + +message WaitinvoiceResponse { + // WaitInvoice.status + enum WaitinvoiceStatus { + PAID = 0; + EXPIRED = 1; + } + string label = 1; + string description = 2; + bytes payment_hash = 3; + WaitinvoiceStatus status = 4; + uint64 expires_at = 5; + optional Amount amount_msat = 6; + optional string bolt11 = 7; + optional string bolt12 = 8; + optional uint64 pay_index = 9; + optional Amount amount_received_msat = 10; + optional uint64 paid_at = 11; + optional bytes payment_preimage = 12; +} + +message WaitsendpayRequest { + bytes payment_hash = 1; + optional uint32 timeout = 3; + optional uint64 partid = 2; + optional uint64 groupid = 4; +} + +message WaitsendpayResponse { + // WaitSendPay.status + enum WaitsendpayStatus { + COMPLETE = 0; + } + uint64 id = 1; + optional uint64 groupid = 2; + bytes payment_hash = 3; + WaitsendpayStatus status = 4; + optional Amount amount_msat = 5; + optional bytes destination = 6; + uint64 created_at = 7; + optional double completed_at = 14; + Amount amount_sent_msat = 8; + optional string label = 9; + optional uint64 partid = 10; + optional string bolt11 = 11; + optional string bolt12 = 12; + optional bytes payment_preimage = 13; +} + +message NewaddrRequest { + // NewAddr.addresstype + enum NewaddrAddresstype { + BECH32 = 0; + ALL = 2; + } + optional NewaddrAddresstype addresstype = 1; +} + +message NewaddrResponse { + optional string bech32 = 1; + optional string p2sh_segwit = 2; +} + +message WithdrawRequest { + string destination = 1; + optional AmountOrAll satoshi = 2; + optional Feerate feerate = 5; + optional uint32 minconf = 3; + repeated Outpoint utxos = 4; +} + +message WithdrawResponse { + bytes tx = 1; + bytes txid = 2; + string psbt = 3; +} + +message KeysendRequest { + bytes destination = 1; + Amount amount_msat = 10; + optional string label = 3; + optional double maxfeepercent = 4; + optional uint32 retry_for = 5; + optional uint32 maxdelay = 6; + optional Amount exemptfee = 7; + optional RoutehintList routehints = 8; + optional TlvStream extratlvs = 9; +} + +message KeysendResponse { + // KeySend.status + enum KeysendStatus { + COMPLETE = 0; + } + bytes payment_preimage = 1; + optional bytes destination = 2; + bytes payment_hash = 3; + double created_at = 4; + uint32 parts = 5; + Amount amount_msat = 6; + Amount amount_sent_msat = 7; + optional string warning_partial_completion = 8; + KeysendStatus status = 9; +} + +message FundpsbtRequest { + AmountOrAll satoshi = 1; + Feerate feerate = 2; + uint32 startweight = 3; + optional uint32 minconf = 4; + optional uint32 reserve = 5; + optional uint32 locktime = 6; + optional uint32 min_witness_weight = 7; + optional bool excess_as_change = 8; +} + +message FundpsbtResponse { + string psbt = 1; + uint32 feerate_per_kw = 2; + uint32 estimated_final_weight = 3; + Amount excess_msat = 4; + optional uint32 change_outnum = 5; + repeated FundpsbtReservations reservations = 6; +} + +message FundpsbtReservations { + bytes txid = 1; + uint32 vout = 2; + bool was_reserved = 3; + bool reserved = 4; + uint32 reserved_to_block = 5; +} + +message SendpsbtRequest { + string psbt = 1; + optional bool reserve = 2; +} + +message SendpsbtResponse { + bytes tx = 1; + bytes txid = 2; +} + +message SignpsbtRequest { + string psbt = 1; + repeated uint32 signonly = 2; +} + +message SignpsbtResponse { + string signed_psbt = 1; +} + +message UtxopsbtRequest { + Amount satoshi = 1; + Feerate feerate = 2; + uint32 startweight = 3; + repeated Outpoint utxos = 4; + optional uint32 reserve = 5; + optional bool reservedok = 8; + optional uint32 locktime = 6; + optional uint32 min_witness_weight = 7; + optional bool excess_as_change = 9; +} + +message UtxopsbtResponse { + string psbt = 1; + uint32 feerate_per_kw = 2; + uint32 estimated_final_weight = 3; + Amount excess_msat = 4; + optional uint32 change_outnum = 5; + repeated UtxopsbtReservations reservations = 6; +} + +message UtxopsbtReservations { + bytes txid = 1; + uint32 vout = 2; + bool was_reserved = 3; + bool reserved = 4; + uint32 reserved_to_block = 5; +} + +message TxdiscardRequest { + bytes txid = 1; +} + +message TxdiscardResponse { + bytes unsigned_tx = 1; + bytes txid = 2; +} + +message TxprepareRequest { + repeated OutputDesc outputs = 5; + optional Feerate feerate = 2; + optional uint32 minconf = 3; + repeated Outpoint utxos = 4; +} + +message TxprepareResponse { + string psbt = 1; + bytes unsigned_tx = 2; + bytes txid = 3; +} + +message TxsendRequest { + bytes txid = 1; +} + +message TxsendResponse { + string psbt = 1; + bytes tx = 2; + bytes txid = 3; +} + +message ListpeerchannelsRequest { + optional bytes id = 1; +} + +message ListpeerchannelsResponse { + repeated ListpeerchannelsChannels channels = 1; +} + +message ListpeerchannelsChannels { + // ListPeerChannels.channels[].state + enum ListpeerchannelsChannelsState { + OPENINGD = 0; + CHANNELD_AWAITING_LOCKIN = 1; + CHANNELD_NORMAL = 2; + CHANNELD_SHUTTING_DOWN = 3; + CLOSINGD_SIGEXCHANGE = 4; + CLOSINGD_COMPLETE = 5; + AWAITING_UNILATERAL = 6; + FUNDING_SPEND_SEEN = 7; + ONCHAIN = 8; + DUALOPEND_OPEN_INIT = 9; + DUALOPEND_AWAITING_LOCKIN = 10; + } + optional bytes peer_id = 1; + optional bool peer_connected = 2; + optional ListpeerchannelsChannelsState state = 3; + optional bytes scratch_txid = 4; + optional ListpeerchannelsChannelsFeerate feerate = 6; + optional string owner = 7; + optional string short_channel_id = 8; + optional bytes channel_id = 9; + optional bytes funding_txid = 10; + optional uint32 funding_outnum = 11; + optional string initial_feerate = 12; + optional string last_feerate = 13; + optional string next_feerate = 14; + optional uint32 next_fee_step = 15; + repeated ListpeerchannelsChannelsInflight inflight = 16; + optional bytes close_to = 17; + optional bool private = 18; + optional ChannelSide opener = 19; + optional ChannelSide closer = 20; + optional ListpeerchannelsChannelsFunding funding = 22; + optional Amount to_us_msat = 23; + optional Amount min_to_us_msat = 24; + optional Amount max_to_us_msat = 25; + optional Amount total_msat = 26; + optional Amount fee_base_msat = 27; + optional uint32 fee_proportional_millionths = 28; + optional Amount dust_limit_msat = 29; + optional Amount max_total_htlc_in_msat = 30; + optional Amount their_reserve_msat = 31; + optional Amount our_reserve_msat = 32; + optional Amount spendable_msat = 33; + optional Amount receivable_msat = 34; + optional Amount minimum_htlc_in_msat = 35; + optional Amount minimum_htlc_out_msat = 36; + optional Amount maximum_htlc_out_msat = 37; + optional uint32 their_to_self_delay = 38; + optional uint32 our_to_self_delay = 39; + optional uint32 max_accepted_htlcs = 40; + optional ListpeerchannelsChannelsAlias alias = 41; + repeated string status = 43; + optional uint64 in_payments_offered = 44; + optional Amount in_offered_msat = 45; + optional uint64 in_payments_fulfilled = 46; + optional Amount in_fulfilled_msat = 47; + optional uint64 out_payments_offered = 48; + optional Amount out_offered_msat = 49; + optional uint64 out_payments_fulfilled = 50; + optional Amount out_fulfilled_msat = 51; + repeated ListpeerchannelsChannelsHtlcs htlcs = 52; + optional string close_to_addr = 53; +} + +message ListpeerchannelsChannelsFeerate { + optional uint32 perkw = 1; + optional uint32 perkb = 2; +} + +message ListpeerchannelsChannelsInflight { + optional bytes funding_txid = 1; + optional uint32 funding_outnum = 2; + optional string feerate = 3; + optional Amount total_funding_msat = 4; + optional Amount our_funding_msat = 5; + optional bytes scratch_txid = 6; +} + +message ListpeerchannelsChannelsFunding { + optional Amount pushed_msat = 1; + optional Amount local_funds_msat = 2; + optional Amount remote_funds_msat = 3; + optional Amount fee_paid_msat = 4; + optional Amount fee_rcvd_msat = 5; +} + +message ListpeerchannelsChannelsAlias { + optional string local = 1; + optional string remote = 2; +} + +message ListpeerchannelsChannelsHtlcs { + // ListPeerChannels.channels[].htlcs[].direction + enum ListpeerchannelsChannelsHtlcsDirection { + IN = 0; + OUT = 1; + } + optional ListpeerchannelsChannelsHtlcsDirection direction = 1; + optional uint64 id = 2; + optional Amount amount_msat = 3; + optional uint32 expiry = 4; + optional bytes payment_hash = 5; + optional bool local_trimmed = 6; + optional string status = 7; + optional HtlcState state = 8; +} + +message ListclosedchannelsRequest { + optional bytes id = 1; +} + +message ListclosedchannelsResponse { + repeated ListclosedchannelsClosedchannels closedchannels = 1; +} + +message ListclosedchannelsClosedchannels { + // ListClosedChannels.closedchannels[].close_cause + enum ListclosedchannelsClosedchannelsClose_cause { + UNKNOWN = 0; + LOCAL = 1; + USER = 2; + REMOTE = 3; + PROTOCOL = 4; + ONCHAIN = 5; + } + optional bytes peer_id = 1; + bytes channel_id = 2; + optional string short_channel_id = 3; + optional ListclosedchannelsClosedchannelsAlias alias = 4; + ChannelSide opener = 5; + optional ChannelSide closer = 6; + bool private = 7; + uint64 total_local_commitments = 9; + uint64 total_remote_commitments = 10; + uint64 total_htlcs_sent = 11; + bytes funding_txid = 12; + uint32 funding_outnum = 13; + bool leased = 14; + optional Amount funding_fee_paid_msat = 15; + optional Amount funding_fee_rcvd_msat = 16; + optional Amount funding_pushed_msat = 17; + Amount total_msat = 18; + Amount final_to_us_msat = 19; + Amount min_to_us_msat = 20; + Amount max_to_us_msat = 21; + optional bytes last_commitment_txid = 22; + optional Amount last_commitment_fee_msat = 23; + ListclosedchannelsClosedchannelsClose_cause close_cause = 24; +} + +message ListclosedchannelsClosedchannelsAlias { + optional string local = 1; + optional string remote = 2; +} + +message DecodepayRequest { + string bolt11 = 1; + optional string description = 2; +} + +message DecodepayResponse { + string currency = 1; + uint64 created_at = 2; + uint64 expiry = 3; + bytes payee = 4; + optional Amount amount_msat = 5; + bytes payment_hash = 6; + string signature = 7; + optional string description = 8; + optional bytes description_hash = 9; + uint32 min_final_cltv_expiry = 10; + optional bytes payment_secret = 11; + optional bytes features = 12; + optional bytes payment_metadata = 13; + repeated DecodepayFallbacks fallbacks = 14; + repeated DecodepayExtra extra = 16; +} + +message DecodepayFallbacks { + // DecodePay.fallbacks[].type + enum DecodepayFallbacksType { + P2PKH = 0; + P2SH = 1; + P2WPKH = 2; + P2WSH = 3; + } + DecodepayFallbacksType item_type = 1; + optional string addr = 2; + bytes hex = 3; +} + +message DecodepayExtra { + string tag = 1; + string data = 2; +} + +message DecodeRequest { + string string = 1; +} + +message DecodeResponse { + // Decode.type + enum DecodeType { + BOLT12_OFFER = 0; + BOLT12_INVOICE = 1; + BOLT12_INVOICE_REQUEST = 2; + BOLT11_INVOICE = 3; + RUNE = 4; + } + DecodeType item_type = 1; + bool valid = 2; + optional bytes offer_id = 3; + repeated bytes offer_chains = 4; + optional bytes offer_metadata = 5; + optional string offer_currency = 6; + optional string warning_unknown_offer_currency = 7; + optional uint32 currency_minor_unit = 8; + optional uint64 offer_amount = 9; + optional Amount offer_amount_msat = 10; + optional string offer_description = 11; + optional string offer_issuer = 12; + optional bytes offer_features = 13; + optional uint64 offer_absolute_expiry = 14; + optional uint64 offer_quantity_max = 15; + repeated DecodeOffer_paths offer_paths = 16; + optional bytes offer_node_id = 17; + optional string warning_missing_offer_node_id = 20; + optional string warning_invalid_offer_description = 21; + optional string warning_missing_offer_description = 22; + optional string warning_invalid_offer_currency = 23; + optional string warning_invalid_offer_issuer = 24; + optional bytes invreq_metadata = 25; + optional bytes invreq_payer_id = 26; + optional bytes invreq_chain = 27; + optional Amount invreq_amount_msat = 28; + optional bytes invreq_features = 29; + optional uint64 invreq_quantity = 30; + optional string invreq_payer_note = 31; + optional uint32 invreq_recurrence_counter = 32; + optional uint32 invreq_recurrence_start = 33; + optional string warning_missing_invreq_metadata = 35; + optional string warning_missing_invreq_payer_id = 36; + optional string warning_invalid_invreq_payer_note = 37; + optional string warning_missing_invoice_request_signature = 38; + optional string warning_invalid_invoice_request_signature = 39; + optional uint64 invoice_created_at = 41; + optional uint32 invoice_relative_expiry = 42; + optional bytes invoice_payment_hash = 43; + optional Amount invoice_amount_msat = 44; + repeated DecodeInvoice_fallbacks invoice_fallbacks = 45; + optional bytes invoice_features = 46; + optional bytes invoice_node_id = 47; + optional uint64 invoice_recurrence_basetime = 48; + optional string warning_missing_invoice_paths = 50; + optional string warning_missing_invoice_blindedpay = 51; + optional string warning_missing_invoice_created_at = 52; + optional string warning_missing_invoice_payment_hash = 53; + optional string warning_missing_invoice_amount = 54; + optional string warning_missing_invoice_recurrence_basetime = 55; + optional string warning_missing_invoice_node_id = 56; + optional string warning_missing_invoice_signature = 57; + optional string warning_invalid_invoice_signature = 58; + repeated DecodeFallbacks fallbacks = 59; + optional uint64 created_at = 60; + optional uint64 expiry = 61; + optional bytes payee = 62; + optional bytes payment_hash = 63; + optional bytes description_hash = 64; + optional uint32 min_final_cltv_expiry = 65; + optional bytes payment_secret = 66; + optional bytes payment_metadata = 67; + repeated DecodeExtra extra = 69; + optional string unique_id = 70; + optional string version = 71; + optional string string = 72; + repeated DecodeRestrictions restrictions = 73; + optional string warning_rune_invalid_utf8 = 74; + optional bytes hex = 75; +} + +message DecodeOffer_paths { + bytes first_node_id = 1; + bytes blinding = 2; +} + +message DecodeOffer_recurrencePaywindow { + uint32 seconds_before = 1; + uint32 seconds_after = 2; + optional bool proportional_amount = 3; +} + +message DecodeInvoice_pathsPath { + bytes blinded_node_id = 1; + bytes encrypted_recipient_data = 2; +} + +message DecodeInvoice_fallbacks { + uint32 version = 1; + bytes hex = 2; + optional string address = 3; +} + +message DecodeFallbacks { + optional string warning_invoice_fallbacks_version_invalid = 1; +} + +message DecodeExtra { + string tag = 1; + string data = 2; +} + +message DecodeRestrictions { + repeated string alternatives = 1; + string summary = 2; +} + +message DisconnectRequest { + bytes id = 1; + optional bool force = 2; +} + +message DisconnectResponse { +} + +message FeeratesRequest { + // Feerates.style + enum FeeratesStyle { + PERKB = 0; + PERKW = 1; + } + FeeratesStyle style = 1; +} + +message FeeratesResponse { + optional string warning_missing_feerates = 1; + optional FeeratesPerkb perkb = 2; + optional FeeratesPerkw perkw = 3; + optional FeeratesOnchain_fee_estimates onchain_fee_estimates = 4; +} + +message FeeratesPerkb { + uint32 min_acceptable = 1; + uint32 max_acceptable = 2; + optional uint32 floor = 10; + repeated FeeratesPerkbEstimates estimates = 9; + optional uint32 opening = 3; + optional uint32 mutual_close = 4; + optional uint32 unilateral_close = 5; + optional uint32 delayed_to_us = 6; + optional uint32 htlc_resolution = 7; + optional uint32 penalty = 8; +} + +message FeeratesPerkbEstimates { + optional uint32 blockcount = 1; + optional uint32 feerate = 2; + optional uint32 smoothed_feerate = 3; +} + +message FeeratesPerkw { + uint32 min_acceptable = 1; + uint32 max_acceptable = 2; + optional uint32 floor = 10; + repeated FeeratesPerkwEstimates estimates = 9; + optional uint32 opening = 3; + optional uint32 mutual_close = 4; + optional uint32 unilateral_close = 5; + optional uint32 delayed_to_us = 6; + optional uint32 htlc_resolution = 7; + optional uint32 penalty = 8; +} + +message FeeratesPerkwEstimates { + optional uint32 blockcount = 1; + optional uint32 feerate = 2; + optional uint32 smoothed_feerate = 3; +} + +message FeeratesOnchain_fee_estimates { + uint64 opening_channel_satoshis = 1; + uint64 mutual_close_satoshis = 2; + uint64 unilateral_close_satoshis = 3; + uint64 htlc_timeout_satoshis = 4; + uint64 htlc_success_satoshis = 5; +} + +message FundchannelRequest { + bytes id = 9; + AmountOrAll amount = 1; + optional Feerate feerate = 2; + optional bool announce = 3; + optional uint32 minconf = 10; + optional Amount push_msat = 5; + optional string close_to = 6; + optional Amount request_amt = 7; + optional string compact_lease = 8; + repeated Outpoint utxos = 11; + optional uint32 mindepth = 12; + optional Amount reserve = 13; +} + +message FundchannelResponse { + bytes tx = 1; + bytes txid = 2; + uint32 outnum = 3; + bytes channel_id = 4; + optional bytes close_to = 5; + optional uint32 mindepth = 6; +} + +message GetrouteRequest { + bytes id = 1; + Amount amount_msat = 9; + uint64 riskfactor = 3; + optional double cltv = 4; + optional bytes fromid = 5; + optional uint32 fuzzpercent = 6; + repeated string exclude = 7; + optional uint32 maxhops = 8; +} + +message GetrouteResponse { + repeated GetrouteRoute route = 1; +} + +message GetrouteRoute { + // GetRoute.route[].style + enum GetrouteRouteStyle { + TLV = 0; + } + bytes id = 1; + string channel = 2; + uint32 direction = 3; + Amount amount_msat = 4; + uint32 delay = 5; + GetrouteRouteStyle style = 6; +} + +message ListforwardsRequest { + // ListForwards.status + enum ListforwardsStatus { + OFFERED = 0; + SETTLED = 1; + LOCAL_FAILED = 2; + FAILED = 3; + } + optional ListforwardsStatus status = 1; + optional string in_channel = 2; + optional string out_channel = 3; +} + +message ListforwardsResponse { + repeated ListforwardsForwards forwards = 1; +} + +message ListforwardsForwards { + // ListForwards.forwards[].status + enum ListforwardsForwardsStatus { + OFFERED = 0; + SETTLED = 1; + LOCAL_FAILED = 2; + FAILED = 3; + } + // ListForwards.forwards[].style + enum ListforwardsForwardsStyle { + LEGACY = 0; + TLV = 1; + } + string in_channel = 1; + optional uint64 in_htlc_id = 10; + Amount in_msat = 2; + ListforwardsForwardsStatus status = 3; + double received_time = 4; + optional string out_channel = 5; + optional uint64 out_htlc_id = 11; + optional ListforwardsForwardsStyle style = 9; + optional Amount fee_msat = 7; + optional Amount out_msat = 8; +} + +message ListpaysRequest { + // ListPays.status + enum ListpaysStatus { + PENDING = 0; + COMPLETE = 1; + FAILED = 2; + } + optional string bolt11 = 1; + optional bytes payment_hash = 2; + optional ListpaysStatus status = 3; +} + +message ListpaysResponse { + repeated ListpaysPays pays = 1; +} + +message ListpaysPays { + // ListPays.pays[].status + enum ListpaysPaysStatus { + PENDING = 0; + FAILED = 1; + COMPLETE = 2; + } + bytes payment_hash = 1; + ListpaysPaysStatus status = 2; + optional bytes destination = 3; + uint64 created_at = 4; + optional uint64 completed_at = 12; + optional string label = 5; + optional string bolt11 = 6; + optional string description = 11; + optional string bolt12 = 7; + optional bytes preimage = 13; + optional uint64 number_of_parts = 14; + optional bytes erroronion = 10; +} + +message PingRequest { + bytes id = 1; + optional uint32 len = 2; + optional uint32 pongbytes = 3; +} + +message PingResponse { + uint32 totlen = 1; +} + +message SendcustommsgRequest { + bytes node_id = 1; + bytes msg = 2; +} + +message SendcustommsgResponse { + string status = 1; +} + +message SetchannelRequest { + string id = 1; + optional Amount feebase = 2; + optional uint32 feeppm = 3; + optional Amount htlcmin = 4; + optional Amount htlcmax = 5; + optional uint32 enforcedelay = 6; +} + +message SetchannelResponse { + repeated SetchannelChannels channels = 1; +} + +message SetchannelChannels { + bytes peer_id = 1; + bytes channel_id = 2; + optional string short_channel_id = 3; + Amount fee_base_msat = 4; + uint32 fee_proportional_millionths = 5; + Amount minimum_htlc_out_msat = 6; + optional string warning_htlcmin_too_low = 7; + Amount maximum_htlc_out_msat = 8; + optional string warning_htlcmax_too_high = 9; +} + +message SigninvoiceRequest { + string invstring = 1; +} + +message SigninvoiceResponse { + string bolt11 = 1; +} + +message SignmessageRequest { + string message = 1; +} + +message SignmessageResponse { + bytes signature = 1; + bytes recid = 2; + string zbase = 3; +} + +message StopRequest { +} + +message StopResponse { +} diff --git a/proto/cln/primitives.proto b/proto/cln/primitives.proto new file mode 100644 index 000000000..82de56c32 --- /dev/null +++ b/proto/cln/primitives.proto @@ -0,0 +1,107 @@ +syntax = "proto3"; +package cln; + +message Amount { + uint64 msat = 1; +} + +message AmountOrAll { + oneof value { + Amount amount = 1; + bool all = 2; + } +} + +message AmountOrAny { + oneof value { + Amount amount = 1; + bool any = 2; + } +} + +enum ChannelSide { + LOCAL = 0; + REMOTE = 1; +} + +enum ChannelState { + Openingd = 0; + ChanneldAwaitingLockin = 1; + ChanneldNormal = 2; + ChanneldShuttingDown = 3; + ClosingdSigexchange = 4; + ClosingdComplete = 5; + AwaitingUnilateral = 6; + FundingSpendSeen = 7; + Onchain = 8; + DualopendOpenInit = 9; + DualopendAwaitingLockin = 10; +} + +enum HtlcState { + SentAddHtlc = 0; + SentAddCommit = 1; + RcvdAddRevocation = 2; + RcvdAddAckCommit = 3; + SentAddAckRevocation = 4; + RcvdAddAckRevocation = 5; + RcvdRemoveHtlc = 6; + RcvdRemoveCommit = 7; + SentRemoveRevocation = 8; + SentRemoveAckCommit = 9; + RcvdRemoveAckRevocation = 10; + RcvdAddHtlc = 11; + RcvdAddCommit = 12; + SentAddRevocation = 13; + SentAddAckCommit = 14; + SentRemoveHtlc = 15; + SentRemoveCommit = 16; + RcvdRemoveRevocation = 17; + RcvdRemoveAckCommit = 18; + SentRemoveAckRevocation = 19; +} + +message ChannelStateChangeCause {} + +message Outpoint { + bytes txid = 1; + uint32 outnum = 2; +} + +message Feerate { + oneof style { + bool slow = 1; + bool normal = 2; + bool urgent = 3; + uint32 perkb = 4; + uint32 perkw = 5; + } +} + +message OutputDesc { + string address = 1; + Amount amount = 2; +} + +message RouteHop { + bytes id = 1; + string short_channel_id = 2; + Amount feebase = 3; + uint32 feeprop = 4; + uint32 expirydelta = 5; +} +message Routehint { + repeated RouteHop hops = 1; +} +message RoutehintList { + repeated Routehint hints = 2; +} + + +message TlvEntry { + uint64 type = 1; + bytes value = 2; +} +message TlvStream { + repeated TlvEntry entries = 1; +} diff --git a/protos.js b/protos.js index 564e79034..b8fbb631f 100644 --- a/protos.js +++ b/protos.js @@ -1,37 +1,37 @@ const path = require('path'); const childProcess = require('child_process'); -const PROTO_DIR = path.join(__dirname, 'proto'); -const LIB_DIR = path.join(__dirname, 'lib/proto'); -const PROTOC_PATH = path.join( +const protoDir = path.join(__dirname, 'proto'); +const protoDirHold = path.join(__dirname, 'tools/hold/protos'); +const libDir = path.join(__dirname, 'lib/proto'); +const protocPath = path.join( __dirname, 'node_modules/.bin/grpc_tools_node_protoc', ); -const PROTOC_GEN_TS_PATH = path.join( - __dirname, - 'node_modules/.bin/protoc-gen-ts', -); - -const protoConfig = [ - `--grpc_out="grpc_js:${LIB_DIR}"`, - `--js_out="import_style=commonjs,binary:${LIB_DIR}"`, -]; - -const protoTypesConfig = [ - `--plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}"`, - `--ts_out="grpc_js:${LIB_DIR}"`, -]; +const protocGenTsPath = path.join(__dirname, 'node_modules/.bin/protoc-gen-ts'); const protoPaths = [ - `--proto_path ${PROTO_DIR} ${PROTO_DIR}/*.proto`, - `--proto_path ${PROTO_DIR} ${PROTO_DIR}/**/*.proto`, + [`--proto_path ${protoDir} ${protoDir}/*.proto`, libDir], + [`--proto_path ${protoDir} ${protoDir}/**/*.proto`, libDir], + [ + `--proto_path ${protoDirHold} ${protoDirHold}/*.proto`, + path.join(libDir, 'hold'), + ], ]; -for (const path of protoPaths) { +for (const [path, lib] of protoPaths) { try { - childProcess.execSync(`${PROTOC_PATH} ${protoConfig.join(' ')} ${path}`); childProcess.execSync( - `${PROTOC_PATH} ${protoTypesConfig.join(' ')} ${path}`, + `${protocPath} ${[ + `--grpc_out="grpc_js:${lib}"`, + `--js_out="import_style=commonjs,binary:${lib}"`, + ].join(' ')} ${path}`, + ); + childProcess.execSync( + `${protocPath} ${[ + `--plugin="protoc-gen-ts=${protocGenTsPath}"`, + `--ts_out="grpc_js:${lib}"`, + ].join(' ')} ${path}`, ); } catch (e) { console.error(`Could not compile protobuf: ${path}`); diff --git a/test/integration/Nodes.ts b/test/integration/Nodes.ts index 9e82877a9..42da15203 100644 --- a/test/integration/Nodes.ts +++ b/test/integration/Nodes.ts @@ -2,6 +2,7 @@ import { resolve } from 'path'; import Logger from '../../lib/Logger'; import LndClient from '../../lib/lightning/LndClient'; import ChainClient from '../../lib/chain/ChainClient'; +import ClnClient from '../../lib/lightning/ClnClient'; import ElementsClient from '../../lib/chain/ElementsClient'; const host = process.platform === 'win32' ? '192.168.99.100' : '127.0.0.1'; @@ -49,3 +50,22 @@ export const bitcoinLndClient2 = new LndClient(Logger.disabledLogger, 'BTC', { macaroonpath: `${lndDataPath}/macaroons/admin.macaroon`, maxPaymentFeeRatio: 0.01, }); + +export const clnDataPath = `${resolve( + __dirname, + '..', + '..', +)}/docker/regtest/data/cln/regtest`; + +export const clnClient = new ClnClient(Logger.disabledLogger, 'BTC', { + host: host, + port: 9291, + maxPaymentFeeRatio: 0.01, + rootCertPath: `${clnDataPath}/ca.pem`, + privateKeyPath: `${clnDataPath}/client-key.pem`, + certChainPath: `${clnDataPath}/client.pem`, + hold: { + host: host, + port: 9292, + }, +}); diff --git a/test/integration/Utils.spec.ts b/test/integration/Utils.spec.ts index 2c00808f2..c90d3b342 100644 --- a/test/integration/Utils.spec.ts +++ b/test/integration/Utils.spec.ts @@ -57,12 +57,12 @@ describe('Utils', () => { const cltvExpiry = 140; const preimageHash = randomBytes(32); - const { paymentRequest } = await bitcoinLndClient.addHoldInvoice( + const invoice = await bitcoinLndClient.addHoldInvoice( value, preimageHash, cltvExpiry, ); - const decoded = decodeInvoice(paymentRequest); + const decoded = decodeInvoice(invoice); expect(decoded.satoshis).toEqual(value); expect(decoded.minFinalCltvExpiry).toEqual(cltvExpiry); diff --git a/test/integration/lightning/ClnClient.spec.ts b/test/integration/lightning/ClnClient.spec.ts new file mode 100644 index 000000000..e8a9130ac --- /dev/null +++ b/test/integration/lightning/ClnClient.spec.ts @@ -0,0 +1,93 @@ +import { randomBytes } from 'crypto'; +import { crypto } from 'bitcoinjs-lib'; +import { bitcoinLndClient, clnClient } from '../Nodes'; +import { InvoiceFeature } from '../../../lib/lightning/LightningClient'; + +describe('ClnClient', () => { + beforeAll(async () => { + await bitcoinLndClient.connect(false); + }); + + afterAll(() => { + clnClient.removeAllListeners(); + clnClient.disconnect(); + bitcoinLndClient.disconnect(); + }); + + test('should init', async () => { + await clnClient.connect(); + }); + + test('should generate hold invoices', async () => { + const invoice = await clnClient.addHoldInvoice(10_000, randomBytes(32)); + expect(invoice.startsWith('lnbcrt')).toBeTruthy(); + }); + + test('should fail settle for invalid states', async () => { + await expect(clnClient.settleHoldInvoice(randomBytes(32))).rejects.toEqual( + expect.anything(), + ); + + const preimageHash = randomBytes(32); + await clnClient.addHoldInvoice(10_000, preimageHash); + await expect(clnClient.settleHoldInvoice(preimageHash)).rejects.toEqual( + expect.anything(), + ); + }); + + test('should emit events for invoice acceptance and settlement', async () => { + const preimage = randomBytes(32); + const preimageHash = crypto.sha256(preimage); + const invoice = await clnClient.addHoldInvoice(10, preimageHash); + + const acceptedPromise = new Promise((resolve) => { + clnClient.on('htlc.accepted', (eventInvoice: string) => { + expect(eventInvoice).toEqual(invoice); + resolve(); + }); + }); + + const settledPromise = new Promise((resolve) => { + clnClient.on('invoice.settled', (eventInvoice: string) => { + expect(eventInvoice).toEqual(invoice); + resolve(); + }); + }); + + const paymentPromise = bitcoinLndClient.sendPayment(invoice); + await acceptedPromise; + + await clnClient.settleHoldInvoice(preimage); + await paymentPromise; + await settledPromise; + }); + + test('should decode invoices', async () => { + const mppInvoice = + 'lnbcrt1m1pjdlsrqpp5jde4zp60f39rppkpq3fear0pqptqwpjp63m0v749sffmf0s3dxuqdqqcqzzsxqyz5vqsp5m6qqudhd3z8t2pqrpjekpfn44744zmkp3upafe9u46hx2n8lvr6q9qyyssqlvzl9f5a06m342mdvyl8vfltqt8arqusll7ce792pwyakcp3c0qsgaezprew08ejc2yshverayqjuhz5gtg09n6ffu9pll08n8y3vsqpqpt9f5'; + let res = await clnClient.decodeInvoice(mppInvoice); + expect(res.features.size).toEqual(1); + expect(res.features.has(InvoiceFeature.MPP)).toBeTruthy(); + + const routingHintsInvoice = + 'lnbc1pjwp5lvpp59kx6l0etkcdzfr33u4e6z2u6thty263w74svcfdgsh0k3svqkdxscqpjsp5emlemc9ehxkc9etwlue29arap0v23n2tfmj2nmu9l8lemn2ta8ls9q7sqqqqqqqqqqqqqqqqqqqsqqqqqysgqdqqmqz9gxqyjw5qrzjqwryaup9lh50kkranzgcdnn2fgvx390wgj5jd07rwr3vxeje0glclll3zu949263tyqqqqlgqqqqqeqqjqqjmswn6zzycvcecrkwlg5cnrpxqr3v46dpsn20fm5g8x8hm8zqqx24t5szrelp6sxs5akftcd2cra8s5vnc4d4k9vkulzr5mwjqz2mqpfvcsyr'; + res = await clnClient.decodeInvoice(routingHintsInvoice); + expect(res.routingHints.length).toEqual(1); + expect(res.routingHints[0].length).toEqual(1); + expect(res.routingHints[0][0]).toEqual({ + nodeId: + '03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f', + cltvExpiryDelta: 144, + feeBaseMsat: 1000, + chanId: '18442547286457930073', + feeProportionalMillionths: 100, + }); + + // Throw for AMP invoices + await expect( + clnClient.decodeInvoice( + 'lnbcrt1m1pjdl0y5pp5f4ljuqc3hphgadf0nqyw8hxn6klcupntynpggm487dcx2slhhndsdqqcqzzsxq9z0rgqsp59fkq9py9rzes0n4gyvwqktk6020cjzjt6lydkd2casxn4gwq00lq9q8pqqqssq4c42h37htf2w873jthvx9n8zfunl07fjvkv739xggy9uvht95crk08qdwqd59hffxryjfgcylkqlzx3hf8q2tkvnjnlkqqn768k5e5gprl27z9', + ), + ).rejects.toEqual(expect.anything()); + }); +}); diff --git a/test/integration/lightning/LightningClient.spec.ts b/test/integration/lightning/LightningClient.spec.ts new file mode 100644 index 000000000..923bae01b --- /dev/null +++ b/test/integration/lightning/LightningClient.spec.ts @@ -0,0 +1,41 @@ +import Logger from '../../../lib/Logger'; +import Database from '../../../lib/db/Database'; +import LndClient from '../../../lib/lightning/LndClient'; +import { bitcoinClient, bitcoinLndClient } from '../Nodes'; +import { calculatePaymentFee } from '../../../lib/lightning/LightningClient'; + +describe('LightningClient', () => { + const db = new Database(Logger.disabledLogger, Database.memoryDatabase); + + beforeAll(async () => { + await db.init(); + await bitcoinClient.connect(); + await Promise.all([bitcoinLndClient.connect(), bitcoinClient.generate(1)]); + }); + + afterAll(async () => { + bitcoinClient.disconnect(); + bitcoinLndClient.disconnect(); + + await db.close(); + }); + + test.each` + fee | amount + ${10000} | ${1000000} + ${87544} | ${8754398} + ${LndClient['paymentMinFee']} | ${0} + ${LndClient['paymentMinFee']} | ${1} + `( + 'should calculate payment fee $fee for invoice amount $amount', + async ({ fee, amount }) => { + expect( + calculatePaymentFee( + (await bitcoinLndClient.addInvoice(amount)).paymentRequest, + 0.01, + LndClient['paymentMinFee'], + ), + ).toEqual(fee); + }, + ); +}); diff --git a/test/integration/lightning/LndClient.spec.ts b/test/integration/lightning/LndClient.spec.ts index 9550592fb..41b133d9d 100644 --- a/test/integration/lightning/LndClient.spec.ts +++ b/test/integration/lightning/LndClient.spec.ts @@ -2,9 +2,8 @@ import * as grpc from '@grpc/grpc-js'; import { readFileSync } from 'fs'; import { getPort } from '../../Utils'; import Logger from '../../../lib/Logger'; -import Database from '../../../lib/db/Database'; import LndClient from '../../../lib/lightning/LndClient'; -import { bitcoinClient, bitcoinLndClient, lndDataPath } from '../Nodes'; +import { lndDataPath } from '../Nodes'; import { LightningClient, LightningService, @@ -16,38 +15,6 @@ import { } from '../../../lib/proto/lnd/rpc_pb'; describe('LndClient', () => { - const db = new Database(Logger.disabledLogger, Database.memoryDatabase); - - beforeAll(async () => { - await db.init(); - await bitcoinClient.connect(); - await Promise.all([bitcoinLndClient.connect(), bitcoinClient.generate(1)]); - }); - - afterAll(async () => { - bitcoinClient.disconnect(); - bitcoinLndClient.disconnect(); - - await db.close(); - }); - - test.each` - fee | amount - ${10000} | ${1000000} - ${87544} | ${8754398} - ${LndClient['paymentMinFee']} | ${0} - ${LndClient['paymentMinFee']} | ${1} - `( - 'should calculate payment fee $fee for invoice amount $amount', - async ({ fee, amount }) => { - expect( - bitcoinLndClient['calculatePaymentFee']( - (await bitcoinLndClient.addInvoice(amount)).paymentRequest, - ), - ).toEqual(fee); - }, - ); - test('should handle messages longer than the default gRPC limit', async () => { // 4 MB is the default gRPC limit const defaultGrpcLimit = 1024 * 1024 * 4; diff --git a/test/integration/rates/data/Exchanges.spec.ts b/test/integration/rates/data/Exchanges.spec.ts index 9c8b15697..a41c54b13 100644 --- a/test/integration/rates/data/Exchanges.spec.ts +++ b/test/integration/rates/data/Exchanges.spec.ts @@ -1,7 +1,6 @@ import { baseAsset, checkPrice, quoteAsset } from './Consts'; import Kraken from '../../../../lib/rates/data/exchanges/Kraken'; import Bitfinex from '../../../../lib/rates/data/exchanges/Bitfinex'; -import Poloniex from '../../../../lib/rates/data/exchanges/Poloniex'; import CoinbasePro from '../../../../lib/rates/data/exchanges/CoinbasePro'; describe('Exchanges', () => { @@ -36,11 +35,4 @@ describe('Exchanges', () => { checkPrice(price); }); - - test('should get price from Poloniex', async () => { - const poloniex = new Poloniex(); - const price = await poloniex.getPrice(baseAsset, quoteAsset); - - checkPrice(price); - }); }); diff --git a/test/integration/service/TimeoutDeltaProvider.spec.ts b/test/integration/service/TimeoutDeltaProvider.spec.ts index e46389658..581dab638 100644 --- a/test/integration/service/TimeoutDeltaProvider.spec.ts +++ b/test/integration/service/TimeoutDeltaProvider.spec.ts @@ -107,13 +107,8 @@ describe('TimeoutDeltaProvider', () => { }); test('should get timeouts of swaps with invoices', async () => { - const createInvoice = async (cltvExpiry: number) => { - const { paymentRequest } = await bitcoinLndClient2.addHoldInvoice( - 1, - randomBytes(32), - cltvExpiry, - ); - return paymentRequest; + const createInvoice = (cltvExpiry: number) => { + return bitcoinLndClient2.addHoldInvoice(1, randomBytes(32), cltvExpiry); }; // Minima diff --git a/test/integration/wallet/providers/LndWalletProvider.spec.ts b/test/integration/wallet/providers/LndWalletProvider.spec.ts index 73876fa02..8bc131ee9 100644 --- a/test/integration/wallet/providers/LndWalletProvider.spec.ts +++ b/test/integration/wallet/providers/LndWalletProvider.spec.ts @@ -44,9 +44,8 @@ describe('LndWalletProvider', () => { ), ).toEqual(expectedAmount); - const { transactionsList } = await bitcoinLndClient.getOnchainTransactions( - 0, - ); + const { transactionsList } = + await bitcoinLndClient.getOnchainTransactions(0); for (let i = 0; i < transactionsList.length; i += 1) { const transaction = transactionsList[i]; diff --git a/test/unit/VersionCheck.spec.ts b/test/unit/VersionCheck.spec.ts index 4f1b023e3..76bd0688d 100644 --- a/test/unit/VersionCheck.spec.ts +++ b/test/unit/VersionCheck.spec.ts @@ -1,18 +1,21 @@ import VersionCheck from '../../lib/VersionCheck'; +import ClnClient from '../../lib/lightning/ClnClient'; +import LndClient from '../../lib/lightning/LndClient'; +import ChainClient from '../../lib/chain/ChainClient'; describe('VersionCheck', () => { test('should check version of chain clients', () => { const symbol = 'BTC'; - const limits = VersionCheck['chainClientVersionLimits']; + const limits = VersionCheck['versionLimits'][ChainClient.serviceName]; - let unsupportedVersion = limits.minimal - 1; + let unsupportedVersion = (limits.minimal as number) - 1; expect(() => VersionCheck.checkChainClientVersion(symbol, unsupportedVersion), ).toThrow( `unsupported BTC Core version: ${unsupportedVersion}; min version ${limits.minimal}; max version ${limits.maximal}`, ); - unsupportedVersion = limits.maximal + 1; + unsupportedVersion = (limits.maximal as number) + 1; expect(() => VersionCheck.checkChainClientVersion(symbol, unsupportedVersion), ).toThrow( @@ -20,33 +23,92 @@ describe('VersionCheck', () => { ); expect(() => - VersionCheck.checkChainClientVersion(symbol, limits.maximal), + VersionCheck.checkChainClientVersion(symbol, limits.maximal as number), ).not.toThrow(); expect(() => - VersionCheck.checkChainClientVersion(symbol, limits.minimal), + VersionCheck.checkChainClientVersion(symbol, limits.minimal as number), ).not.toThrow(); }); test('should check version of LND clients', () => { const symbol = 'BTC'; - const limits = VersionCheck['lndVersionLimits']; + const limits = VersionCheck['versionLimits'][LndClient.serviceName]; - expect(() => VersionCheck.checkLndVersion(symbol, '0.10.4-beta')).toThrow( + expect(() => + VersionCheck.checkLightningVersion( + LndClient.serviceName, + symbol, + '0.10.4-beta', + ), + ).toThrow( `unsupported BTC LND version: 0.10.4-beta; min version ${limits.minimal}; max version ${limits.maximal}`, ); const maxThrowVersion = `0.${ - Number(limits.maximal.split('.')[1]) + 1 + Number((limits.maximal as string).split('.')[1]) + 1 }.0-beta`; - expect(() => VersionCheck.checkLndVersion(symbol, maxThrowVersion)).toThrow( + expect(() => + VersionCheck.checkLightningVersion( + LndClient.serviceName, + symbol, + maxThrowVersion, + ), + ).toThrow( `unsupported BTC LND version: ${maxThrowVersion}; min version ${limits.minimal}; max version ${limits.maximal}`, ); expect(() => - VersionCheck.checkLndVersion(symbol, limits.maximal), + VersionCheck.checkLightningVersion( + LndClient.serviceName, + symbol, + limits.maximal as string, + ), + ).not.toThrow(); + expect(() => + VersionCheck.checkLightningVersion( + LndClient.serviceName, + symbol, + limits.minimal as string, + ), + ).not.toThrow(); + }); + + test('should check version of CLN clients', () => { + const symbol = 'BTC'; + const limits = VersionCheck['versionLimits'][ClnClient.serviceName]; + + expect(() => + VersionCheck.checkLightningVersion(ClnClient.serviceName, symbol, 'v22'), + ).toThrow( + `unsupported BTC CLN version: v22; min version ${limits.minimal}; max version ${limits.maximal}`, + ); + + const maxThrowVersion = `v${ + Number((limits.maximal as string).split('.')[0]) + 1 + }.0`; + expect(() => + VersionCheck.checkLightningVersion( + ClnClient.serviceName, + symbol, + maxThrowVersion, + ), + ).toThrow( + `unsupported BTC CLN version: ${maxThrowVersion}; min version ${limits.minimal}; max version ${limits.maximal}`, + ); + + expect(() => + VersionCheck.checkLightningVersion( + ClnClient.serviceName, + symbol, + limits.maximal as string, + ), ).not.toThrow(); expect(() => - VersionCheck.checkLndVersion(symbol, limits.minimal), + VersionCheck.checkLightningVersion( + ClnClient.serviceName, + symbol, + limits.minimal as string, + ), ).not.toThrow(); }); }); diff --git a/test/unit/api/Controller.spec.ts b/test/unit/api/Controller.spec.ts index 08e1ebaa5..782a9b352 100644 --- a/test/unit/api/Controller.spec.ts +++ b/test/unit/api/Controller.spec.ts @@ -410,7 +410,7 @@ describe('Controller', () => { ); }); - test('should get routing hints', () => { + test('should get routing hints', async () => { const res = mockResponse(); const request: any = { @@ -419,7 +419,7 @@ describe('Controller', () => { '031015a7839468a3c266d662d5bb21ea4cea24226936e2864a7ca4f2c3939836e0', }; - controller.routingHints(mockRequest(request), res); + await controller.routingHints(mockRequest(request), res); expect(res.status).toHaveBeenCalledTimes(1); expect(res.status).toHaveBeenCalledWith(200); diff --git a/test/unit/lightning/ChannelUtils.spec.ts b/test/unit/lightning/ChannelUtils.spec.ts new file mode 100644 index 000000000..d2b08a510 --- /dev/null +++ b/test/unit/lightning/ChannelUtils.spec.ts @@ -0,0 +1,52 @@ +import { + msatToSat, + satToMsat, + scidClnToLnd, + scidLndToCln, +} from '../../../lib/lightning/ChannelUtils'; + +describe('ChannelUtils', () => { + test.each` + lnd | cln + ${'136339441909760'} | ${'124x1x0'} + ${'128642860515328'} | ${'117x1x0'} + `( + 'should convert LND ($lnd) to CLN ($cln) short channel id', + ({ cln, lnd }) => { + expect(scidLndToCln(lnd)).toEqual(cln); + }, + ); + + test.each` + lnd | cln + ${'136339441909760'} | ${'124x1x0'} + ${'128642860515328'} | ${'117x1x0'} + `( + 'should convert CLN ($cln) to LND ($lnd) short channel id', + ({ cln, lnd }) => { + expect(scidClnToLnd(cln)).toEqual(lnd); + }, + ); + + test.each` + msats | sats + ${1000} | ${1} + ${100_000} | ${100} + ${100_000_123} | ${100_000} + ${100_000_600} | ${100_001} + ${300_000_000_000} | ${300_000_000} + `('should convert msats ($msats) to sats ($sats)', ({ msats, sats }) => { + expect(msatToSat(msats)).toEqual(sats); + }); + + test.each` + msats | sats + ${1000} | ${1} + ${100_000} | ${100} + ${100_000_000} | ${100_000} + ${100_001_000} | ${100_001} + ${300_000_000_000} | ${300_000_000} + `('should convert sats ($sats) to msats ($msats)', ({ msats, sats }) => { + expect(satToMsat(sats)).toEqual(msats); + }); +}); diff --git a/test/unit/notifications/CommandHandler.spec.ts b/test/unit/notifications/CommandHandler.spec.ts index f08cc319e..fa4f7b165 100644 --- a/test/unit/notifications/CommandHandler.spec.ts +++ b/test/unit/notifications/CommandHandler.spec.ts @@ -1,6 +1,6 @@ import { wait } from '../../Utils'; import Logger from '../../../lib/Logger'; -import { stringify } from '../../../lib/Utils'; +import { getHexBuffer, getHexString, stringify } from '../../../lib/Utils'; import Database from '../../../lib/db/Database'; import Service from '../../../lib/service/Service'; import { NotificationConfig } from '../../../lib/Config'; @@ -88,14 +88,15 @@ const database = new Database(Logger.disabledLogger, ':memory:'); const mockGetAddress = jest.fn().mockResolvedValue(newAddress); -const invoicePreimage = - '765895dd514ce9358f1412c6b416d6a8f8ecea1a4e442d1e15ea8b76152fd241'; +const invoicePreimage = getHexBuffer( + '765895dd514ce9358f1412c6b416d6a8f8ecea1a4e442d1e15ea8b76152fd241', +); const mockPayInvoice = jest .fn() .mockImplementation(async (_: string, invoice: string) => { if (invoice !== 'throw') { return { - paymentPreimage: invoicePreimage, + preimage: invoicePreimage, }; } else { throw 'lnd error'; @@ -446,7 +447,7 @@ describe('CommandHandler', () => { expect(mockSendMessage).toHaveBeenCalledTimes(1); expect(mockSendMessage).toHaveBeenCalledWith( - `Paid lightning invoice\nPreimage: ${invoicePreimage}`, + `Paid lightning invoice\nPreimage: ${getHexString(invoicePreimage)}`, ); // Send onchain coins and respond with transaction id and vout diff --git a/test/unit/notifications/ExampleSwaps.ts b/test/unit/notifications/ExampleSwaps.ts index 61b4ce00e..c43828778 100644 --- a/test/unit/notifications/ExampleSwaps.ts +++ b/test/unit/notifications/ExampleSwaps.ts @@ -1,11 +1,11 @@ import { SwapType } from '../../../lib/db/models/Swap'; -import { ReverseSwapType } from '../../../lib/db/models/ReverseSwap'; +import { NodeType, ReverseSwapType } from '../../../lib/db/models/ReverseSwap'; import { ChannelCreationType } from '../../../lib/db/models/ChannelCreation'; import { - OrderSide, - SwapUpdateEvent, ChannelCreationStatus, ChannelCreationType as ChannelType, + OrderSide, + SwapUpdateEvent, } from '../../../lib/consts/Enums'; export const swapExample: SwapType = { @@ -47,6 +47,7 @@ export const reverseSwapExample: ReverseSwapType = { id: 'r123456', fee: 200, + node: NodeType.LND, orderSide: OrderSide.SELL, keyIndex: 321, minerFee: 306, diff --git a/test/unit/service/NodeInfo.spec.ts b/test/unit/service/NodeInfo.spec.ts index 400e08ab2..26045b367 100644 --- a/test/unit/service/NodeInfo.spec.ts +++ b/test/unit/service/NodeInfo.spec.ts @@ -4,28 +4,28 @@ import LndClient from '../../../lib/lightning/LndClient'; import ChainClient from '../../../lib/chain/ChainClient'; const getNodeInfo = (symbol: string) => ({ - identityPubkey: `${symbol}identityPubkey`, - urisList: [`${symbol}@127.0.0.1:9735`, `${symbol}@hidden.onion:9735`], - numPeers: 321, + pubkey: `${symbol}identityPubkey`, + uris: [`${symbol}@127.0.0.1:9735`, `${symbol}@hidden.onion:9735`], + peers: 321, }); const channelsBtc = [ { - pb_private: false, + private: false, capacity: 21, chanId: '159429186093056', channelPoint: '90eaae760896b0a18cfcc12661adda0830520bf4756ef4f7700f1354cdd4a804:0', }, { - pb_private: false, + private: false, capacity: 7, chanId: '113249697726464', channelPoint: '73c81d3495ba12e62892c95adc5b68147c12f14ef52ecbdcc38b3e75d04291c8:0', }, { - pb_private: true, + private: true, capacity: 1231123123123123, chanId: '713249697726464', channelPoint: @@ -40,19 +40,15 @@ jest.mock('../../../lib/lightning/LndClient', () => { }), listChannels: jest.fn().mockImplementation(() => { if (symbol === 'LTC') { - return { - channelsList: [], - }; + return []; } - return { - channelsList: channelsBtc, - }; + return channelsBtc; }), })); }); -const mockedLndClient = >(LndClient); +const mockedLightningClient = >(LndClient); const rawTxResult = { blocktime: 123 }; @@ -69,16 +65,32 @@ describe('NodeInfo', () => { [ 'BTC', { - lndClient: mockedLndClient('BTC'), + lndClient: mockedLightningClient('BTC'), chainClient: mockedChainClient(), }, ], [ 'LTC', { - lndClient: mockedLndClient('LTC'), + lndClient: mockedLightningClient('LTC'), }, ], + [ + 'CLN', + { + clnClient: mockedLightningClient('CLN'), + chainClient: mockedChainClient(), + }, + ], + [ + 'BOTH', + { + lndClient: mockedLightningClient('BOTH_LND'), + clnClient: mockedLightningClient('BOTH_CLN'), + chainClient: mockedChainClient(), + }, + ], + ['NEITHER', {}], ]); const nodeInfo = new NodeInfo(Logger.disabledLogger, currencies); @@ -91,13 +103,13 @@ describe('NodeInfo', () => { await nodeInfo.init(); - expect(nodeInfo['uris'].size).toEqual(2); + expect(nodeInfo['uris'].size).toEqual(4); }); test('should get node URIs', () => { const uris = nodeInfo.getUris(); - expect(uris.size).toEqual(2); + expect(uris.size).toEqual(4); expect(uris.get('BTC')).toEqual({ nodeKey: 'BTCidentityPubkey', @@ -107,6 +119,14 @@ describe('NodeInfo', () => { nodeKey: 'LTCidentityPubkey', uris: ['LTC@127.0.0.1:9735', 'LTC@hidden.onion:9735'], }); + expect(uris.get('CLN')).toEqual({ + nodeKey: 'CLNidentityPubkey', + uris: ['CLN@127.0.0.1:9735', 'CLN@hidden.onion:9735'], + }); + expect(uris.get('BOTH')).toEqual({ + nodeKey: 'BOTH_LNDidentityPubkey', + uris: ['BOTH_LND@127.0.0.1:9735', 'BOTH_LND@hidden.onion:9735'], + }); }); test('should get node stats', async () => { @@ -114,17 +134,29 @@ describe('NodeInfo', () => { const nodeStats = nodeInfo.getStats(); - expect(nodeStats.size).toEqual(2); + expect(nodeStats.size).toEqual(4); expect(nodeStats.get('BTC')).toEqual({ channels: 2, - peers: info.numPeers, + peers: info.peers, oldestChannel: rawTxResult.blocktime, capacity: channelsBtc[0].capacity + channelsBtc[1].capacity, }); expect(nodeStats.get('LTC')).toEqual({ capacity: 0, channels: 0, - peers: info.numPeers, + peers: info.peers, + }); + expect(nodeStats.get('CLN')).toEqual({ + channels: 2, + peers: info.peers, + oldestChannel: rawTxResult.blocktime, + capacity: channelsBtc[0].capacity + channelsBtc[1].capacity, + }); + expect(nodeStats.get('BOTH')).toEqual({ + channels: 4, + peers: info.peers * 2, + oldestChannel: rawTxResult.blocktime, + capacity: (channelsBtc[0].capacity + channelsBtc[1].capacity) * 2, }); }); }); diff --git a/test/unit/service/Service.spec.ts b/test/unit/service/Service.spec.ts index d1ba0bd3c..5b0d48d68 100644 --- a/test/unit/service/Service.spec.ts +++ b/test/unit/service/Service.spec.ts @@ -17,6 +17,7 @@ import ChainClient from '../../../lib/chain/ChainClient'; import FeeProvider from '../../../lib/rates/FeeProvider'; import { CurrencyInfo } from '../../../lib/proto/boltzrpc_pb'; import RateCalculator from '../../../lib/rates/RateCalculator'; +import { InvoiceFeature } from '../../../lib/lightning/LightningClient'; import PairRepository from '../../../lib/db/repositories/PairRepository'; import SwapRepository from '../../../lib/db/repositories/SwapRepository'; import WalletManager, { Currency } from '../../../lib/wallet/WalletManager'; @@ -129,17 +130,10 @@ const mockedReverseSwap = { const mockCreateReverseSwap = jest.fn().mockResolvedValue(mockedReverseSwap); const mockGetRoutingHintsResultToObjectResult = { some: 'routingData' }; -const mockGetRoutingHintsResultToObject = jest - .fn() - .mockReturnValue(mockGetRoutingHintsResultToObjectResult); const mockGetRoutingHintsResult = [ - { - toObject: mockGetRoutingHintsResultToObject, - }, - { - toObject: mockGetRoutingHintsResultToObject, - }, + mockGetRoutingHintsResultToObjectResult, + mockGetRoutingHintsResultToObjectResult, ]; const mockGetRoutingHints = jest .fn() @@ -397,6 +391,12 @@ const mockSendRawTransaction = jest.fn().mockImplementation(async () => { } }); +const mockGetRawTransactionVerbose = jest.fn().mockImplementation(async () => { + return { + blockTime: 21, + }; +}); + jest.mock('../../../lib/chain/ChainClient', () => { return jest.fn().mockImplementation(() => ({ on: () => {}, @@ -405,21 +405,22 @@ jest.mock('../../../lib/chain/ChainClient', () => { getBlockchainInfo: mockGetBlockchainInfo, getRawTransaction: mockGetRawTransaction, sendRawTransaction: mockSendRawTransaction, + getRawTransactionVerbose: mockGetRawTransactionVerbose, })); }); const mockedChainClient = >(ChainClient); const lndInfo = { + pubkey: '321', blockHeight: 123, version: '0.7.1-beta commit=v0.7.1-beta', - - numActiveChannels: 3, - numInactiveChannels: 2, - numPendingChannels: 1, - - identityPubkey: '321', - urisList: ['321@127.0.0.1:9735', '321@hidden.onion:9735'], + uris: ['321@127.0.0.1:9735', '321@hidden.onion:9735'], + channels: { + active: 3, + inactive: 2, + pending: 1, + }, }; const mockGetInfo = jest.fn().mockResolvedValue(lndInfo); @@ -433,39 +434,25 @@ const channelBalance = { localBalance: 2, remoteBalance: 4, }; -let mockListChannelsResult = {}; +let mockListChannelsResult: any[] = []; const mockListChannels = jest.fn().mockImplementation(async () => { return mockListChannelsResult; }); const decodedInvoice: any = { - featuresMap: [], + features: new Set(), }; -const mockDecodePayReq = jest.fn().mockImplementation(async () => { +const mockDecodeInvoice = jest.fn().mockImplementation(async () => { return decodedInvoice; }); -const mockDecodePayReqRaw = jest.fn().mockImplementation(async () => { - return { - getDestination: () => '', - getNumSatoshis: () => 1, - getCltvExpiry: () => 80, - getRouteHintsList: () => [], - toObject: () => ({ - featuresMap: [], - }), - }; -}); - const mockQueryRoutes = jest.fn().mockImplementation(async () => { - return { - routesList: [ - { - totalTimeLock: 80, - }, - ], - }; + return [ + { + totalTimeLock: 80, + }, + ]; }); jest.mock('../../../lib/lightning/LndClient', () => { @@ -475,8 +462,7 @@ jest.mock('../../../lib/lightning/LndClient', () => { sendPayment: mockSendPayment, queryRoutes: mockQueryRoutes, listChannels: mockListChannels, - decodePayReq: mockDecodePayReq, - decodePayReqRawResponse: mockDecodePayReqRaw, + decodeInvoice: mockDecodeInvoice, })); }); @@ -593,18 +579,16 @@ describe('Service', () => { ChannelCreationRepository.getChannelCreation = mockGetChannelCreation; - mockListChannelsResult = { - channelsList: [ - { - localBalance: channelBalance.localBalance / 2, - remoteBalance: channelBalance.remoteBalance / 2, - }, - { - localBalance: channelBalance.localBalance / 2, - remoteBalance: channelBalance.remoteBalance / 2, - }, - ], - }; + mockListChannelsResult = [ + { + localBalance: channelBalance.localBalance / 2, + remoteBalance: channelBalance.remoteBalance / 2, + }, + { + localBalance: channelBalance.localBalance / 2, + remoteBalance: channelBalance.remoteBalance / 2, + }, + ]; }); afterAll(() => { @@ -627,7 +611,7 @@ describe('Service', () => { }); test('should init', async () => { - mockListChannelsResult = { channelsList: [] }; + mockListChannelsResult = []; await service.init(configPairs); expect(mockGetPairs).toHaveBeenCalledTimes(1); @@ -683,9 +667,9 @@ describe('Service', () => { blockHeight: lndInfo.blockHeight, lndChannels: { - active: lndInfo.numActiveChannels, - inactive: lndInfo.numInactiveChannels, - pending: lndInfo.numPendingChannels, + active: lndInfo.channels.active, + inactive: lndInfo.channels.inactive, + pending: lndInfo.channels.pending, }, }); }); @@ -750,26 +734,26 @@ describe('Service', () => { [ 'BTC', { - nodeKey: lndInfo.identityPubkey, - uris: lndInfo.urisList, + nodeKey: lndInfo.pubkey, + uris: lndInfo.uris, }, ], [ 'LTC', { - nodeKey: lndInfo.identityPubkey, - uris: lndInfo.urisList, + nodeKey: lndInfo.pubkey, + uris: lndInfo.uris, }, ], ]), ); }); - test('should get routing hints', () => { + test('should get routing hints', async () => { const symbol = 'BTC'; const routingNode = '2someNode'; - const routingHints = service.getRoutingHints(symbol, routingNode); + const routingHints = await service.getRoutingHints(symbol, routingNode); expect(routingHints.length).toEqual(mockGetRoutingHintsResult.length); expect(routingHints).toEqual([ @@ -1292,25 +1276,16 @@ describe('Service', () => { lockupAddress: 'bcrt1qae5nuz2cv7gu2dpps8rwrhsfv6tjkyvpd8hqsu', }; - decodedInvoice.featuresMap = [ - [ - 30, - { - name: 'amp', - isKnown: true, - isRequired: true, - }, - ], - ]; + decodedInvoice.features = new Set([InvoiceFeature.AMP]); const invoice = 'lnbcinvoice'; await expect( service.setInvoice(mockGetSwapResult.id, invoice), ).rejects.toEqual(Errors.AMP_INVOICES_NOT_SUPPORTED()); - expect(mockDecodePayReq).toHaveBeenCalledTimes(1); - expect(mockDecodePayReq).toHaveBeenCalledWith(invoice); + expect(mockDecodeInvoice).toHaveBeenCalledTimes(2); + expect(mockDecodeInvoice).toHaveBeenCalledWith(invoice); - decodedInvoice.featuresMap = []; + decodedInvoice.features = new Set(); }); // TODO: channel creation logic diff --git a/test/unit/service/TimeoutDeltaProvider.spec.ts b/test/unit/service/TimeoutDeltaProvider.spec.ts index 85d05a13e..1d4815bfb 100644 --- a/test/unit/service/TimeoutDeltaProvider.spec.ts +++ b/test/unit/service/TimeoutDeltaProvider.spec.ts @@ -5,13 +5,16 @@ import Errors from '../../../lib/service/Errors'; import { ConfigType } from '../../../lib/Config'; import { OrderSide } from '../../../lib/consts/Enums'; import { PairConfig } from '../../../lib/consts/Types'; -import { PayReq } from '../../../lib/proto/lnd/rpc_pb'; import LndClient from '../../../lib/lightning/LndClient'; import { Currency } from '../../../lib/wallet/WalletManager'; import EthereumManager from '../../../lib/wallet/ethereum/EthereumManager'; import TimeoutDeltaProvider, { PairTimeoutBlocksDelta, } from '../../../lib/service/TimeoutDeltaProvider'; +import { + DecodedInvoice, + InvoiceFeature, +} from '../../../lib/lightning/LightningClient'; const currencies = [ { @@ -216,54 +219,41 @@ describe('TimeoutDeltaProvider', () => { queryRoutes: mockQueryRoutes, } as unknown as LndClient; - const dec = { - getNumSatoshis: () => 10_000, - getDestination: () => 'dest', - getCltvExpiry: () => 80, - getRouteHintsList: () => [], - } as unknown as PayReq; + const dec: DecodedInvoice = { + value: 10_000, + destination: 'dest', + cltvExpiry: 80, + routingHints: [], + features: new Set(), + }; const cltvLimit = 123; - await deltaProvider.checkRoutability( - lnd, - { - ...dec, - toObject: () => ({ featuresMap: [] }), - } as unknown as PayReq, - cltvLimit, - ); + await deltaProvider.checkRoutability(lnd, dec, cltvLimit); expect(mockQueryRoutes).toHaveBeenNthCalledWith( 1, - dec.getDestination(), - dec.getNumSatoshis(), + dec.destination, + dec.value, cltvLimit, - dec.getCltvExpiry(), - dec.getRouteHintsList(), + dec.cltvExpiry, + dec.routingHints, ); await deltaProvider.checkRoutability( lnd, { ...dec, - toObject: () => ({ - featuresMap: [ - [ - 0, - { name: 'multi-path-payments', isKnown: true, isRequired: false }, - ], - ], - }), - } as unknown as PayReq, + features: new Set([InvoiceFeature.MPP]), + }, cltvLimit, ); expect(mockQueryRoutes).toHaveBeenNthCalledWith( 2, - dec.getDestination(), - Math.ceil(dec.getNumSatoshis() / LndClient.paymentMaxParts), + dec.destination, + Math.ceil(dec.value / LndClient.paymentMaxParts), cltvLimit, - dec.getCltvExpiry(), - dec.getRouteHintsList(), + dec.cltvExpiry, + dec.routingHints, ); }); @@ -273,24 +263,24 @@ describe('TimeoutDeltaProvider', () => { queryRoutes: mockQueryRoutes, } as unknown as LndClient; - const dec = { - getNumSatoshis: () => 0, - getDestination: () => 'dest', - getCltvExpiry: () => 80, - getRouteHintsList: () => [], - toObject: () => ({ featuresMap: [] }), - } as unknown as PayReq; + const dec: DecodedInvoice = { + value: 0, + destination: 'dest', + cltvExpiry: 80, + routingHints: [], + features: new Set(), + }; const cltvLimit = 210; await deltaProvider.checkRoutability(lnd, dec, cltvLimit); expect(mockQueryRoutes).toHaveBeenNthCalledWith( 1, - dec.getDestination(), + dec.destination, 1, cltvLimit, - dec.getCltvExpiry(), - dec.getRouteHintsList(), + dec.cltvExpiry, + dec.routingHints, ); }); }); diff --git a/test/unit/swap/ChannelNursery.spec.ts b/test/unit/swap/ChannelNursery.spec.ts index 61344457c..65f75a889 100644 --- a/test/unit/swap/ChannelNursery.spec.ts +++ b/test/unit/swap/ChannelNursery.spec.ts @@ -104,9 +104,7 @@ const mockOpenChannel = jest.fn().mockImplementation(async () => { let mockListChannelsResult: any[] = []; const mockListChannels = jest.fn().mockImplementation(async () => { - return { - channelsList: mockListChannelsResult, - }; + return mockListChannelsResult; }); jest.mock('../../../lib/lightning/LndClient', () => { @@ -173,7 +171,11 @@ describe('ChannelNursery', () => { ChannelCreationRepository.setFundingTransaction = mockSetFundingTransaction; // Reset the injected mocked methods - channelNursery = new ChannelNursery(Logger.disabledLogger, mockSettleSwap); + channelNursery = new ChannelNursery( + Logger.disabledLogger, + mockSettleSwap, + true, + ); channelNursery['currencies'].set(btcCurrency.symbol, btcCurrency); channelNursery['currencies'].set(ltcCurrency.symbol, ltcCurrency); @@ -488,13 +490,13 @@ describe('ChannelNursery', () => { chanId: 'wrong', }, { - channelPoint: `${channelCreation.fundingTransactionId}:${ - channelCreation.fundingTransactionVout! - 1 - }`, + fundingTransactionId: channelCreation.fundingTransactionId, + fundingTransactionVout: channelCreation.fundingTransactionVout! - 1, chanId: 'wrong', }, { - channelPoint: `${channelCreation.fundingTransactionId}:${channelCreation.fundingTransactionVout}`, + fundingTransactionId: channelCreation.fundingTransactionId, + fundingTransactionVout: channelCreation.fundingTransactionVout, chanId: 'correct', }, ]; diff --git a/test/unit/swap/LightningNursery.spec.ts b/test/unit/swap/LightningNursery.spec.ts index 74711ebcc..96ec8e915 100644 --- a/test/unit/swap/LightningNursery.spec.ts +++ b/test/unit/swap/LightningNursery.spec.ts @@ -24,20 +24,20 @@ const mockOn = jest.fn().mockImplementation((event: string, callback: any) => { } }); -let mockLookupInvoiceState: Invoice.InvoiceState; -const mockLookupInvoice = jest.fn().mockImplementation(async () => { +let mockLookupHoldInvoiceState: Invoice.InvoiceState; +const mockLookupHoldInvoice = jest.fn().mockImplementation(async () => { return { - state: mockLookupInvoiceState, + state: mockLookupHoldInvoiceState, }; }); -const mockSettleInvoice = jest.fn().mockImplementation(async () => {}); +const mockSettleHoldInvoice = jest.fn().mockImplementation(async () => {}); jest.mock('../../../lib/lightning/LndClient', () => { return jest.fn().mockImplementation(() => ({ on: mockOn, - lookupInvoice: mockLookupInvoice, - settleInvoice: mockSettleInvoice, + lookupHoldInvoice: mockLookupHoldInvoice, + settleHoldInvoice: mockSettleHoldInvoice, })); }); @@ -200,8 +200,8 @@ describe('LightningNursery', () => { await emitHtlcAccepted(invoice); - expect(mockLookupInvoice).toHaveBeenCalledTimes(0); - expect(mockSettleInvoice).toHaveBeenCalledTimes(0); + expect(mockLookupHoldInvoice).toHaveBeenCalledTimes(0); + expect(mockSettleHoldInvoice).toHaveBeenCalledTimes(0); expect(mockGetReverseSwap).toHaveBeenCalledTimes(1); expect(eventsEmitted).toEqual(1); @@ -218,7 +218,7 @@ describe('LightningNursery', () => { eventsEmitted += 1; }); - mockLookupInvoiceState = InvoiceState.OPEN; + mockLookupHoldInvoiceState = InvoiceState.OPEN; mockGetReverseSwapResult = { invoice, @@ -231,12 +231,12 @@ describe('LightningNursery', () => { expect(eventsEmitted).toEqual(1); - expect(mockLookupInvoice).toHaveBeenCalledTimes(1); - expect(mockLookupInvoice).toHaveBeenCalledWith( + expect(mockLookupHoldInvoice).toHaveBeenCalledTimes(1); + expect(mockLookupHoldInvoice).toHaveBeenCalledWith( getHexBuffer(decodeInvoice(invoice).paymentHash!), ); - expect(mockSettleInvoice).toHaveBeenCalledTimes(0); + expect(mockSettleHoldInvoice).toHaveBeenCalledTimes(0); expect(mockGetReverseSwap).toHaveBeenCalledTimes(1); nursery.on('invoice.paid', (reverseSwap) => { @@ -251,8 +251,8 @@ describe('LightningNursery', () => { expect(eventsEmitted).toEqual(2); - expect(mockSettleInvoice).toHaveBeenCalledTimes(1); - expect(mockSettleInvoice).toHaveBeenCalledWith( + expect(mockSettleHoldInvoice).toHaveBeenCalledTimes(1); + expect(mockSettleHoldInvoice).toHaveBeenCalledWith( getHexBuffer(minerFeeInvoicePreimage), ); @@ -287,7 +287,7 @@ describe('LightningNursery', () => { expect(eventsEmitted).toEqual(0); - expect(mockSettleInvoice).toHaveBeenCalledTimes(0); + expect(mockSettleHoldInvoice).toHaveBeenCalledTimes(0); expect(mockGetReverseSwap).toHaveBeenCalledTimes(1); nursery.on('minerfee.invoice.paid', (reverseSwap) => { @@ -298,20 +298,20 @@ describe('LightningNursery', () => { eventsEmitted += 1; }); - mockLookupInvoiceState = InvoiceState.ACCEPTED; + mockLookupHoldInvoiceState = InvoiceState.ACCEPTED; // Accept HTLC(s) for the miner fee invoice await emitHtlcAccepted(minerFeeInvoice); expect(eventsEmitted).toEqual(2); - expect(mockLookupInvoice).toHaveBeenCalledTimes(1); - expect(mockLookupInvoice).toHaveBeenCalledWith( + expect(mockLookupHoldInvoice).toHaveBeenCalledTimes(1); + expect(mockLookupHoldInvoice).toHaveBeenCalledWith( getHexBuffer(decodeInvoice(invoice).paymentHash!), ); - expect(mockSettleInvoice).toHaveBeenCalledTimes(1); - expect(mockSettleInvoice).toHaveBeenCalledWith( + expect(mockSettleHoldInvoice).toHaveBeenCalledTimes(1); + expect(mockSettleHoldInvoice).toHaveBeenCalledWith( getHexBuffer(minerFeeInvoicePreimage), ); diff --git a/test/unit/swap/NodeSwitch.spec.ts b/test/unit/swap/NodeSwitch.spec.ts new file mode 100644 index 000000000..1cb929487 --- /dev/null +++ b/test/unit/swap/NodeSwitch.spec.ts @@ -0,0 +1,85 @@ +import Logger from '../../../lib/Logger'; +import Swap from '../../../lib/db/models/Swap'; +import NodeSwitch from '../../../lib/swap/NodeSwitch'; +import LndClient from '../../../lib/lightning/LndClient'; +import ClnClient from '../../../lib/lightning/ClnClient'; +import { Currency } from '../../../lib/wallet/WalletManager'; +import ReverseSwap, { NodeType } from '../../../lib/db/models/ReverseSwap'; + +describe('NodeSwitch', () => { + const clnClient = { serviceName: () => ClnClient.serviceName }; + const lndClient = { serviceName: () => LndClient.serviceName }; + + const currency = { + clnClient, + lndClient, + } as Currency; + + test.each` + amount | client | currency + ${1} | ${clnClient} | ${currency} + ${21} | ${clnClient} | ${currency} + ${1_000} | ${clnClient} | ${currency} + ${1_000_000} | ${clnClient} | ${currency} + ${1_000_001} | ${lndClient} | ${currency} + ${2_000_000} | ${lndClient} | ${currency} + ${1} | ${lndClient} | ${{ lndClient }} + ${2_000_000} | ${clnClient} | ${{ clnClient }} + `( + 'should get node for Swap of amount $amount', + ({ amount, client, currency }) => { + expect( + NodeSwitch.getSwapNode(Logger.disabledLogger, currency, { + invoiceAmount: amount, + } as Swap), + ).toEqual(client); + }, + ); + + test.each` + type | node + ${NodeType.LND} | ${lndClient} + ${NodeType.CLN} | ${clnClient} + ${21} | ${clnClient} + `('should get node for NodeType $type', ({ type, node }) => { + expect( + NodeSwitch.getReverseSwapNode(currency, { + node: type, + } as ReverseSwap), + ).toEqual(node); + }); + + test.each` + amount | client | type | currency + ${1} | ${clnClient} | ${NodeType.CLN} | ${currency} + ${21} | ${clnClient} | ${NodeType.CLN} | ${currency} + ${1_000} | ${clnClient} | ${NodeType.CLN} | ${currency} + ${1_000_000} | ${clnClient} | ${NodeType.CLN} | ${currency} + ${1_000_001} | ${lndClient} | ${NodeType.LND} | ${currency} + ${2_000_000} | ${lndClient} | ${NodeType.LND} | ${currency} + ${1} | ${lndClient} | ${NodeType.LND} | ${{ lndClient }} + ${2_000_000} | ${clnClient} | ${NodeType.CLN} | ${{ clnClient }} + `( + 'should get node for Reverse Swap of amount $amount', + ({ amount, client, type, currency }) => { + expect( + NodeSwitch.getNodeForReverseSwap( + Logger.disabledLogger, + '', + currency, + amount, + ), + ).toEqual({ nodeType: type, lightningClient: client }); + }, + ); + + test.each` + has | currency + ${true} | ${currency} + ${true} | ${{ lndClient }} + ${true} | ${{ clnClient }} + ${false} | ${{}} + `('should check if currency has clients', ({ has, currency }) => { + expect(NodeSwitch.hasClient(currency)).toEqual(has); + }); +}); diff --git a/test/unit/swap/SwapManager.spec.ts b/test/unit/swap/SwapManager.spec.ts index 4b5808af4..8dc084d6b 100644 --- a/test/unit/swap/SwapManager.spec.ts +++ b/test/unit/swap/SwapManager.spec.ts @@ -11,7 +11,7 @@ import { ECPair } from '../../../lib/ECPairHelper'; import ChainClient from '../../../lib/chain/ChainClient'; import LndClient from '../../../lib/lightning/LndClient'; import RateProvider from '../../../lib/rates/RateProvider'; -import ReverseSwap from '../../../lib/db/models/ReverseSwap'; +import ReverseSwap, { NodeType } from '../../../lib/db/models/ReverseSwap'; import SwapOutputType from '../../../lib/swap/SwapOutputType'; import SwapRepository from '../../../lib/db/repositories/SwapRepository'; import InvoiceExpiryHelper from '../../../lib/service/InvoiceExpiryHelper'; @@ -210,23 +210,26 @@ const mockQueryRoutes = jest const mockListChannelsResult = []; const mockListChannels = jest.fn().mockImplementation(() => { - return { - channelsList: mockListChannelsResult, - }; + return mockListChannelsResult; }); const mockAddHoldInvoiceResult = 'holdInvoice'; -const mockAddHoldInvoice = jest.fn().mockResolvedValue({ - paymentRequest: mockAddHoldInvoiceResult, +const mockAddHoldInvoice = jest.fn().mockImplementation(async () => { + return mockAddHoldInvoiceResult; }); const mockSubscribeSingleInvoice = jest.fn().mockResolvedValue(undefined); +const mockServiceName = jest.fn().mockReturnValue('LND'); +const mockGetInfo = jest.fn().mockResolvedValue({ pubkey: 'me' }); + jest.mock('../../../lib/lightning/LndClient', () => { const mockedImplementation = jest.fn().mockImplementation(() => { return { on: () => {}, + getInfo: mockGetInfo, queryRoutes: mockQueryRoutes, + serviceName: mockServiceName, listChannels: mockListChannels, addHoldInvoice: mockAddHoldInvoice, subscribeSingleInvoice: mockSubscribeSingleInvoice, @@ -946,6 +949,7 @@ describe('SwapManager', () => { orderSide, onchainAmount, fee: percentageFee, + node: NodeType.LND, id: reverseSwap.id, minerFeeInvoice: undefined, invoice: mockAddHoldInvoiceResult, @@ -1028,7 +1032,7 @@ describe('SwapManager', () => { orderSide, onchainAmount, fee: percentageFee, - + node: NodeType.LND, id: prepayReverseSwap.id, invoice: mockAddHoldInvoiceResult, invoiceAmount: holdInvoiceAmount, @@ -1130,6 +1134,7 @@ describe('SwapManager', () => { const reverseSwaps = [ { pair: 'BTC/BTC', + node: NodeType.LND, orderSide: OrderSide.BUY, status: SwapUpdateEvent.SwapCreated, minerFeeInvoice: diff --git a/test/unit/swap/routing/RoutingHints.spec.ts b/test/unit/swap/routing/RoutingHints.spec.ts new file mode 100644 index 000000000..21458602d --- /dev/null +++ b/test/unit/swap/routing/RoutingHints.spec.ts @@ -0,0 +1,73 @@ +import Logger from '../../../../lib/Logger'; +import { Currency } from '../../../../lib/wallet/WalletManager'; +import RoutingHints from '../../../../lib/swap/routing/RoutingHints'; + +const mockStart = jest.fn().mockResolvedValue(undefined); +const mockRoutingHints = jest.fn().mockResolvedValue('lnd'); + +jest.mock('../../../../lib/swap/routing/RoutingHintsLnd', () => { + return jest.fn().mockImplementation(() => { + return { + start: mockStart, + routingHints: mockRoutingHints, + }; + }); +}); + +describe('RoutingHints', () => { + const clnClient = { + routingHints: jest.fn().mockResolvedValue('cln'), + }; + + const hints = new RoutingHints(Logger.disabledLogger, [ + { + symbol: 'lnd', + lndClient: {}, + } as unknown as Currency, + { + clnClient, + symbol: 'cln', + } as unknown as Currency, + { + clnClient, + symbol: 'both', + lndClient: {}, + } as unknown as Currency, + { + symbol: 'neither', + } as unknown as Currency, + ]); + + test('should initialize', () => { + const providers = hints['providers']; + + expect(providers.size).toEqual(3); + expect(providers.get('lnd')).toEqual({ + lnd: expect.anything(), + }); + expect(providers.get('cln')).toEqual({ + cln: clnClient, + }); + expect(providers.get('both')).toEqual({ + cln: clnClient, + lnd: expect.anything(), + }); + }); + + test('should start', async () => { + await hints.start(); + expect(mockStart).toHaveBeenCalledTimes(2); + }); + + test.each` + symbol | expected + ${'lnd'} | ${'lnd'} + ${'cln'} | ${'cln'} + ${'both'} | ${'lnd'} + ${'neither'} | ${[]} + `('should get routing hints for $symbol', async ({ symbol, expected }) => { + await expect(hints.getRoutingHints(symbol, 'node')).resolves.toEqual( + expected, + ); + }); +}); diff --git a/test/unit/swap/RoutingHintsProvider.spec.ts b/test/unit/swap/routing/RoutingHintsLnd.spec.ts similarity index 58% rename from test/unit/swap/RoutingHintsProvider.spec.ts rename to test/unit/swap/routing/RoutingHintsLnd.spec.ts index af5442af0..1400a4320 100644 --- a/test/unit/swap/RoutingHintsProvider.spec.ts +++ b/test/unit/swap/routing/RoutingHintsLnd.spec.ts @@ -1,6 +1,10 @@ -import Logger from '../../../lib/Logger'; -import LndClient from '../../../lib/lightning/LndClient'; -import RoutingHintsProvider from '../../../lib/swap/RoutingHintsProvider'; +import Logger from '../../../../lib/Logger'; +import LndClient from '../../../../lib/lightning/LndClient'; +import RoutingHintsLnd from '../../../../lib/swap/routing/RoutingHintsLnd'; + +const mockGetInfo = jest.fn().mockResolvedValue({ + pubkey: 'me', +}); const mockListChannelsResult: any = [ { @@ -17,9 +21,7 @@ const mockListChannelsResult: any = [ }, ]; const mockListChannels = jest.fn().mockImplementation(async () => { - return { - channelsList: mockListChannelsResult, - }; + return mockListChannelsResult; }); const mockGetChannelInfoResults = new Map([ @@ -37,7 +39,7 @@ const mockGetChannelInfoResults = new Map([ [ mockListChannelsResult[1].chanId, { - node1Pub: 'some other node', + node1Pub: 'me', node2Policy: { feeBaseMsat: 1200, timeLockDelta: 420, @@ -65,10 +67,11 @@ const mockGetChannelInfo = jest const lndSymbol = 'BTC'; -jest.mock('../../../lib/lightning/LndClient', () => { +jest.mock('../../../../lib/lightning/LndClient', () => { return jest.fn().mockImplementation(() => { return { symbol: lndSymbol, + getInfo: mockGetInfo, listChannels: mockListChannels, getChannelInfo: mockGetChannelInfo, }; @@ -78,9 +81,10 @@ jest.mock('../../../lib/lightning/LndClient', () => { const MockedLndClient = >(LndClient); describe('RoutingHintsProvider', () => { - let provider = new RoutingHintsProvider(Logger.disabledLogger, [ + let provider = new RoutingHintsLnd( + Logger.disabledLogger, new MockedLndClient(), - ]); + ); beforeEach(() => { jest.clearAllMocks(); @@ -91,11 +95,11 @@ describe('RoutingHintsProvider', () => { }); test('should initialize', async () => { - expect(RoutingHintsProvider['channelFetchInterval']).toEqual(5); + expect(RoutingHintsLnd['channelFetchInterval']).toEqual(15); // Inject a mock into the class to be able to check whether the function is called const mockUpdateChannels = jest.fn().mockImplementation(); - provider['updateChannels'] = mockUpdateChannels; + provider['update'] = mockUpdateChannels; await provider.start(); @@ -104,9 +108,10 @@ describe('RoutingHintsProvider', () => { provider.stop(); // Initialize a new routing hints provider without the injected mock - provider = new RoutingHintsProvider(Logger.disabledLogger, [ + provider = new RoutingHintsLnd( + Logger.disabledLogger, new MockedLndClient(), - ]); + ); }); test('should clear interval when stopped', async () => { @@ -120,7 +125,7 @@ describe('RoutingHintsProvider', () => { }); test('should update private channel list', async () => { - await provider['updateChannels'](); + await provider['update'](); expect(mockListChannels).toHaveBeenCalledTimes(1); expect(mockListChannels).toHaveBeenCalledWith(true, true); @@ -136,50 +141,46 @@ describe('RoutingHintsProvider', () => { ); } - const channels = provider['channels']; - const lndChannels = channels.get(lndSymbol)!; - - expect(channels.size).toEqual(1); - expect(lndChannels.length).toEqual(mockListChannelsResult.length); - - for (let i = 0; i < mockListChannelsResult.length; i++) { - expect(lndChannels[i]).toEqual({ - channel: mockListChannelsResult[i], - routingInfo: mockGetChannelInfoResults.get( - mockListChannelsResult[i].chanId, - ), - }); + const channels = provider['channelInfos']; + + expect(channels.size).toEqual(2); + expect(channels.get('1')?.length).toEqual(2); + expect(channels.get('2')?.length).toEqual(1); + + for (const chan of mockListChannelsResult) { + const chanPolicy = mockGetChannelInfoResults.get(chan.chanId); + const policy = chanPolicy.node1Policy || chanPolicy.node2Policy; + + const saved = channels.get(chan.remotePubkey); + expect(saved?.find((entry) => entry[0].chanId === chan.chanId)).toEqual([ + { + nodeId: chan.remotePubkey, + chanId: chan.chanId, + feeBaseMsat: policy.feeBaseMsat, + cltvExpiryDelta: policy.timeLockDelta, + feeProportionalMillionths: policy.feeRateMilliMsat, + }, + ]); } }); - test('should get routing hints', () => { - const routingHints = provider.getRoutingHints( - lndSymbol, - mockListChannelsResult[0].remotePubkey, - ); + test('should get routing hints', async () => { + const pubkey = mockListChannelsResult[0].remotePubkey; + const routingHints = await provider.routingHints(pubkey); expect(routingHints.length).toEqual(2); - for (let i = 0; i < routingHints.length; i++) { - const hintList = routingHints[i].getHopHintsList(); - + for (const hintList of routingHints) { expect(hintList.length).toEqual(1); - const channelInfo = mockGetChannelInfoResults.get( - mockListChannelsResult[i].chanId, - )!; - const routingInfo = - i === 0 ? channelInfo.node1Policy : channelInfo.node2Policy; - - expect(hintList[0].getFeeBaseMsat()).toEqual(routingInfo.feeBaseMsat); - expect(hintList[0].getChanId()).toEqual(mockListChannelsResult[i].chanId); - expect(hintList[0].getCltvExpiryDelta()).toEqual( - routingInfo.timeLockDelta, - ); - expect(hintList[0].getNodeId()).toEqual( - mockListChannelsResult[0].remotePubkey, - ); - expect(hintList[0].getFeeProportionalMillionths()).toEqual( + const chanPolicy = mockGetChannelInfoResults.get(hintList[0].chanId)!; + const routingInfo = chanPolicy.node1Policy || chanPolicy.node2Policy; + + const hint = hintList[0]; + expect(hint.nodeId).toEqual(pubkey); + expect(hint.feeBaseMsat).toEqual(routingInfo.feeBaseMsat); + expect(hint.cltvExpiryDelta).toEqual(routingInfo.timeLockDelta); + expect(hint.feeProportionalMillionths).toEqual( routingInfo.feeRateMilliMsat, ); } diff --git a/tools/hold/consts.py b/tools/hold/consts.py index c1d9edb3d..6e6ed4252 100644 --- a/tools/hold/consts.py +++ b/tools/hold/consts.py @@ -9,6 +9,7 @@ class Network(str, Enum): PLUGIN_NAME = "hold" +VERSION = "0.0.1" TIMEOUT_CANCEL = 60 TIMEOUT_CANCEL_REGTEST = 5 diff --git a/tools/hold/datastore.py b/tools/hold/datastore.py index c9d317393..3671074f7 100644 --- a/tools/hold/datastore.py +++ b/tools/hold/datastore.py @@ -1,10 +1,11 @@ +from dataclasses import dataclass from enum import Enum from typing import Any from consts import PLUGIN_NAME from invoice import HoldInvoice from pyln.client import Plugin, RpcError -from settler import Settler +from settler import Htlc, Settler class DataErrorCodes(int, Enum): @@ -12,6 +13,12 @@ class DataErrorCodes(int, Enum): KeyExists = 1202 +@dataclass +class HoldInvoiceHtlcs: + invoice: HoldInvoice + htlcs: list[Htlc] + + class DataStore: _plugin: Plugin _settler: Settler @@ -21,6 +28,7 @@ def __init__(self, plugin: Plugin, settler: Settler) -> None: self._plugin = plugin self._settler = settler + # TODO: save creation time def save_invoice(self, invoice: HoldInvoice, mode: str = "must-create") -> None: self._plugin.rpc.datastore( key=[PLUGIN_NAME, DataStore._invoices_key, invoice.payment_hash], @@ -28,18 +36,20 @@ def save_invoice(self, invoice: HoldInvoice, mode: str = "must-create") -> None: mode=mode, ) - def list_invoices(self, payment_hash: str | None) -> list[HoldInvoice]: + def list_invoices(self, payment_hash: str | None) -> list[HoldInvoiceHtlcs]: key = [PLUGIN_NAME, DataStore._invoices_key] if payment_hash is not None: key.append(payment_hash) - return self._parse_invoices( - self._plugin.rpc.listdatastore( - key=key, + return self._add_htlcs( + self._parse_invoices( + self._plugin.rpc.listdatastore( + key=key, + ) ) ) - def get_invoice(self, payment_hash: str) -> HoldInvoice | None: + def get_invoice(self, payment_hash: str) -> HoldInvoiceHtlcs | None: invoices = self.list_invoices(payment_hash) if len(invoices) == 0: return None @@ -79,6 +89,17 @@ def delete_invoices(self) -> int: return len(invoices) + def _add_htlcs(self, invoices: list[HoldInvoice]) -> list[HoldInvoiceHtlcs]: + return [ + HoldInvoiceHtlcs( + invoice=invoice, + htlcs=self._settler.htlcs[invoice.payment_hash].htlcs + if invoice.payment_hash in self._settler.htlcs + else [], + ) + for invoice in invoices + ] + @staticmethod def _parse_invoices(data: dict[str, Any]) -> list[HoldInvoice]: return [HoldInvoice.from_json(i["string"]) for i in data["datastore"]] diff --git a/tools/hold/enums.py b/tools/hold/enums.py index bf59dd351..07a496037 100644 --- a/tools/hold/enums.py +++ b/tools/hold/enums.py @@ -11,7 +11,11 @@ class InvoiceState(str, Enum): POSSIBLE_STATE_TRANSITIONS = { InvoiceState.Paid: [], InvoiceState.Cancelled: [], - InvoiceState.Accepted: [InvoiceState.Cancelled, InvoiceState.Paid], + InvoiceState.Accepted: [ + InvoiceState.Cancelled, + InvoiceState.Paid, + InvoiceState.Accepted, + ], InvoiceState.Unpaid: [InvoiceState.Accepted, InvoiceState.Cancelled], } diff --git a/tools/hold/hold.py b/tools/hold/hold.py index 8631db7f7..54a492488 100644 --- a/tools/hold/hold.py +++ b/tools/hold/hold.py @@ -1,7 +1,7 @@ import hashlib from bolt11.types import RouteHint -from datastore import DataErrorCodes, DataStore +from datastore import DataErrorCodes, DataStore, HoldInvoiceHtlcs from encoder import Encoder from htlc_handler import HtlcHandler from invoice import HoldInvoice, InvoiceState @@ -68,7 +68,7 @@ def invoice( try: hi = HoldInvoice(InvoiceState.Unpaid, signed, payment_hash, None) self.ds.save_invoice(hi) - self.tracker.send_update(hi.payment_hash, hi.state) + self.tracker.send_update(hi.payment_hash, hi.bolt11, hi.state) self._plugin.log(f"Added hold invoice {payment_hash} for {amount_msat}") except RpcError as e: # noinspection PyTypeChecker @@ -85,7 +85,7 @@ def settle(self, payment_preimage: str) -> None: if invoice is None: raise NoSuchInvoiceError - self.ds.settle_invoice(invoice, payment_preimage) + self.ds.settle_invoice(invoice.invoice, payment_preimage) self._plugin.log(f"Settled hold invoice {payment_hash}") def cancel(self, payment_hash: str) -> None: @@ -93,10 +93,10 @@ def cancel(self, payment_hash: str) -> None: if invoice is None: raise NoSuchInvoiceError - self.ds.cancel_invoice(invoice) + self.ds.cancel_invoice(invoice.invoice) self._plugin.log(f"Cancelled hold invoice {payment_hash}") - def list_invoices(self, payment_hash: str | None) -> list[HoldInvoice]: + def list_invoices(self, payment_hash: str | None) -> list[HoldInvoiceHtlcs]: return self.ds.list_invoices(None if payment_hash == "" else payment_hash) def wipe(self, payment_hash: str | None) -> int: diff --git a/tools/hold/invoice.py b/tools/hold/invoice.py index b60ee92d0..0d167337d 100644 --- a/tools/hold/invoice.py +++ b/tools/hold/invoice.py @@ -33,7 +33,7 @@ def set_state(self, tracker: Tracker, new_state: InvoiceState) -> None: raise HoldInvoiceStateError(self.state, new_state) self.state = new_state - tracker.send_update(self.payment_hash, self.state) + tracker.send_update(self.payment_hash, self.bolt11, self.state) def to_json(self) -> str: return json.dumps( diff --git a/tools/hold/plugin.py b/tools/hold/plugin.py index 86f75a1bf..32e601d15 100755 --- a/tools/hold/plugin.py +++ b/tools/hold/plugin.py @@ -2,7 +2,14 @@ import sys from typing import Any -from consts import GRPC_HOST, GRPC_HOST_REGTEST, GRPC_PORT, PLUGIN_NAME, Network +from consts import ( + GRPC_HOST, + GRPC_HOST_REGTEST, + GRPC_PORT, + PLUGIN_NAME, + VERSION, + Network, +) from encoder import Defaults from errors import Errors from invoice import HoldInvoiceStateError @@ -39,7 +46,7 @@ def init( ) server.start(grpc_host, GRPC_PORT) - pl.log(f"Plugin {PLUGIN_NAME} initialized") + pl.log(f"Plugin {PLUGIN_NAME} v{VERSION} initialized") @pl.method("holdinvoice") @@ -71,8 +78,15 @@ def hold_invoice( @pl.method("listholdinvoices") def list_hold_invoices(plugin: Plugin, payment_hash: str = "") -> dict[str, Any]: + invoices = [] + + for i in hold.list_invoices(payment_hash): + invoice = i.invoice.__dict__ + invoice["htlcs"] = [htlc.to_dict() for htlc in i.htlcs] + invoices.append(invoice) + return { - "holdinvoices": [i.__dict__ for i in hold.list_invoices(payment_hash)], + "holdinvoices": invoices, } @@ -130,13 +144,15 @@ def on_htlc_accepted( Settler.continue_callback(request) return - invoice = hold.ds.get_invoice(htlc["payment_hash"]) + invoice_htlcs = hold.ds.get_invoice(htlc["payment_hash"]) # Ignore invoices that aren't hold invoices - if invoice is None: + if invoice_htlcs is None: Settler.continue_callback(request) return + invoice = invoice_htlcs.invoice + dec = plugin.rpc.decodepay(invoice.bolt11) if htlc["cltv_expiry_relative"] < dec["min_final_cltv_expiry"]: plugin.log( diff --git a/tools/hold/protos/hold.proto b/tools/hold/protos/hold.proto index ce5143218..9f8692b13 100644 --- a/tools/hold/protos/hold.proto +++ b/tools/hold/protos/hold.proto @@ -3,6 +3,8 @@ syntax = "proto3"; package hold; service Hold { + rpc GetInfo (GetInfoRequest) returns (GetInfoResponse) {} + rpc Invoice (InvoiceRequest) returns (InvoiceResponse) {} rpc RoutingHints (RoutingHintsRequest) returns (RoutingHintsResponse) {} rpc List (ListRequest) returns (ListResponse) {} @@ -14,6 +16,11 @@ service Hold { rpc TrackAll (TrackAllRequest) returns (stream TrackAllResponse) {} } +message GetInfoRequest {} +message GetInfoResponse { + string version = 1; +} + message InvoiceRequest { string payment_hash = 1; uint64 amount_msat = 2; @@ -51,10 +58,22 @@ message ListRequest { } enum InvoiceState { - InvoiceUnpaid = 0; - InvoiceAccepted = 1; - InvoicePaid = 2; - InvoiceCancelled = 3; + INVOICE_UNPAID = 0; + INVOICE_ACCEPTED = 1; + INVOICE_PAID = 2; + INVOICE_CANCELLED = 3; +} + +enum HtlcState { + HTLC_ACCEPTED = 0; + HTLC_SETTLED = 1; + HTLC_CANCELLED = 2; +} + +message Htlc { + HtlcState state = 1; + uint64 msat = 2; + uint64 creation_time = 3; } message Invoice { @@ -62,6 +81,7 @@ message Invoice { optional string payment_preimage = 2; InvoiceState state = 3; string bolt11 = 4; + repeated Htlc htlcs = 5; } message ListResponse { @@ -88,5 +108,6 @@ message TrackResponse { message TrackAllRequest {} message TrackAllResponse { string payment_hash = 1; - InvoiceState state = 2; + string bolt11 = 2; + InvoiceState state = 3; } diff --git a/tools/hold/protos/hold_pb2.py b/tools/hold/protos/hold_pb2.py index 948d3cd80..f3a30f0f5 100644 --- a/tools/hold/protos/hold_pb2.py +++ b/tools/hold/protos/hold_pb2.py @@ -13,7 +13,7 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\nhold.proto\x12\x04hold"\xed\x01\n\x0eInvoiceRequest\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12\x13\n\x0b\x61mount_msat\x18\x02 \x01(\x04\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x65xpiry\x18\x04 \x01(\x04H\x01\x88\x01\x01\x12"\n\x15min_final_cltv_expiry\x18\x05 \x01(\x04H\x02\x88\x01\x01\x12(\n\rrouting_hints\x18\x06 \x03(\x0b\x32\x11.hold.RoutingHintB\x0e\n\x0c_descriptionB\t\n\x07_expiryB\x18\n\x16_min_final_cltv_expiry"!\n\x0fInvoiceResponse\x12\x0e\n\x06\x62olt11\x18\x01 \x01(\t"#\n\x13RoutingHintsRequest\x12\x0c\n\x04node\x18\x01 \x01(\t"q\n\x03Hop\x12\x12\n\npublic_key\x18\x01 \x01(\t\x12\x18\n\x10short_channel_id\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_fee\x18\x03 \x01(\x04\x12\x0f\n\x07ppm_fee\x18\x04 \x01(\x04\x12\x19\n\x11\x63ltv_expiry_delta\x18\x05 \x01(\x04"&\n\x0bRoutingHint\x12\x17\n\x04hops\x18\x01 \x03(\x0b\x32\t.hold.Hop"8\n\x14RoutingHintsResponse\x12 \n\x05hints\x18\x01 \x03(\x0b\x32\x11.hold.RoutingHint"9\n\x0bListRequest\x12\x19\n\x0cpayment_hash\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_payment_hash"\x86\x01\n\x07Invoice\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12\x1d\n\x10payment_preimage\x18\x02 \x01(\tH\x00\x88\x01\x01\x12!\n\x05state\x18\x03 \x01(\x0e\x32\x12.hold.InvoiceState\x12\x0e\n\x06\x62olt11\x18\x04 \x01(\tB\x13\n\x11_payment_preimage"/\n\x0cListResponse\x12\x1f\n\x08invoices\x18\x01 \x03(\x0b\x32\r.hold.Invoice")\n\rSettleRequest\x12\x18\n\x10payment_preimage\x18\x01 \x01(\t"\x10\n\x0eSettleResponse"%\n\rCancelRequest\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t"\x10\n\x0e\x43\x61ncelResponse"$\n\x0cTrackRequest\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t"2\n\rTrackResponse\x12!\n\x05state\x18\x01 \x01(\x0e\x32\x12.hold.InvoiceState"\x11\n\x0fTrackAllRequest"K\n\x10TrackAllResponse\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12!\n\x05state\x18\x02 \x01(\x0e\x32\x12.hold.InvoiceState*]\n\x0cInvoiceState\x12\x11\n\rInvoiceUnpaid\x10\x00\x12\x13\n\x0fInvoiceAccepted\x10\x01\x12\x0f\n\x0bInvoicePaid\x10\x02\x12\x14\n\x10InvoiceCancelled\x10\x03\x32\x9d\x03\n\x04Hold\x12\x38\n\x07Invoice\x12\x14.hold.InvoiceRequest\x1a\x15.hold.InvoiceResponse"\x00\x12G\n\x0cRoutingHints\x12\x19.hold.RoutingHintsRequest\x1a\x1a.hold.RoutingHintsResponse"\x00\x12/\n\x04List\x12\x11.hold.ListRequest\x1a\x12.hold.ListResponse"\x00\x12\x35\n\x06Settle\x12\x13.hold.SettleRequest\x1a\x14.hold.SettleResponse"\x00\x12\x35\n\x06\x43\x61ncel\x12\x13.hold.CancelRequest\x1a\x14.hold.CancelResponse"\x00\x12\x34\n\x05Track\x12\x12.hold.TrackRequest\x1a\x13.hold.TrackResponse"\x00\x30\x01\x12=\n\x08TrackAll\x12\x15.hold.TrackAllRequest\x1a\x16.hold.TrackAllResponse"\x00\x30\x01\x62\x06proto3' + b'\n\nhold.proto\x12\x04hold"\x10\n\x0eGetInfoRequest""\n\x0fGetInfoResponse\x12\x0f\n\x07version\x18\x01 \x01(\t"\xed\x01\n\x0eInvoiceRequest\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12\x13\n\x0b\x61mount_msat\x18\x02 \x01(\x04\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06\x65xpiry\x18\x04 \x01(\x04H\x01\x88\x01\x01\x12"\n\x15min_final_cltv_expiry\x18\x05 \x01(\x04H\x02\x88\x01\x01\x12(\n\rrouting_hints\x18\x06 \x03(\x0b\x32\x11.hold.RoutingHintB\x0e\n\x0c_descriptionB\t\n\x07_expiryB\x18\n\x16_min_final_cltv_expiry"!\n\x0fInvoiceResponse\x12\x0e\n\x06\x62olt11\x18\x01 \x01(\t"#\n\x13RoutingHintsRequest\x12\x0c\n\x04node\x18\x01 \x01(\t"q\n\x03Hop\x12\x12\n\npublic_key\x18\x01 \x01(\t\x12\x18\n\x10short_channel_id\x18\x02 \x01(\t\x12\x10\n\x08\x62\x61se_fee\x18\x03 \x01(\x04\x12\x0f\n\x07ppm_fee\x18\x04 \x01(\x04\x12\x19\n\x11\x63ltv_expiry_delta\x18\x05 \x01(\x04"&\n\x0bRoutingHint\x12\x17\n\x04hops\x18\x01 \x03(\x0b\x32\t.hold.Hop"8\n\x14RoutingHintsResponse\x12 \n\x05hints\x18\x01 \x03(\x0b\x32\x11.hold.RoutingHint"9\n\x0bListRequest\x12\x19\n\x0cpayment_hash\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_payment_hash"K\n\x04Htlc\x12\x1e\n\x05state\x18\x01 \x01(\x0e\x32\x0f.hold.HtlcState\x12\x0c\n\x04msat\x18\x02 \x01(\x04\x12\x15\n\rcreation_time\x18\x03 \x01(\x04"\xa1\x01\n\x07Invoice\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12\x1d\n\x10payment_preimage\x18\x02 \x01(\tH\x00\x88\x01\x01\x12!\n\x05state\x18\x03 \x01(\x0e\x32\x12.hold.InvoiceState\x12\x0e\n\x06\x62olt11\x18\x04 \x01(\t\x12\x19\n\x05htlcs\x18\x05 \x03(\x0b\x32\n.hold.HtlcB\x13\n\x11_payment_preimage"/\n\x0cListResponse\x12\x1f\n\x08invoices\x18\x01 \x03(\x0b\x32\r.hold.Invoice")\n\rSettleRequest\x12\x18\n\x10payment_preimage\x18\x01 \x01(\t"\x10\n\x0eSettleResponse"%\n\rCancelRequest\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t"\x10\n\x0e\x43\x61ncelResponse"$\n\x0cTrackRequest\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t"2\n\rTrackResponse\x12!\n\x05state\x18\x01 \x01(\x0e\x32\x12.hold.InvoiceState"\x11\n\x0fTrackAllRequest"[\n\x10TrackAllResponse\x12\x14\n\x0cpayment_hash\x18\x01 \x01(\t\x12\x0e\n\x06\x62olt11\x18\x02 \x01(\t\x12!\n\x05state\x18\x03 \x01(\x0e\x32\x12.hold.InvoiceState*a\n\x0cInvoiceState\x12\x12\n\x0eINVOICE_UNPAID\x10\x00\x12\x14\n\x10INVOICE_ACCEPTED\x10\x01\x12\x10\n\x0cINVOICE_PAID\x10\x02\x12\x15\n\x11INVOICE_CANCELLED\x10\x03*D\n\tHtlcState\x12\x11\n\rHTLC_ACCEPTED\x10\x00\x12\x10\n\x0cHTLC_SETTLED\x10\x01\x12\x12\n\x0eHTLC_CANCELLED\x10\x02\x32\xd7\x03\n\x04Hold\x12\x38\n\x07GetInfo\x12\x14.hold.GetInfoRequest\x1a\x15.hold.GetInfoResponse"\x00\x12\x38\n\x07Invoice\x12\x14.hold.InvoiceRequest\x1a\x15.hold.InvoiceResponse"\x00\x12G\n\x0cRoutingHints\x12\x19.hold.RoutingHintsRequest\x1a\x1a.hold.RoutingHintsResponse"\x00\x12/\n\x04List\x12\x11.hold.ListRequest\x1a\x12.hold.ListResponse"\x00\x12\x35\n\x06Settle\x12\x13.hold.SettleRequest\x1a\x14.hold.SettleResponse"\x00\x12\x35\n\x06\x43\x61ncel\x12\x13.hold.CancelRequest\x1a\x14.hold.CancelResponse"\x00\x12\x34\n\x05Track\x12\x12.hold.TrackRequest\x1a\x13.hold.TrackResponse"\x00\x30\x01\x12=\n\x08TrackAll\x12\x15.hold.TrackAllRequest\x1a\x16.hold.TrackAllResponse"\x00\x30\x01\x62\x06proto3' ) _globals = globals() @@ -21,42 +21,50 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "hold_pb2", _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _globals["_INVOICESTATE"]._serialized_start = 1094 - _globals["_INVOICESTATE"]._serialized_end = 1187 - _globals["_INVOICEREQUEST"]._serialized_start = 21 - _globals["_INVOICEREQUEST"]._serialized_end = 258 - _globals["_INVOICERESPONSE"]._serialized_start = 260 - _globals["_INVOICERESPONSE"]._serialized_end = 293 - _globals["_ROUTINGHINTSREQUEST"]._serialized_start = 295 - _globals["_ROUTINGHINTSREQUEST"]._serialized_end = 330 - _globals["_HOP"]._serialized_start = 332 - _globals["_HOP"]._serialized_end = 445 - _globals["_ROUTINGHINT"]._serialized_start = 447 - _globals["_ROUTINGHINT"]._serialized_end = 485 - _globals["_ROUTINGHINTSRESPONSE"]._serialized_start = 487 - _globals["_ROUTINGHINTSRESPONSE"]._serialized_end = 543 - _globals["_LISTREQUEST"]._serialized_start = 545 - _globals["_LISTREQUEST"]._serialized_end = 602 - _globals["_INVOICE"]._serialized_start = 605 - _globals["_INVOICE"]._serialized_end = 739 - _globals["_LISTRESPONSE"]._serialized_start = 741 - _globals["_LISTRESPONSE"]._serialized_end = 788 - _globals["_SETTLEREQUEST"]._serialized_start = 790 - _globals["_SETTLEREQUEST"]._serialized_end = 831 - _globals["_SETTLERESPONSE"]._serialized_start = 833 - _globals["_SETTLERESPONSE"]._serialized_end = 849 - _globals["_CANCELREQUEST"]._serialized_start = 851 - _globals["_CANCELREQUEST"]._serialized_end = 888 - _globals["_CANCELRESPONSE"]._serialized_start = 890 - _globals["_CANCELRESPONSE"]._serialized_end = 906 - _globals["_TRACKREQUEST"]._serialized_start = 908 - _globals["_TRACKREQUEST"]._serialized_end = 944 - _globals["_TRACKRESPONSE"]._serialized_start = 946 - _globals["_TRACKRESPONSE"]._serialized_end = 996 - _globals["_TRACKALLREQUEST"]._serialized_start = 998 - _globals["_TRACKALLREQUEST"]._serialized_end = 1015 - _globals["_TRACKALLRESPONSE"]._serialized_start = 1017 - _globals["_TRACKALLRESPONSE"]._serialized_end = 1092 - _globals["_HOLD"]._serialized_start = 1190 - _globals["_HOLD"]._serialized_end = 1603 + _globals["_INVOICESTATE"]._serialized_start = 1268 + _globals["_INVOICESTATE"]._serialized_end = 1365 + _globals["_HTLCSTATE"]._serialized_start = 1367 + _globals["_HTLCSTATE"]._serialized_end = 1435 + _globals["_GETINFOREQUEST"]._serialized_start = 20 + _globals["_GETINFOREQUEST"]._serialized_end = 36 + _globals["_GETINFORESPONSE"]._serialized_start = 38 + _globals["_GETINFORESPONSE"]._serialized_end = 72 + _globals["_INVOICEREQUEST"]._serialized_start = 75 + _globals["_INVOICEREQUEST"]._serialized_end = 312 + _globals["_INVOICERESPONSE"]._serialized_start = 314 + _globals["_INVOICERESPONSE"]._serialized_end = 347 + _globals["_ROUTINGHINTSREQUEST"]._serialized_start = 349 + _globals["_ROUTINGHINTSREQUEST"]._serialized_end = 384 + _globals["_HOP"]._serialized_start = 386 + _globals["_HOP"]._serialized_end = 499 + _globals["_ROUTINGHINT"]._serialized_start = 501 + _globals["_ROUTINGHINT"]._serialized_end = 539 + _globals["_ROUTINGHINTSRESPONSE"]._serialized_start = 541 + _globals["_ROUTINGHINTSRESPONSE"]._serialized_end = 597 + _globals["_LISTREQUEST"]._serialized_start = 599 + _globals["_LISTREQUEST"]._serialized_end = 656 + _globals["_HTLC"]._serialized_start = 658 + _globals["_HTLC"]._serialized_end = 733 + _globals["_INVOICE"]._serialized_start = 736 + _globals["_INVOICE"]._serialized_end = 897 + _globals["_LISTRESPONSE"]._serialized_start = 899 + _globals["_LISTRESPONSE"]._serialized_end = 946 + _globals["_SETTLEREQUEST"]._serialized_start = 948 + _globals["_SETTLEREQUEST"]._serialized_end = 989 + _globals["_SETTLERESPONSE"]._serialized_start = 991 + _globals["_SETTLERESPONSE"]._serialized_end = 1007 + _globals["_CANCELREQUEST"]._serialized_start = 1009 + _globals["_CANCELREQUEST"]._serialized_end = 1046 + _globals["_CANCELRESPONSE"]._serialized_start = 1048 + _globals["_CANCELRESPONSE"]._serialized_end = 1064 + _globals["_TRACKREQUEST"]._serialized_start = 1066 + _globals["_TRACKREQUEST"]._serialized_end = 1102 + _globals["_TRACKRESPONSE"]._serialized_start = 1104 + _globals["_TRACKRESPONSE"]._serialized_end = 1154 + _globals["_TRACKALLREQUEST"]._serialized_start = 1156 + _globals["_TRACKALLREQUEST"]._serialized_end = 1173 + _globals["_TRACKALLRESPONSE"]._serialized_start = 1175 + _globals["_TRACKALLRESPONSE"]._serialized_end = 1266 + _globals["_HOLD"]._serialized_start = 1438 + _globals["_HOLD"]._serialized_end = 1909 # @@protoc_insertion_point(module_scope) diff --git a/tools/hold/protos/hold_pb2.pyi b/tools/hold/protos/hold_pb2.pyi index bb25cfc1d..a52d26034 100644 --- a/tools/hold/protos/hold_pb2.pyi +++ b/tools/hold/protos/hold_pb2.pyi @@ -14,15 +14,34 @@ DESCRIPTOR: _descriptor.FileDescriptor class InvoiceState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): __slots__ = [] - InvoiceUnpaid: _ClassVar[InvoiceState] - InvoiceAccepted: _ClassVar[InvoiceState] - InvoicePaid: _ClassVar[InvoiceState] - InvoiceCancelled: _ClassVar[InvoiceState] + INVOICE_UNPAID: _ClassVar[InvoiceState] + INVOICE_ACCEPTED: _ClassVar[InvoiceState] + INVOICE_PAID: _ClassVar[InvoiceState] + INVOICE_CANCELLED: _ClassVar[InvoiceState] -InvoiceUnpaid: InvoiceState -InvoiceAccepted: InvoiceState -InvoicePaid: InvoiceState -InvoiceCancelled: InvoiceState +class HtlcState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + HTLC_ACCEPTED: _ClassVar[HtlcState] + HTLC_SETTLED: _ClassVar[HtlcState] + HTLC_CANCELLED: _ClassVar[HtlcState] + +INVOICE_UNPAID: InvoiceState +INVOICE_ACCEPTED: InvoiceState +INVOICE_PAID: InvoiceState +INVOICE_CANCELLED: InvoiceState +HTLC_ACCEPTED: HtlcState +HTLC_SETTLED: HtlcState +HTLC_CANCELLED: HtlcState + +class GetInfoRequest(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + +class GetInfoResponse(_message.Message): + __slots__ = ["version"] + VERSION_FIELD_NUMBER: _ClassVar[int] + version: str + def __init__(self, version: _Optional[str] = ...) -> None: ... class InvoiceRequest(_message.Message): __slots__ = [ @@ -116,22 +135,40 @@ class ListRequest(_message.Message): payment_hash: str def __init__(self, payment_hash: _Optional[str] = ...) -> None: ... +class Htlc(_message.Message): + __slots__ = ["state", "msat", "creation_time"] + STATE_FIELD_NUMBER: _ClassVar[int] + MSAT_FIELD_NUMBER: _ClassVar[int] + CREATION_TIME_FIELD_NUMBER: _ClassVar[int] + state: HtlcState + msat: int + creation_time: int + def __init__( + self, + state: _Optional[_Union[HtlcState, str]] = ..., + msat: _Optional[int] = ..., + creation_time: _Optional[int] = ..., + ) -> None: ... + class Invoice(_message.Message): - __slots__ = ["payment_hash", "payment_preimage", "state", "bolt11"] + __slots__ = ["payment_hash", "payment_preimage", "state", "bolt11", "htlcs"] PAYMENT_HASH_FIELD_NUMBER: _ClassVar[int] PAYMENT_PREIMAGE_FIELD_NUMBER: _ClassVar[int] STATE_FIELD_NUMBER: _ClassVar[int] BOLT11_FIELD_NUMBER: _ClassVar[int] + HTLCS_FIELD_NUMBER: _ClassVar[int] payment_hash: str payment_preimage: str state: InvoiceState bolt11: str + htlcs: _containers.RepeatedCompositeFieldContainer[Htlc] def __init__( self, payment_hash: _Optional[str] = ..., payment_preimage: _Optional[str] = ..., state: _Optional[_Union[InvoiceState, str]] = ..., bolt11: _Optional[str] = ..., + htlcs: _Optional[_Iterable[_Union[Htlc, _Mapping]]] = ..., ) -> None: ... class ListResponse(_message.Message): @@ -179,13 +216,16 @@ class TrackAllRequest(_message.Message): def __init__(self) -> None: ... class TrackAllResponse(_message.Message): - __slots__ = ["payment_hash", "state"] + __slots__ = ["payment_hash", "bolt11", "state"] PAYMENT_HASH_FIELD_NUMBER: _ClassVar[int] + BOLT11_FIELD_NUMBER: _ClassVar[int] STATE_FIELD_NUMBER: _ClassVar[int] payment_hash: str + bolt11: str state: InvoiceState def __init__( self, payment_hash: _Optional[str] = ..., + bolt11: _Optional[str] = ..., state: _Optional[_Union[InvoiceState, str]] = ..., ) -> None: ... diff --git a/tools/hold/protos/hold_pb2_grpc.py b/tools/hold/protos/hold_pb2_grpc.py index ab8c6ab63..ab49370eb 100644 --- a/tools/hold/protos/hold_pb2_grpc.py +++ b/tools/hold/protos/hold_pb2_grpc.py @@ -14,6 +14,11 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.GetInfo = channel.unary_unary( + "/hold.Hold/GetInfo", + request_serializer=hold__pb2.GetInfoRequest.SerializeToString, + response_deserializer=hold__pb2.GetInfoResponse.FromString, + ) self.Invoice = channel.unary_unary( "/hold.Hold/Invoice", request_serializer=hold__pb2.InvoiceRequest.SerializeToString, @@ -54,6 +59,12 @@ def __init__(self, channel): class HoldServicer(object): """Missing associated documentation comment in .proto file.""" + def GetInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def Invoice(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -99,6 +110,11 @@ def TrackAll(self, request, context): def add_HoldServicer_to_server(servicer, server): rpc_method_handlers = { + "GetInfo": grpc.unary_unary_rpc_method_handler( + servicer.GetInfo, + request_deserializer=hold__pb2.GetInfoRequest.FromString, + response_serializer=hold__pb2.GetInfoResponse.SerializeToString, + ), "Invoice": grpc.unary_unary_rpc_method_handler( servicer.Invoice, request_deserializer=hold__pb2.InvoiceRequest.FromString, @@ -145,6 +161,35 @@ def add_HoldServicer_to_server(servicer, server): class Hold(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def GetInfo( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/hold.Hold/GetInfo", + hold__pb2.GetInfoRequest.SerializeToString, + hold__pb2.GetInfoResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + @staticmethod def Invoice( request, diff --git a/tools/hold/server.py b/tools/hold/server.py index 09100285a..2deb4e798 100644 --- a/tools/hold/server.py +++ b/tools/hold/server.py @@ -5,12 +5,15 @@ from typing import TypeVar import grpc +from consts import VERSION from encoder import Defaults from enums import invoice_state_final from grpc_interceptor import ServerInterceptor from protos.hold_pb2 import ( CancelRequest, CancelResponse, + GetInfoRequest, + GetInfoResponse, InvoiceRequest, InvoiceResponse, ListRequest, @@ -52,6 +55,11 @@ def __init__(self, plugin: Plugin, hold: Hold) -> None: self._plugin = plugin self._hold = hold + def GetInfo( # noqa: N802 + self, request: GetInfoRequest, context: grpc.ServicerContext # noqa: ARG002 + ) -> GetInfoResponse: + return GetInfoResponse(version=VERSION) + def Invoice( # noqa: N802 self, request: InvoiceRequest, context: grpc.ServicerContext # noqa: ARG002 ) -> InvoiceResponse: @@ -110,7 +118,7 @@ def Track( # noqa: N802 self._hold.tracker.stop_tracking(request.payment_hash, queue) raise NoSuchInvoiceError # noqa: TRY301 - yield TrackResponse(state=INVOICE_STATE_TO_GRPC[invoices[0].state]) + yield TrackResponse(state=INVOICE_STATE_TO_GRPC[invoices[0].invoice.state]) while context.is_active(): state = queue.get() @@ -135,6 +143,7 @@ def TrackAll( # noqa: N802 ev = queue.get(block=True, timeout=1) yield TrackAllResponse( payment_hash=ev.payment_hash, + bolt11=ev.bolt11, state=INVOICE_STATE_TO_GRPC[ev.update], ) except Empty: # noqa: PERF203 diff --git a/tools/hold/settler.py b/tools/hold/settler.py index f6db464d5..5e8779129 100644 --- a/tools/hold/settler.py +++ b/tools/hold/settler.py @@ -20,6 +20,15 @@ class Htlc: request: Request creation_time: datetime + def to_dict(self) -> object: + self_without_request = { + k: v for k, v in self.__dict__.items() if not isinstance(v, Request) + } + return { + k: int(v.timestamp()) if isinstance(v, datetime) else v + for k, v in self_without_request.items() + } + # TODO: save information about HTLCs class Htlcs: diff --git a/tools/hold/test_grpc.py b/tools/hold/test_grpc.py index 6898c8add..9a1b04018 100644 --- a/tools/hold/test_grpc.py +++ b/tools/hold/test_grpc.py @@ -5,19 +5,21 @@ import grpc import pytest -from consts import GRPC_PORT +from consts import GRPC_PORT, VERSION from encoder import Defaults # noinspection PyProtectedMember from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous from protos.hold_pb2 import ( + INVOICE_ACCEPTED, + INVOICE_CANCELLED, + INVOICE_PAID, + INVOICE_UNPAID, CancelRequest, - InvoiceAccepted, - InvoiceCancelled, - InvoicePaid, + GetInfoRequest, + GetInfoResponse, InvoiceRequest, InvoiceState, - InvoiceUnpaid, ListRequest, RoutingHintsRequest, RoutingHintsResponse, @@ -68,6 +70,10 @@ def cl(self) -> HoldStub: cln_con("dev-wipeholdinvoices") stop_plugin(cln_con) + def test_get_info(self, cl: HoldStub) -> None: + res: GetInfoResponse = cl.GetInfo(GetInfoRequest()) + assert res.version == VERSION + def test_invoice(self, cl: HoldStub) -> None: amount = 10_000 payment_hash = random.randbytes(32).hex() @@ -247,7 +253,7 @@ def test_settle_accepted(self, cl: HoldStub) -> None: assert ( cl.List(ListRequest(payment_hash=payment_hash)).invoices[0].state - == InvoiceAccepted + == INVOICE_ACCEPTED ) cl.Settle(SettleRequest(payment_preimage=payment_preimage)) @@ -257,7 +263,7 @@ def test_settle_accepted(self, cl: HoldStub) -> None: assert ( cl.List(ListRequest(payment_hash=payment_hash)).invoices[0].state - == InvoicePaid + == INVOICE_PAID ) def test_settle_unpaid(self, cl: HoldStub) -> None: @@ -287,7 +293,7 @@ def test_cancel_unpaid(self, cl: HoldStub) -> None: assert ( cl.List(ListRequest(payment_hash=payment_hash)).invoices[0].state - == InvoiceCancelled + == INVOICE_CANCELLED ) def test_cancel_non_existent(self, cl: HoldStub) -> None: @@ -327,7 +333,7 @@ def track_states() -> list[InvoiceState]: cl.Settle(SettleRequest(payment_preimage=payment_preimage)) pay.join() - assert fut.result() == [InvoiceUnpaid, InvoiceAccepted, InvoicePaid] + assert fut.result() == [INVOICE_UNPAID, INVOICE_ACCEPTED, INVOICE_PAID] def test_track_cancel(self, cl: HoldStub) -> None: _, payment_hash, invoice = add_hold_invoice(cl) @@ -348,7 +354,7 @@ def track_states() -> list[InvoiceState]: cl.Cancel(CancelRequest(payment_hash=payment_hash)) pay.join() - assert fut.result() == [InvoiceUnpaid, InvoiceAccepted, InvoiceCancelled] + assert fut.result() == [INVOICE_UNPAID, INVOICE_ACCEPTED, INVOICE_CANCELLED] def test_track_multiple(self, cl: HoldStub) -> None: _, payment_hash, invoice = add_hold_invoice(cl) @@ -370,7 +376,7 @@ def track_states() -> list[InvoiceState]: pay.join() for res in [fut.result() for fut in futs]: - assert res == [InvoiceUnpaid, InvoiceAccepted, InvoiceCancelled] + assert res == [INVOICE_UNPAID, INVOICE_ACCEPTED, INVOICE_CANCELLED] def test_track_cancelled_sub(self, cl: HoldStub) -> None: _, payment_hash, invoice = add_hold_invoice(cl) @@ -378,7 +384,7 @@ def test_track_cancelled_sub(self, cl: HoldStub) -> None: sub = cl.Track(TrackRequest(payment_hash=payment_hash)) for update in sub: - assert update.state == InvoiceUnpaid + assert update.state == INVOICE_UNPAID break assert sub.cancel() @@ -393,7 +399,7 @@ def test_track_cancelled_sub(self, cl: HoldStub) -> None: # Make sure the plugin is still alive invoice_res = cl.List(ListRequest(payment_hash=payment_hash)).invoices[0] assert invoice_res.bolt11 == invoice - assert invoice_res.state == InvoiceCancelled + assert invoice_res.state == INVOICE_CANCELLED def test_track_multiple_cancelled_sub(self, cl: HoldStub) -> None: _, payment_hash, invoice = add_hold_invoice(cl) @@ -426,18 +432,18 @@ def track_states(cancel: bool) -> list[InvoiceState]: pay.join() res = [fut.result() for fut in futs] - assert res[0] == [InvoiceUnpaid] - assert res[1] == [InvoiceUnpaid, InvoiceAccepted, InvoiceCancelled] + assert res[0] == [INVOICE_UNPAID] + assert res[1] == [INVOICE_UNPAID, INVOICE_ACCEPTED, INVOICE_CANCELLED] def test_track_all(self, cl: HoldStub) -> None: expected_events = 6 - def track_states() -> list[tuple[str, str]]: + def track_states() -> list[tuple[str, str, str]]: evs = [] sub = cl.TrackAll(TrackAllRequest()) for ev in sub: - evs.append((ev.payment_hash, ev.state)) + evs.append((ev.payment_hash, ev.bolt11, ev.state)) if len(evs) == expected_events: sub.cancel() break @@ -447,8 +453,8 @@ def track_states() -> list[tuple[str, str]]: with concurrent.futures.ThreadPoolExecutor() as pool: fut = pool.submit(track_states) - _, payment_hash_created, _ = add_hold_invoice(cl) - _, payment_hash_cancelled, _ = add_hold_invoice(cl) + _, payment_hash_created, invoice_created = add_hold_invoice(cl) + _, payment_hash_cancelled, invoice_cancelled = add_hold_invoice(cl) ( payment_preimage_settled, payment_hash_settled, @@ -467,10 +473,10 @@ def track_states() -> list[tuple[str, str]]: res = fut.result() assert len(res) == expected_events assert res == [ - (payment_hash_created, InvoiceUnpaid), - (payment_hash_cancelled, InvoiceUnpaid), - (payment_hash_settled, InvoiceUnpaid), - (payment_hash_cancelled, InvoiceCancelled), - (payment_hash_settled, InvoiceAccepted), - (payment_hash_settled, InvoicePaid), + (payment_hash_created, invoice_created, INVOICE_UNPAID), + (payment_hash_cancelled, invoice_cancelled, INVOICE_UNPAID), + (payment_hash_settled, invoice_settled, INVOICE_UNPAID), + (payment_hash_cancelled, invoice_cancelled, INVOICE_CANCELLED), + (payment_hash_settled, invoice_settled, INVOICE_ACCEPTED), + (payment_hash_settled, invoice_settled, INVOICE_PAID), ] diff --git a/tools/hold/test_tracker.py b/tools/hold/test_tracker.py index ef3c7cdca..27554fc31 100644 --- a/tools/hold/test_tracker.py +++ b/tools/hold/test_tracker.py @@ -48,7 +48,7 @@ def test_stop_tracking(self) -> None: def test_send_update_no_queues(self) -> None: payment_hash = random.randbytes(32).hex() track = Tracker() - track.send_update(payment_hash, InvoiceState.Paid) + track.send_update(payment_hash, "invoice", InvoiceState.Paid) def test_send_update_queue(self) -> None: payment_hash = random.randbytes(32).hex() @@ -56,7 +56,7 @@ def test_send_update_queue(self) -> None: q = track.track(payment_hash) update = InvoiceState.Accepted - track.send_update(payment_hash, update) + track.send_update(payment_hash, "invoice", update) assert q.get() == update @@ -67,7 +67,7 @@ def test_send_update_queues(self) -> None: q2 = track.track(payment_hash) update = InvoiceState.Accepted - track.send_update(payment_hash, update) + track.send_update(payment_hash, "invoice", update) assert q1.get() == update assert q2.get() == update @@ -95,12 +95,14 @@ def test_send_update_all(self) -> None: track = Tracker() q = track.track_all() + invoice = "lnbc" update = InvoiceState.Accepted - track.send_update(payment_hash, update) + track.send_update(payment_hash, invoice, update) - assert q.get() == InvoiceUpdate(payment_hash, update) + assert q.get() == InvoiceUpdate(payment_hash, invoice, update) def test_send_update_single_all(self) -> None: + invoice = "lnbcrt" payment_hash = random.randbytes(32).hex() track = Tracker() @@ -108,7 +110,7 @@ def test_send_update_single_all(self) -> None: q_all = track.track_all() update = InvoiceState.Accepted - track.send_update(payment_hash, update) + track.send_update(payment_hash, invoice, update) assert q.get() == update - assert q_all.get() == InvoiceUpdate(payment_hash, update) + assert q_all.get() == InvoiceUpdate(payment_hash, invoice, update) diff --git a/tools/hold/tracker.py b/tools/hold/tracker.py index 5eacd9b58..da3296e55 100644 --- a/tools/hold/tracker.py +++ b/tools/hold/tracker.py @@ -9,6 +9,7 @@ @dataclass(frozen=True) class InvoiceUpdate: payment_hash: str + bolt11: str update: InvoiceState @@ -48,14 +49,14 @@ def __init__(self) -> None: self._all_fwds = MultiForward() self._lock = threading.Lock() - def send_update(self, payment_hash: str, update: InvoiceState) -> None: + def send_update(self, payment_hash: str, bolt11: str, update: InvoiceState) -> None: with self._lock: fwd = self._fwds.get(payment_hash) if fwd is not None: fwd.send_update(update) self._all_fwds.send_update( - InvoiceUpdate(payment_hash=payment_hash, update=update) + InvoiceUpdate(payment_hash=payment_hash, bolt11=bolt11, update=update) ) def track(self, payment_hash: str) -> SimpleQueue[InvoiceState]: diff --git a/tools/hold/transformers.py b/tools/hold/transformers.py index 89f782ddf..e51cb4a45 100644 --- a/tools/hold/transformers.py +++ b/tools/hold/transformers.py @@ -1,34 +1,49 @@ from typing import Any from bolt11.models.routehint import Route, RouteHint -from invoice import HoldInvoice, InvoiceState +from datastore import HoldInvoiceHtlcs +from invoice import InvoiceState from protos.hold_pb2 import ( + INVOICE_ACCEPTED, + INVOICE_CANCELLED, + INVOICE_PAID, + INVOICE_UNPAID, Hop, + HtlcState, Invoice, - InvoiceAccepted, - InvoiceCancelled, - InvoicePaid, - InvoiceUnpaid, RoutingHint, RoutingHintsResponse, ) +from protos.hold_pb2 import ( + Htlc as HtlcGrpc, +) +from settler import Htlc INVOICE_STATE_TO_GRPC = { - InvoiceState.Paid: InvoicePaid, - InvoiceState.Unpaid: InvoiceUnpaid, - InvoiceState.Accepted: InvoiceAccepted, - InvoiceState.Cancelled: InvoiceCancelled, + InvoiceState.Paid: INVOICE_PAID, + InvoiceState.Unpaid: INVOICE_UNPAID, + InvoiceState.Accepted: INVOICE_ACCEPTED, + InvoiceState.Cancelled: INVOICE_CANCELLED, } class Transformers: @staticmethod - def invoice_to_grpc(invoice: HoldInvoice) -> Invoice: + def invoice_to_grpc(invoice: HoldInvoiceHtlcs) -> Invoice: return Invoice( - payment_hash=invoice.payment_hash, - payment_preimage=invoice.payment_preimage, - state=INVOICE_STATE_TO_GRPC[invoice.state], - bolt11=invoice.bolt11, + payment_hash=invoice.invoice.payment_hash, + payment_preimage=invoice.invoice.payment_preimage, + state=INVOICE_STATE_TO_GRPC[invoice.invoice.state], + bolt11=invoice.invoice.bolt11, + htlcs=[Transformers.htlc_to_grpc(htlc) for htlc in invoice.htlcs], + ) + + @staticmethod + def htlc_to_grpc(htlc: Htlc) -> HtlcGrpc: + return HtlcGrpc( + state=HtlcState.HTLC_ACCEPTED, + msat=htlc.msat, + creation_time=int(htlc.creation_time.timestamp()), ) @staticmethod diff --git a/tools/poetry.lock b/tools/poetry.lock index 6b52908d6..16b9314cb 100644 --- a/tools/poetry.lock +++ b/tools/poetry.lock @@ -95,13 +95,13 @@ uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "bolt11" -version = "2.0.0" +version = "2.0.1" description = "A library for encoding and decoding BOLT11 payment requests." optional = false python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "bolt11-2.0.0-py3-none-any.whl", hash = "sha256:4e89d59c905b4861d152b700f13257403118c0a898263fc906b4c3684850b988"}, - {file = "bolt11-2.0.0.tar.gz", hash = "sha256:a5a4fef41873c469a8c376bd38cf569e1274c8b6d0f52ca443b35c955224903c"}, + {file = "bolt11-2.0.1-py3-none-any.whl", hash = "sha256:7a4d3a9844fdf654dd6f29cba6d3b365963cd766ab9c2d1b7cac402184bf2737"}, + {file = "bolt11-2.0.1.tar.gz", hash = "sha256:6a05a2cf83838cadc5de046d790af4e1bac7d06bd37e6920f8e2d68e5c706a28"}, ] [package.dependencies] @@ -284,13 +284,13 @@ files = [ [[package]] name = "click" -version = "8.1.6" +version = "8.1.7" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, - {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, ] [package.dependencies] @@ -427,13 +427,13 @@ gmpy2 = ["gmpy2"] [[package]] name = "exceptiongroup" -version = "1.1.2" +version = "1.1.3" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, - {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, + {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, + {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, ] [package.extras] @@ -458,13 +458,13 @@ dev = ["flake8", "markdown", "twine", "wheel"] [[package]] name = "grpc-interceptor" -version = "0.15.2" +version = "0.15.3" description = "Simplifies gRPC interceptors" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "grpc-interceptor-0.15.2.tar.gz", hash = "sha256:5c984110af4fb77d03472ec0468f9c77ddaf798e190410fb7b7f1e76c60c96a4"}, - {file = "grpc_interceptor-0.15.2-py3-none-any.whl", hash = "sha256:596dac3cb709ffb6178a4873f5148e254c871c9069f0b11040189b257969490a"}, + {file = "grpc-interceptor-0.15.3.tar.gz", hash = "sha256:33592cb9d8c00fceed5755c71029f75aef55b273496dbced06f1d48f2571fcc3"}, + {file = "grpc_interceptor-0.15.3-py3-none-any.whl", hash = "sha256:96be2043b7e49f9deb444f18b61c373ea28d22d81c90cd3b82127a4744eb9247"}, ] [package.dependencies] @@ -1209,18 +1209,18 @@ cffi = ">=1.3.0" [[package]] name = "setuptools" -version = "68.0.0" +version = "68.1.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, - {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, + {file = "setuptools-68.1.2-py3-none-any.whl", hash = "sha256:3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b"}, + {file = "setuptools-68.1.2.tar.gz", hash = "sha256:3d4dfa6d95f1b101d695a6160a7626e15583af71a5f52176efa5d39a054d475d"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5,<=7.1.2)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -1333,4 +1333,4 @@ requests = "*" [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "ae8bd971fea3b29573f7026c35fa896b51800183874982c7375facf78e13384a" +content-hash = "c978b163ce6a3d1635545cedf38ff81c450c5f6fc7b7282d0560baef111d43d2" diff --git a/tools/pyproject.toml b/tools/pyproject.toml index c7cbadd95..9abcc1952 100644 --- a/tools/pyproject.toml +++ b/tools/pyproject.toml @@ -14,7 +14,7 @@ mkdocs = "^1.4.2" pyln-client = "^23.5" webdavclient3 = "^3.14.6" pytest = "^7.4.0" -bolt11 = "^2.0.0" +bolt11 = "^2.0.1" black = "^23.7.0" grpcio = "^1.57.0" grpcio-tools = "^1.57.0"