From dc80c677176e29d2d5ff0992b7441d190b8744f4 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 20:31:33 -0400 Subject: [PATCH 01/10] deps: update big.js to v6.1.1 --- app/package.json | 4 ++-- app/yarn.lock | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/package.json b/app/package.json index 79512f48..06d52bc5 100644 --- a/app/package.json +++ b/app/package.json @@ -20,7 +20,7 @@ "@emotion/react": "11.4.0", "@emotion/styled": "11.3.0", "@improbable-eng/grpc-web": "0.14.0", - "big.js": "5.2.2", + "big.js": "6.1.1", "bootstrap": "4.5.0", "copy-to-clipboard": "3.3.1", "d3": "6.3.1", @@ -58,7 +58,7 @@ "@testing-library/jest-dom": "5.11.5", "@testing-library/react": "11.1.1", "@testing-library/user-event": "12.2.0", - "@types/big.js": "4.0.5", + "@types/big.js": "6.1.1", "@types/d3": "6.2.0", "@types/debug": "4.1.5", "@types/file-saver": "2.0.1", diff --git a/app/yarn.lock b/app/yarn.lock index 821b2dc1..386e3d88 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -2738,10 +2738,10 @@ dependencies: "@babel/types" "^7.3.0" -"@types/big.js@4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-4.0.5.tgz#62c61697646269e39191f24e55e8272f05f21fc0" - integrity sha512-D9KFrAt05FDSqLo7PU9TDHfDgkarlwdkuwFsg7Zm4xl62tTNaz+zN+Tkcdx2wGLBbSMf8BnoMhOVeUGUaJfLKg== +"@types/big.js@6.1.1": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@types/big.js/-/big.js-6.1.1.tgz#c2be5e81e0cf0c1c31704e3b12f750712f647414" + integrity sha512-Zns+nT0hj96ie+GDbL5NeHxhL4wNz8QMxCHqBvxgc4x0hhgQ/o92rPwqxvPBhY3ZYnH8TJGw/8oCkjhOy2Rfzw== "@types/d3-array@*": version "3.0.1" @@ -4763,7 +4763,12 @@ bfj@^7.0.2: hoopy "^0.1.4" tryer "^1.0.1" -big.js@5.2.2, big.js@^5.2.2: +big.js@6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.1.1.tgz#63b35b19dc9775c94991ee5db7694880655d5537" + integrity sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg== + +big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== From 7092d1e15750481be821b524514c3d256d2ab67e Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 20:32:54 -0400 Subject: [PATCH 02/10] proto: update build-proto script and regenerate the TS files --- app/scripts/build-protos.js | 40 +- .../auctioneerrpc/auctioneer_pb.d.ts | 132 +- .../generated/auctioneerrpc/auctioneer_pb.js | 352 +- app/src/types/generated/lnd_pb.d.ts | 1154 +++---- app/src/types/generated/lnd_pb.js | 3062 ++++++++--------- app/src/types/generated/loop_pb.d.ts | 278 +- app/src/types/generated/loop_pb.js | 732 ++-- app/src/types/generated/trader_pb.d.ts | 228 +- app/src/types/generated/trader_pb.js | 606 ++-- proto/auctioneerrpc/auctioneer.proto | 46 +- proto/lnd.proto | 384 +-- proto/loop.proto | 92 +- proto/trader.proto | 76 +- 13 files changed, 3604 insertions(+), 3578 deletions(-) diff --git a/app/scripts/build-protos.js b/app/scripts/build-protos.js index a6a3b94e..4d656eb4 100644 --- a/app/scripts/build-protos.js +++ b/app/scripts/build-protos.js @@ -36,7 +36,9 @@ const protoSources = async () => { throw new Error(`go.mod did not match pattern ${POOL_VERSION_PATTERN}`); } - console.log(`Found lnd version ${lndVersion[1]} and loop version ${loopVersion[1]}.`); + console.log( + `Found:\n LND ${lndVersion[1]}\n Loop ${loopVersion[1]}\n Pool ${poolVersion[1]}`, + ); return { lnd: `lightningnetwork/lnd/${lndVersion[1]}/lnrpc/rpc.proto`, loop: `lightninglabs/loop/${loopVersion[1]}/looprpc/client.proto`, @@ -63,7 +65,7 @@ const download = async () => { for ([name, urlPath] of Object.entries(await protoSources())) { const url = `https://raw.githubusercontent.com/${urlPath}`; const filePath = join(appPath, '..', 'proto', `${name}.proto`); - mkdirSync(dirname(filePath), {recursive: true}); + mkdirSync(dirname(filePath), { recursive: true }); console.log(`${url}`); console.log(` -> ${filePath}`); const content = await new Promise((resolve, reject) => { @@ -78,6 +80,26 @@ const download = async () => { } }; +/** + * Adds "[jstype = JS_STRING]" to uint64 fields to indicate that they should be + * represented as strings to avoid Number overflow issues + */ +const sanitize = async () => { + const filePaths = Object.keys(filePatches).map(name => + join(appPath, '..', 'proto', `${name}.proto`), + ); + for (path of filePaths) { + let content = (await fs.readFile(path)).toString(); + content = content.replace(/^\s*(repeated)? u?int64 ((?!jstype).)*$/gm, match => { + // add the jstype descriptor + return /^.*];$/.test(match) + ? match.replace(/\s*];$/, `, jstype = JS_STRING];`) + : match.replace(/;$/, ` [jstype = JS_STRING];`); + }); + await fs.writeFile(path, content); + } +}; + /** * Executes the `protoc` compiler to convert *.proto files into TS & JS code */ @@ -117,11 +139,6 @@ const patch = async () => { console.log('\nPatching generated JS files'); for (const filename of Object.keys(filePatches)) { - const patch = [ - '/* eslint-disable */', - `var proto = { ${filePatches[filename]} };`, - '', - ].join('\n'); const path = join( appPath, 'src', @@ -132,7 +149,15 @@ const patch = async () => { console.log(` - ${path}`); let content = await fs.readFile(path); + + // apply the webpack patch + const patch = [ + '/* eslint-disable */', + `var proto = { ${filePatches[filename]} };`, + '', + ].join('\n'); content = `${patch}\n${content}`; + await fs.writeFile(path, content); } }; @@ -143,6 +168,7 @@ const patch = async () => { const main = async () => { try { await download(); + await sanitize(); await generate(); await patch(); } catch (error) { diff --git a/app/src/types/generated/auctioneerrpc/auctioneer_pb.d.ts b/app/src/types/generated/auctioneerrpc/auctioneer_pb.d.ts index 9b42a63c..011008de 100644 --- a/app/src/types/generated/auctioneerrpc/auctioneer_pb.d.ts +++ b/app/src/types/generated/auctioneerrpc/auctioneer_pb.d.ts @@ -4,8 +4,8 @@ import * as jspb from "google-protobuf"; export class ReserveAccountRequest extends jspb.Message { - getAccountValue(): number; - setAccountValue(value: number): void; + getAccountValue(): string; + setAccountValue(value: string): void; getAccountExpiry(): number; setAccountExpiry(value: number): void; @@ -27,7 +27,7 @@ export class ReserveAccountRequest extends jspb.Message { export namespace ReserveAccountRequest { export type AsObject = { - accountValue: number, + accountValue: string, accountExpiry: number, traderKey: Uint8Array | string, } @@ -72,8 +72,8 @@ export class ServerInitAccountRequest extends jspb.Message { getAccountScript_asB64(): string; setAccountScript(value: Uint8Array | string): void; - getAccountValue(): number; - setAccountValue(value: number): void; + getAccountValue(): string; + setAccountValue(value: string): void; getAccountExpiry(): number; setAccountExpiry(value: number): void; @@ -100,7 +100,7 @@ export namespace ServerInitAccountRequest { export type AsObject = { accountPoint?: OutPoint.AsObject, accountScript: Uint8Array | string, - accountValue: number, + accountValue: string, accountExpiry: number, traderKey: Uint8Array | string, userAgent: string, @@ -711,11 +711,11 @@ export class OrderMatchPrepare extends jspb.Message { getBatchTransaction_asB64(): string; setBatchTransaction(value: Uint8Array | string): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; - getFeeRebateSat(): number; - setFeeRebateSat(value: number): void; + getFeeRebateSat(): string; + setFeeRebateSat(value: string): void; getBatchId(): Uint8Array | string; getBatchId_asU8(): Uint8Array; @@ -744,8 +744,8 @@ export namespace OrderMatchPrepare { chargedAccountsList: Array, executionFee?: ExecutionFee.AsObject, batchTransaction: Uint8Array | string, - feeRateSatPerKw: number, - feeRebateSat: number, + feeRateSatPerKw: string, + feeRebateSat: string, batchId: Uint8Array | string, batchVersion: number, matchedMarketsMap: Array<[number, MatchedMarket.AsObject]>, @@ -852,8 +852,8 @@ export namespace SubscribeError { } export class AuctionAccount extends jspb.Message { - getValue(): number; - setValue(value: number): void; + getValue(): string; + setValue(value: string): void; getExpiry(): number; setExpiry(value: number): void; @@ -901,7 +901,7 @@ export class AuctionAccount extends jspb.Message { export namespace AuctionAccount { export type AsObject = { - value: number, + value: string, expiry: number, traderKey: Uint8Array | string, auctioneerKey: Uint8Array | string, @@ -994,8 +994,8 @@ export namespace MatchedBid { } export class AccountDiff extends jspb.Message { - getEndingBalance(): number; - setEndingBalance(value: number): void; + getEndingBalance(): string; + setEndingBalance(value: string): void; getEndingState(): AccountDiff.AccountStateMap[keyof AccountDiff.AccountStateMap]; setEndingState(value: AccountDiff.AccountStateMap[keyof AccountDiff.AccountStateMap]): void; @@ -1020,7 +1020,7 @@ export class AccountDiff extends jspb.Message { export namespace AccountDiff { export type AsObject = { - endingBalance: number, + endingBalance: string, endingState: AccountDiff.AccountStateMap[keyof AccountDiff.AccountStateMap], outpointIndex: number, traderKey: Uint8Array | string, @@ -1045,11 +1045,11 @@ export class ServerOrder extends jspb.Message { getRateFixed(): number; setRateFixed(value: number): void; - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; - getMinChanAmt(): number; - setMinChanAmt(value: number): void; + getMinChanAmt(): string; + setMinChanAmt(value: string): void; getOrderNonce(): Uint8Array | string; getOrderNonce_asU8(): Uint8Array; @@ -1079,8 +1079,8 @@ export class ServerOrder extends jspb.Message { getChanType(): number; setChanType(value: number): void; - getMaxBatchFeeRateSatPerKw(): number; - setMaxBatchFeeRateSatPerKw(value: number): void; + getMaxBatchFeeRateSatPerKw(): string; + setMaxBatchFeeRateSatPerKw(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ServerOrder.AsObject; @@ -1096,15 +1096,15 @@ export namespace ServerOrder { export type AsObject = { traderKey: Uint8Array | string, rateFixed: number, - amt: number, - minChanAmt: number, + amt: string, + minChanAmt: string, orderNonce: Uint8Array | string, orderSig: Uint8Array | string, multiSigKey: Uint8Array | string, nodePub: Uint8Array | string, nodeAddrList: Array, chanType: number, - maxBatchFeeRateSatPerKw: number, + maxBatchFeeRateSatPerKw: string, } } @@ -1123,8 +1123,8 @@ export class ServerBid extends jspb.Message { getMinNodeTier(): NodeTierMap[keyof NodeTierMap]; setMinNodeTier(value: NodeTierMap[keyof NodeTierMap]): void; - getSelfChanBalance(): number; - setSelfChanBalance(value: number): void; + getSelfChanBalance(): string; + setSelfChanBalance(value: string): void; getIsSidecarChannel(): boolean; setIsSidecarChannel(value: boolean): void; @@ -1145,7 +1145,7 @@ export namespace ServerBid { leaseDurationBlocks: number, version: number, minNodeTier: NodeTierMap[keyof NodeTierMap], - selfChanBalance: number, + selfChanBalance: string, isSidecarChannel: boolean, } } @@ -1267,8 +1267,8 @@ export namespace ServerInput { } export class ServerOutput extends jspb.Message { - getValue(): number; - setValue(value: number): void; + getValue(): string; + setValue(value: string): void; getScript(): Uint8Array | string; getScript_asU8(): Uint8Array; @@ -1287,7 +1287,7 @@ export class ServerOutput extends jspb.Message { export namespace ServerOutput { export type AsObject = { - value: number, + value: string, script: Uint8Array | string, } } @@ -1332,8 +1332,8 @@ export namespace ServerModifyAccountRequest { } export class NewAccountParameters extends jspb.Message { - getValue(): number; - setValue(value: number): void; + getValue(): string; + setValue(value: string): void; getExpiry(): number; setExpiry(value: number): void; @@ -1350,7 +1350,7 @@ export namespace ServerModifyAccountRequest { export namespace NewAccountParameters { export type AsObject = { - value: number, + value: string, expiry: number, } } @@ -1441,8 +1441,8 @@ export namespace TermsRequest { } export class TermsResponse extends jspb.Message { - getMaxAccountValue(): number; - setMaxAccountValue(value: number): void; + getMaxAccountValue(): string; + setMaxAccountValue(value: string): void; getMaxOrderDurationBlocks(): number; setMaxOrderDurationBlocks(value: number): void; @@ -1457,11 +1457,11 @@ export class TermsResponse extends jspb.Message { getNextBatchConfTarget(): number; setNextBatchConfTarget(value: number): void; - getNextBatchFeeRateSatPerKw(): number; - setNextBatchFeeRateSatPerKw(value: number): void; + getNextBatchFeeRateSatPerKw(): string; + setNextBatchFeeRateSatPerKw(value: string): void; - getNextBatchClearTimestamp(): number; - setNextBatchClearTimestamp(value: number): void; + getNextBatchClearTimestamp(): string; + setNextBatchClearTimestamp(value: string): void; getLeaseDurationBucketsMap(): jspb.Map; clearLeaseDurationBucketsMap(): void; @@ -1477,13 +1477,13 @@ export class TermsResponse extends jspb.Message { export namespace TermsResponse { export type AsObject = { - maxAccountValue: number, + maxAccountValue: string, maxOrderDurationBlocks: number, executionFee?: ExecutionFee.AsObject, leaseDurationsMap: Array<[number, boolean]>, nextBatchConfTarget: number, - nextBatchFeeRateSatPerKw: number, - nextBatchClearTimestamp: number, + nextBatchFeeRateSatPerKw: string, + nextBatchClearTimestamp: string, leaseDurationBucketsMap: Array<[number, DurationBucketStateMap[keyof DurationBucketStateMap]]>, } } @@ -1547,11 +1547,11 @@ export class RelevantBatch extends jspb.Message { getTransaction_asB64(): string; setTransaction(value: Uint8Array | string): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; - getCreationTimestampNs(): number; - setCreationTimestampNs(value: number): void; + getCreationTimestampNs(): string; + setCreationTimestampNs(value: string): void; getMatchedMarketsMap(): jspb.Map; clearMatchedMarketsMap(): void; @@ -1574,18 +1574,18 @@ export namespace RelevantBatch { clearingPriceRate: number, executionFee?: ExecutionFee.AsObject, transaction: Uint8Array | string, - feeRateSatPerKw: number, - creationTimestampNs: number, + feeRateSatPerKw: string, + creationTimestampNs: string, matchedMarketsMap: Array<[number, MatchedMarket.AsObject]>, } } export class ExecutionFee extends jspb.Message { - getBaseFee(): number; - setBaseFee(value: number): void; + getBaseFee(): string; + setBaseFee(value: string): void; - getFeeRate(): number; - setFeeRate(value: number): void; + getFeeRate(): string; + setFeeRate(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExecutionFee.AsObject; @@ -1599,8 +1599,8 @@ export class ExecutionFee extends jspb.Message { export namespace ExecutionFee { export type AsObject = { - baseFee: number, - feeRate: number, + baseFee: string, + feeRate: string, } } @@ -1732,8 +1732,8 @@ export class MatchedOrderSnapshot extends jspb.Message { getMatchingRate(): number; setMatchingRate(value: number): void; - getTotalSatsCleared(): number; - setTotalSatsCleared(value: number): void; + getTotalSatsCleared(): string; + setTotalSatsCleared(value: string): void; getUnitsMatched(): number; setUnitsMatched(value: number): void; @@ -1753,7 +1753,7 @@ export namespace MatchedOrderSnapshot { ask?: AskSnapshot.AsObject, bid?: BidSnapshot.AsObject, matchingRate: number, - totalSatsCleared: number, + totalSatsCleared: string, unitsMatched: number, } } @@ -1836,11 +1836,11 @@ export class BatchSnapshotResponse extends jspb.Message { getBatchTx_asB64(): string; setBatchTx(value: Uint8Array | string): void; - getBatchTxFeeRateSatPerKw(): number; - setBatchTxFeeRateSatPerKw(value: number): void; + getBatchTxFeeRateSatPerKw(): string; + setBatchTxFeeRateSatPerKw(value: string): void; - getCreationTimestampNs(): number; - setCreationTimestampNs(value: number): void; + getCreationTimestampNs(): string; + setCreationTimestampNs(value: string): void; getMatchedMarketsMap(): jspb.Map; clearMatchedMarketsMap(): void; @@ -1863,8 +1863,8 @@ export namespace BatchSnapshotResponse { matchedOrdersList: Array, batchTxId: string, batchTx: Uint8Array | string, - batchTxFeeRateSatPerKw: number, - creationTimestampNs: number, + batchTxFeeRateSatPerKw: string, + creationTimestampNs: string, matchedMarketsMap: Array<[number, MatchedMarketSnapshot.AsObject]>, } } diff --git a/app/src/types/generated/auctioneerrpc/auctioneer_pb.js b/app/src/types/generated/auctioneerrpc/auctioneer_pb.js index 11e00c4d..dbf39f74 100644 --- a/app/src/types/generated/auctioneerrpc/auctioneer_pb.js +++ b/app/src/types/generated/auctioneerrpc/auctioneer_pb.js @@ -135,7 +135,7 @@ proto.poolrpc.ReserveAccountRequest.prototype.toObject = function(opt_includeIns */ proto.poolrpc.ReserveAccountRequest.toObject = function(includeInstance, msg) { var f, obj = { - accountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + accountValue: jspb.Message.getFieldWithDefault(msg, 1, "0"), accountExpiry: jspb.Message.getFieldWithDefault(msg, 2, 0), traderKey: msg.getTraderKey_asB64() }; @@ -175,7 +175,7 @@ proto.poolrpc.ReserveAccountRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAccountValue(value); break; case 2: @@ -216,8 +216,8 @@ proto.poolrpc.ReserveAccountRequest.prototype.serializeBinary = function() { proto.poolrpc.ReserveAccountRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -241,16 +241,16 @@ proto.poolrpc.ReserveAccountRequest.serializeBinaryToWriter = function(message, /** * optional uint64 account_value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.ReserveAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ReserveAccountRequest.prototype.setAccountValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -574,7 +574,7 @@ proto.poolrpc.ServerInitAccountRequest.toObject = function(includeInstance, msg) var f, obj = { accountPoint: (f = msg.getAccountPoint()) && proto.poolrpc.OutPoint.toObject(includeInstance, f), accountScript: msg.getAccountScript_asB64(), - accountValue: jspb.Message.getFieldWithDefault(msg, 3, 0), + accountValue: jspb.Message.getFieldWithDefault(msg, 3, "0"), accountExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), traderKey: msg.getTraderKey_asB64(), userAgent: jspb.Message.getFieldWithDefault(msg, 6, "") @@ -624,7 +624,7 @@ proto.poolrpc.ServerInitAccountRequest.deserializeBinaryFromReader = function(ms msg.setAccountScript(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAccountValue(value); break; case 4: @@ -684,8 +684,8 @@ proto.poolrpc.ServerInitAccountRequest.serializeBinaryToWriter = function(messag ); } f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -785,16 +785,16 @@ proto.poolrpc.ServerInitAccountRequest.prototype.setAccountScript = function(val /** * optional uint64 account_value = 3; - * @return {number} + * @return {string} */ proto.poolrpc.ServerInitAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerInitAccountRequest.prototype.setAccountValue = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -5025,8 +5025,8 @@ proto.poolrpc.OrderMatchPrepare.toObject = function(includeInstance, msg) { proto.poolrpc.AccountDiff.toObject, includeInstance), executionFee: (f = msg.getExecutionFee()) && proto.poolrpc.ExecutionFee.toObject(includeInstance, f), batchTransaction: msg.getBatchTransaction_asB64(), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeRebateSat: jspb.Message.getFieldWithDefault(msg, 7, 0), + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, "0"), + feeRebateSat: jspb.Message.getFieldWithDefault(msg, 7, "0"), batchId: msg.getBatchId_asB64(), batchVersion: jspb.Message.getFieldWithDefault(msg, 9, 0), matchedMarketsMap: (f = msg.getMatchedMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedMarket.toObject) : [] @@ -5091,11 +5091,11 @@ proto.poolrpc.OrderMatchPrepare.deserializeBinaryFromReader = function(msg, read msg.setBatchTransaction(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRebateSat(value); break; case 8: @@ -5176,15 +5176,15 @@ proto.poolrpc.OrderMatchPrepare.serializeBinaryToWriter = function(message, writ ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getFeeRebateSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -5345,31 +5345,31 @@ proto.poolrpc.OrderMatchPrepare.prototype.setBatchTransaction = function(value) /** * optional uint64 fee_rate_sat_per_kw = 6; - * @return {number} + * @return {string} */ proto.poolrpc.OrderMatchPrepare.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.OrderMatchPrepare.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 fee_rebate_sat = 7; - * @return {number} + * @return {string} */ proto.poolrpc.OrderMatchPrepare.prototype.getFeeRebateSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.OrderMatchPrepare.prototype.setFeeRebateSat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -6176,7 +6176,7 @@ proto.poolrpc.AuctionAccount.prototype.toObject = function(opt_includeInstance) */ proto.poolrpc.AuctionAccount.toObject = function(includeInstance, msg) { var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: jspb.Message.getFieldWithDefault(msg, 1, "0"), expiry: jspb.Message.getFieldWithDefault(msg, 2, 0), traderKey: msg.getTraderKey_asB64(), auctioneerKey: msg.getAuctioneerKey_asB64(), @@ -6222,7 +6222,7 @@ proto.poolrpc.AuctionAccount.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setValue(value); break; case 2: @@ -6288,8 +6288,8 @@ proto.poolrpc.AuctionAccount.prototype.serializeBinary = function() { proto.poolrpc.AuctionAccount.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -6356,16 +6356,16 @@ proto.poolrpc.AuctionAccount.serializeBinaryToWriter = function(message, writer) /** * optional uint64 value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.AuctionAccount.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.AuctionAccount.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -7233,7 +7233,7 @@ proto.poolrpc.AccountDiff.prototype.toObject = function(opt_includeInstance) { */ proto.poolrpc.AccountDiff.toObject = function(includeInstance, msg) { var f, obj = { - endingBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + endingBalance: jspb.Message.getFieldWithDefault(msg, 1, "0"), endingState: jspb.Message.getFieldWithDefault(msg, 2, 0), outpointIndex: jspb.Message.getFieldWithDefault(msg, 3, 0), traderKey: msg.getTraderKey_asB64() @@ -7274,7 +7274,7 @@ proto.poolrpc.AccountDiff.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setEndingBalance(value); break; case 2: @@ -7319,8 +7319,8 @@ proto.poolrpc.AccountDiff.prototype.serializeBinary = function() { proto.poolrpc.AccountDiff.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEndingBalance(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -7361,16 +7361,16 @@ proto.poolrpc.AccountDiff.AccountState = { /** * optional uint64 ending_balance = 1; - * @return {number} + * @return {string} */ proto.poolrpc.AccountDiff.prototype.getEndingBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.AccountDiff.prototype.setEndingBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -7499,8 +7499,8 @@ proto.poolrpc.ServerOrder.toObject = function(includeInstance, msg) { var f, obj = { traderKey: msg.getTraderKey_asB64(), rateFixed: jspb.Message.getFieldWithDefault(msg, 2, 0), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - minChanAmt: jspb.Message.getFieldWithDefault(msg, 4, 0), + amt: jspb.Message.getFieldWithDefault(msg, 3, "0"), + minChanAmt: jspb.Message.getFieldWithDefault(msg, 4, "0"), orderNonce: msg.getOrderNonce_asB64(), orderSig: msg.getOrderSig_asB64(), multiSigKey: msg.getMultiSigKey_asB64(), @@ -7508,7 +7508,7 @@ proto.poolrpc.ServerOrder.toObject = function(includeInstance, msg) { nodeAddrList: jspb.Message.toObjectList(msg.getNodeAddrList(), proto.poolrpc.NodeAddress.toObject, includeInstance), chanType: jspb.Message.getFieldWithDefault(msg, 12, 0), - maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 13, 0) + maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 13, "0") }; if (includeInstance) { @@ -7554,11 +7554,11 @@ proto.poolrpc.ServerOrder.deserializeBinaryFromReader = function(msg, reader) { msg.setRateFixed(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmt(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinChanAmt(value); break; case 6: @@ -7587,7 +7587,7 @@ proto.poolrpc.ServerOrder.deserializeBinaryFromReader = function(msg, reader) { msg.setChanType(value); break; case 13: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxBatchFeeRateSatPerKw(value); break; default: @@ -7634,15 +7634,15 @@ proto.poolrpc.ServerOrder.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmt(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); } f = message.getMinChanAmt(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -7691,8 +7691,8 @@ proto.poolrpc.ServerOrder.serializeBinaryToWriter = function(message, writer) { ); } f = message.getMaxBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 13, f ); @@ -7756,31 +7756,31 @@ proto.poolrpc.ServerOrder.prototype.setRateFixed = function(value) { /** * optional uint64 amt = 3; - * @return {number} + * @return {string} */ proto.poolrpc.ServerOrder.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerOrder.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional uint64 min_chan_amt = 4; - * @return {number} + * @return {string} */ proto.poolrpc.ServerOrder.prototype.getMinChanAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerOrder.prototype.setMinChanAmt = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -7988,16 +7988,16 @@ proto.poolrpc.ServerOrder.prototype.setChanType = function(value) { /** * optional uint64 max_batch_fee_rate_sat_per_kw = 13; - * @return {number} + * @return {string} */ proto.poolrpc.ServerOrder.prototype.getMaxBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerOrder.prototype.setMaxBatchFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 13, value); + jspb.Message.setProto3StringIntField(this, 13, value); }; @@ -8052,7 +8052,7 @@ proto.poolrpc.ServerBid.toObject = function(includeInstance, msg) { leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), version: jspb.Message.getFieldWithDefault(msg, 4, 0), minNodeTier: jspb.Message.getFieldWithDefault(msg, 5, 0), - selfChanBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), + selfChanBalance: jspb.Message.getFieldWithDefault(msg, 6, "0"), isSidecarChannel: jspb.Message.getFieldWithDefault(msg, 7, false) }; @@ -8108,7 +8108,7 @@ proto.poolrpc.ServerBid.deserializeBinaryFromReader = function(msg, reader) { msg.setMinNodeTier(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSelfChanBalance(value); break; case 7: @@ -8174,8 +8174,8 @@ proto.poolrpc.ServerBid.serializeBinaryToWriter = function(message, writer) { ); } f = message.getSelfChanBalance(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); @@ -8267,16 +8267,16 @@ proto.poolrpc.ServerBid.prototype.setMinNodeTier = function(value) { /** * optional uint64 self_chan_balance = 6; - * @return {number} + * @return {string} */ proto.poolrpc.ServerBid.prototype.getSelfChanBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerBid.prototype.setSelfChanBalance = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -9160,7 +9160,7 @@ proto.poolrpc.ServerOutput.prototype.toObject = function(opt_includeInstance) { */ proto.poolrpc.ServerOutput.toObject = function(includeInstance, msg) { var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: jspb.Message.getFieldWithDefault(msg, 1, "0"), script: msg.getScript_asB64() }; @@ -9199,7 +9199,7 @@ proto.poolrpc.ServerOutput.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setValue(value); break; case 2: @@ -9236,8 +9236,8 @@ proto.poolrpc.ServerOutput.prototype.serializeBinary = function() { proto.poolrpc.ServerOutput.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -9254,16 +9254,16 @@ proto.poolrpc.ServerOutput.serializeBinaryToWriter = function(message, writer) { /** * optional uint64 value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.ServerOutput.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerOutput.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -9531,7 +9531,7 @@ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.toObject */ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.toObject = function(includeInstance, msg) { var f, obj = { - value: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: jspb.Message.getFieldWithDefault(msg, 1, "0"), expiry: jspb.Message.getFieldWithDefault(msg, 2, 0) }; @@ -9570,7 +9570,7 @@ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setValue(value); break; case 2: @@ -9607,8 +9607,8 @@ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.serializ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -9625,16 +9625,16 @@ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.serializeBinaryToW /** * optional uint64 value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ServerModifyAccountRequest.NewAccountParameters.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -10448,13 +10448,13 @@ proto.poolrpc.TermsResponse.prototype.toObject = function(opt_includeInstance) { */ proto.poolrpc.TermsResponse.toObject = function(includeInstance, msg) { var f, obj = { - maxAccountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAccountValue: jspb.Message.getFieldWithDefault(msg, 1, "0"), maxOrderDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), executionFee: (f = msg.getExecutionFee()) && proto.poolrpc.ExecutionFee.toObject(includeInstance, f), leaseDurationsMap: (f = msg.getLeaseDurationsMap()) ? f.toObject(includeInstance, undefined) : [], nextBatchConfTarget: jspb.Message.getFieldWithDefault(msg, 5, 0), - nextBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - nextBatchClearTimestamp: jspb.Message.getFieldWithDefault(msg, 7, 0), + nextBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, "0"), + nextBatchClearTimestamp: jspb.Message.getFieldWithDefault(msg, 7, "0"), leaseDurationBucketsMap: (f = msg.getLeaseDurationBucketsMap()) ? f.toObject(includeInstance, undefined) : [] }; @@ -10493,7 +10493,7 @@ proto.poolrpc.TermsResponse.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxAccountValue(value); break; case 2: @@ -10516,11 +10516,11 @@ proto.poolrpc.TermsResponse.deserializeBinaryFromReader = function(msg, reader) msg.setNextBatchConfTarget(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setNextBatchFeeRateSatPerKw(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setNextBatchClearTimestamp(value); break; case 8: @@ -10559,8 +10559,8 @@ proto.poolrpc.TermsResponse.prototype.serializeBinary = function() { proto.poolrpc.TermsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMaxAccountValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -10592,15 +10592,15 @@ proto.poolrpc.TermsResponse.serializeBinaryToWriter = function(message, writer) ); } f = message.getNextBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getNextBatchClearTimestamp(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -10614,16 +10614,16 @@ proto.poolrpc.TermsResponse.serializeBinaryToWriter = function(message, writer) /** * optional uint64 max_account_value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.TermsResponse.prototype.getMaxAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.TermsResponse.prototype.setMaxAccountValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -10707,31 +10707,31 @@ proto.poolrpc.TermsResponse.prototype.setNextBatchConfTarget = function(value) { /** * optional uint64 next_batch_fee_rate_sat_per_kw = 6; - * @return {number} + * @return {string} */ proto.poolrpc.TermsResponse.prototype.getNextBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.TermsResponse.prototype.setNextBatchFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 next_batch_clear_timestamp = 7; - * @return {number} + * @return {string} */ proto.poolrpc.TermsResponse.prototype.getNextBatchClearTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.TermsResponse.prototype.setNextBatchClearTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -11053,8 +11053,8 @@ proto.poolrpc.RelevantBatch.toObject = function(includeInstance, msg) { clearingPriceRate: jspb.Message.getFieldWithDefault(msg, 5, 0), executionFee: (f = msg.getExecutionFee()) && proto.poolrpc.ExecutionFee.toObject(includeInstance, f), transaction: msg.getTransaction_asB64(), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 8, 0), - creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 9, 0), + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 8, "0"), + creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 9, "0"), matchedMarketsMap: (f = msg.getMatchedMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedMarket.toObject) : [] }; @@ -11125,11 +11125,11 @@ proto.poolrpc.RelevantBatch.deserializeBinaryFromReader = function(msg, reader) msg.setTransaction(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setCreationTimestampNs(value); break; case 10: @@ -11216,15 +11216,15 @@ proto.poolrpc.RelevantBatch.serializeBinaryToWriter = function(message, writer) ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 8, f ); } f = message.getCreationTimestampNs(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); @@ -11425,31 +11425,31 @@ proto.poolrpc.RelevantBatch.prototype.setTransaction = function(value) { /** * optional uint64 fee_rate_sat_per_kw = 8; - * @return {number} + * @return {string} */ proto.poolrpc.RelevantBatch.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.RelevantBatch.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional uint64 creation_timestamp_ns = 9; - * @return {number} + * @return {string} */ proto.poolrpc.RelevantBatch.prototype.getCreationTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.RelevantBatch.prototype.setCreationTimestampNs = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -11518,8 +11518,8 @@ proto.poolrpc.ExecutionFee.prototype.toObject = function(opt_includeInstance) { */ proto.poolrpc.ExecutionFee.toObject = function(includeInstance, msg) { var f, obj = { - baseFee: jspb.Message.getFieldWithDefault(msg, 1, 0), - feeRate: jspb.Message.getFieldWithDefault(msg, 2, 0) + baseFee: jspb.Message.getFieldWithDefault(msg, 1, "0"), + feeRate: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -11557,11 +11557,11 @@ proto.poolrpc.ExecutionFee.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setBaseFee(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRate(value); break; default: @@ -11594,15 +11594,15 @@ proto.poolrpc.ExecutionFee.prototype.serializeBinary = function() { proto.poolrpc.ExecutionFee.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBaseFee(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } f = message.getFeeRate(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -11612,31 +11612,31 @@ proto.poolrpc.ExecutionFee.serializeBinaryToWriter = function(message, writer) { /** * optional uint64 base_fee = 1; - * @return {number} + * @return {string} */ proto.poolrpc.ExecutionFee.prototype.getBaseFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ExecutionFee.prototype.setBaseFee = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional uint64 fee_rate = 2; - * @return {number} + * @return {string} */ proto.poolrpc.ExecutionFee.prototype.getFeeRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.ExecutionFee.prototype.setFeeRate = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -12498,7 +12498,7 @@ proto.poolrpc.MatchedOrderSnapshot.toObject = function(includeInstance, msg) { ask: (f = msg.getAsk()) && proto.poolrpc.AskSnapshot.toObject(includeInstance, f), bid: (f = msg.getBid()) && proto.poolrpc.BidSnapshot.toObject(includeInstance, f), matchingRate: jspb.Message.getFieldWithDefault(msg, 3, 0), - totalSatsCleared: jspb.Message.getFieldWithDefault(msg, 4, 0), + totalSatsCleared: jspb.Message.getFieldWithDefault(msg, 4, "0"), unitsMatched: jspb.Message.getFieldWithDefault(msg, 5, 0) }; @@ -12551,7 +12551,7 @@ proto.poolrpc.MatchedOrderSnapshot.deserializeBinaryFromReader = function(msg, r msg.setMatchingRate(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTotalSatsCleared(value); break; case 5: @@ -12611,8 +12611,8 @@ proto.poolrpc.MatchedOrderSnapshot.serializeBinaryToWriter = function(message, w ); } f = message.getTotalSatsCleared(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -12704,16 +12704,16 @@ proto.poolrpc.MatchedOrderSnapshot.prototype.setMatchingRate = function(value) { /** * optional uint64 total_sats_cleared = 4; - * @return {number} + * @return {string} */ proto.poolrpc.MatchedOrderSnapshot.prototype.getTotalSatsCleared = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.MatchedOrderSnapshot.prototype.setTotalSatsCleared = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -13155,8 +13155,8 @@ proto.poolrpc.BatchSnapshotResponse.toObject = function(includeInstance, msg) { proto.poolrpc.MatchedOrderSnapshot.toObject, includeInstance), batchTxId: jspb.Message.getFieldWithDefault(msg, 7, ""), batchTx: msg.getBatchTx_asB64(), - batchTxFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 8, 0), - creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 9, 0), + batchTxFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 8, "0"), + creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 9, "0"), matchedMarketsMap: (f = msg.getMatchedMarketsMap()) ? f.toObject(includeInstance, proto.poolrpc.MatchedMarketSnapshot.toObject) : [] }; @@ -13224,11 +13224,11 @@ proto.poolrpc.BatchSnapshotResponse.deserializeBinaryFromReader = function(msg, msg.setBatchTx(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setBatchTxFeeRateSatPerKw(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setCreationTimestampNs(value); break; case 10: @@ -13317,15 +13317,15 @@ proto.poolrpc.BatchSnapshotResponse.serializeBinaryToWriter = function(message, ); } f = message.getBatchTxFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 8, f ); } f = message.getCreationTimestampNs(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); @@ -13532,31 +13532,31 @@ proto.poolrpc.BatchSnapshotResponse.prototype.setBatchTx = function(value) { /** * optional uint64 batch_tx_fee_rate_sat_per_kw = 8; - * @return {number} + * @return {string} */ proto.poolrpc.BatchSnapshotResponse.prototype.getBatchTxFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.BatchSnapshotResponse.prototype.setBatchTxFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional uint64 creation_timestamp_ns = 9; - * @return {number} + * @return {string} */ proto.poolrpc.BatchSnapshotResponse.prototype.getCreationTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.BatchSnapshotResponse.prototype.setCreationTimestampNs = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; diff --git a/app/src/types/generated/lnd_pb.d.ts b/app/src/types/generated/lnd_pb.d.ts index fbf87fa9..fae22714 100644 --- a/app/src/types/generated/lnd_pb.d.ts +++ b/app/src/types/generated/lnd_pb.d.ts @@ -10,8 +10,8 @@ export class Utxo extends jspb.Message { getAddress(): string; setAddress(value: string): void; - getAmountSat(): number; - setAmountSat(value: number): void; + getAmountSat(): string; + setAmountSat(value: string): void; getPkScript(): string; setPkScript(value: string): void; @@ -21,8 +21,8 @@ export class Utxo extends jspb.Message { getOutpoint(): OutPoint | undefined; setOutpoint(value?: OutPoint): void; - getConfirmations(): number; - setConfirmations(value: number): void; + getConfirmations(): string; + setConfirmations(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Utxo.AsObject; @@ -38,10 +38,10 @@ export namespace Utxo { export type AsObject = { addressType: AddressTypeMap[keyof AddressTypeMap], address: string, - amountSat: number, + amountSat: string, pkScript: string, outpoint?: OutPoint.AsObject, - confirmations: number, + confirmations: string, } } @@ -49,8 +49,8 @@ export class Transaction extends jspb.Message { getTxHash(): string; setTxHash(value: string): void; - getAmount(): number; - setAmount(value: number): void; + getAmount(): string; + setAmount(value: string): void; getNumConfirmations(): number; setNumConfirmations(value: number): void; @@ -61,11 +61,11 @@ export class Transaction extends jspb.Message { getBlockHeight(): number; setBlockHeight(value: number): void; - getTimeStamp(): number; - setTimeStamp(value: number): void; + getTimeStamp(): string; + setTimeStamp(value: string): void; - getTotalFees(): number; - setTotalFees(value: number): void; + getTotalFees(): string; + setTotalFees(value: string): void; clearDestAddressesList(): void; getDestAddressesList(): Array; @@ -91,12 +91,12 @@ export class Transaction extends jspb.Message { export namespace Transaction { export type AsObject = { txHash: string, - amount: number, + amount: string, numConfirmations: number, blockHash: string, blockHeight: number, - timeStamp: number, - totalFees: number, + timeStamp: string, + totalFees: string, destAddressesList: Array, rawTxHex: string, label: string, @@ -156,18 +156,18 @@ export namespace TransactionDetails { export class FeeLimit extends jspb.Message { hasFixed(): boolean; clearFixed(): void; - getFixed(): number; - setFixed(value: number): void; + getFixed(): string; + setFixed(value: string): void; hasFixedMsat(): boolean; clearFixedMsat(): void; - getFixedMsat(): number; - setFixedMsat(value: number): void; + getFixedMsat(): string; + setFixedMsat(value: string): void; hasPercent(): boolean; clearPercent(): void; - getPercent(): number; - setPercent(value: number): void; + getPercent(): string; + setPercent(value: string): void; getLimitCase(): FeeLimit.LimitCase; serializeBinary(): Uint8Array; @@ -182,9 +182,9 @@ export class FeeLimit extends jspb.Message { export namespace FeeLimit { export type AsObject = { - fixed: number, - fixedMsat: number, - percent: number, + fixed: string, + fixedMsat: string, + percent: string, } export enum LimitCase { @@ -204,11 +204,11 @@ export class SendRequest extends jspb.Message { getDestString(): string; setDestString(value: string): void; - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; - getAmtMsat(): number; - setAmtMsat(value: number): void; + getAmtMsat(): string; + setAmtMsat(value: string): void; getPaymentHash(): Uint8Array | string; getPaymentHash_asU8(): Uint8Array; @@ -269,8 +269,8 @@ export namespace SendRequest { export type AsObject = { dest: Uint8Array | string, destString: string, - amt: number, - amtMsat: number, + amt: string, + amtMsat: string, paymentHash: Uint8Array | string, paymentHashString: string, paymentRequest: string, @@ -372,26 +372,26 @@ export class ChannelAcceptRequest extends jspb.Message { getPendingChanId_asB64(): string; setPendingChanId(value: Uint8Array | string): void; - getFundingAmt(): number; - setFundingAmt(value: number): void; + getFundingAmt(): string; + setFundingAmt(value: string): void; - getPushAmt(): number; - setPushAmt(value: number): void; + getPushAmt(): string; + setPushAmt(value: string): void; - getDustLimit(): number; - setDustLimit(value: number): void; + getDustLimit(): string; + setDustLimit(value: string): void; - getMaxValueInFlight(): number; - setMaxValueInFlight(value: number): void; + getMaxValueInFlight(): string; + setMaxValueInFlight(value: string): void; - getChannelReserve(): number; - setChannelReserve(value: number): void; + getChannelReserve(): string; + setChannelReserve(value: string): void; - getMinHtlc(): number; - setMinHtlc(value: number): void; + getMinHtlc(): string; + setMinHtlc(value: string): void; - getFeePerKw(): number; - setFeePerKw(value: number): void; + getFeePerKw(): string; + setFeePerKw(value: string): void; getCsvDelay(): number; setCsvDelay(value: number): void; @@ -417,13 +417,13 @@ export namespace ChannelAcceptRequest { nodePubkey: Uint8Array | string, chainHash: Uint8Array | string, pendingChanId: Uint8Array | string, - fundingAmt: number, - pushAmt: number, - dustLimit: number, - maxValueInFlight: number, - channelReserve: number, - minHtlc: number, - feePerKw: number, + fundingAmt: string, + pushAmt: string, + dustLimit: string, + maxValueInFlight: string, + channelReserve: string, + minHtlc: string, + feePerKw: string, csvDelay: number, maxAcceptedHtlcs: number, channelFlags: number, @@ -448,17 +448,17 @@ export class ChannelAcceptResponse extends jspb.Message { getCsvDelay(): number; setCsvDelay(value: number): void; - getReserveSat(): number; - setReserveSat(value: number): void; + getReserveSat(): string; + setReserveSat(value: string): void; - getInFlightMaxMsat(): number; - setInFlightMaxMsat(value: number): void; + getInFlightMaxMsat(): string; + setInFlightMaxMsat(value: string): void; getMaxHtlcCount(): number; setMaxHtlcCount(value: number): void; - getMinHtlcIn(): number; - setMinHtlcIn(value: number): void; + getMinHtlcIn(): string; + setMinHtlcIn(value: string): void; getMinAcceptDepth(): number; setMinAcceptDepth(value: number): void; @@ -480,10 +480,10 @@ export namespace ChannelAcceptResponse { error: string, upfrontShutdown: string, csvDelay: number, - reserveSat: number, - inFlightMaxMsat: number, + reserveSat: string, + inFlightMaxMsat: string, maxHtlcCount: number, - minHtlcIn: number, + minHtlcIn: string, minAcceptDepth: number, } } @@ -615,14 +615,14 @@ export namespace EstimateFeeRequest { } export class EstimateFeeResponse extends jspb.Message { - getFeeSat(): number; - setFeeSat(value: number): void; + getFeeSat(): string; + setFeeSat(value: string): void; - getFeerateSatPerByte(): number; - setFeerateSatPerByte(value: number): void; + getFeerateSatPerByte(): string; + setFeerateSatPerByte(value: string): void; - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; + getSatPerVbyte(): string; + setSatPerVbyte(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): EstimateFeeResponse.AsObject; @@ -636,9 +636,9 @@ export class EstimateFeeResponse extends jspb.Message { export namespace EstimateFeeResponse { export type AsObject = { - feeSat: number, - feerateSatPerByte: number, - satPerVbyte: number, + feeSat: string, + feerateSatPerByte: string, + satPerVbyte: string, } } @@ -648,11 +648,11 @@ export class SendManyRequest extends jspb.Message { getTargetConf(): number; setTargetConf(value: number): void; - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; + getSatPerVbyte(): string; + setSatPerVbyte(value: string): void; - getSatPerByte(): number; - setSatPerByte(value: number): void; + getSatPerByte(): string; + setSatPerByte(value: string): void; getLabel(): string; setLabel(value: string): void; @@ -677,8 +677,8 @@ export namespace SendManyRequest { export type AsObject = { addrtoamountMap: Array<[string, number]>, targetConf: number, - satPerVbyte: number, - satPerByte: number, + satPerVbyte: string, + satPerByte: string, label: string, minConfs: number, spendUnconfirmed: boolean, @@ -709,17 +709,17 @@ export class SendCoinsRequest extends jspb.Message { getAddr(): string; setAddr(value: string): void; - getAmount(): number; - setAmount(value: number): void; + getAmount(): string; + setAmount(value: string): void; getTargetConf(): number; setTargetConf(value: number): void; - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; + getSatPerVbyte(): string; + setSatPerVbyte(value: string): void; - getSatPerByte(): number; - setSatPerByte(value: number): void; + getSatPerByte(): string; + setSatPerByte(value: string): void; getSendAll(): boolean; setSendAll(value: boolean): void; @@ -746,10 +746,10 @@ export class SendCoinsRequest extends jspb.Message { export namespace SendCoinsRequest { export type AsObject = { addr: string, - amount: number, + amount: string, targetConf: number, - satPerVbyte: number, - satPerByte: number, + satPerVbyte: string, + satPerByte: string, sendAll: boolean, label: string, minConfs: number, @@ -972,8 +972,8 @@ export class ConnectPeerRequest extends jspb.Message { getPerm(): boolean; setPerm(value: boolean): void; - getTimeout(): number; - setTimeout(value: number): void; + getTimeout(): string; + setTimeout(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ConnectPeerRequest.AsObject; @@ -989,7 +989,7 @@ export namespace ConnectPeerRequest { export type AsObject = { addr?: LightningAddress.AsObject, perm: boolean, - timeout: number, + timeout: string, } } @@ -1049,8 +1049,8 @@ export class HTLC extends jspb.Message { getIncoming(): boolean; setIncoming(value: boolean): void; - getAmount(): number; - setAmount(value: number): void; + getAmount(): string; + setAmount(value: string): void; getHashLock(): Uint8Array | string; getHashLock_asU8(): Uint8Array; @@ -1060,14 +1060,14 @@ export class HTLC extends jspb.Message { getExpirationHeight(): number; setExpirationHeight(value: number): void; - getHtlcIndex(): number; - setHtlcIndex(value: number): void; + getHtlcIndex(): string; + setHtlcIndex(value: string): void; - getForwardingChannel(): number; - setForwardingChannel(value: number): void; + getForwardingChannel(): string; + setForwardingChannel(value: string): void; - getForwardingHtlcIndex(): number; - setForwardingHtlcIndex(value: number): void; + getForwardingHtlcIndex(): string; + setForwardingHtlcIndex(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): HTLC.AsObject; @@ -1082,12 +1082,12 @@ export class HTLC extends jspb.Message { export namespace HTLC { export type AsObject = { incoming: boolean, - amount: number, + amount: string, hashLock: Uint8Array | string, expirationHeight: number, - htlcIndex: number, - forwardingChannel: number, - forwardingHtlcIndex: number, + htlcIndex: string, + forwardingChannel: string, + forwardingHtlcIndex: string, } } @@ -1095,17 +1095,17 @@ export class ChannelConstraints extends jspb.Message { getCsvDelay(): number; setCsvDelay(value: number): void; - getChanReserveSat(): number; - setChanReserveSat(value: number): void; + getChanReserveSat(): string; + setChanReserveSat(value: string): void; - getDustLimitSat(): number; - setDustLimitSat(value: number): void; + getDustLimitSat(): string; + setDustLimitSat(value: string): void; - getMaxPendingAmtMsat(): number; - setMaxPendingAmtMsat(value: number): void; + getMaxPendingAmtMsat(): string; + setMaxPendingAmtMsat(value: string): void; - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; + getMinHtlcMsat(): string; + setMinHtlcMsat(value: string): void; getMaxAcceptedHtlcs(): number; setMaxAcceptedHtlcs(value: number): void; @@ -1123,10 +1123,10 @@ export class ChannelConstraints extends jspb.Message { export namespace ChannelConstraints { export type AsObject = { csvDelay: number, - chanReserveSat: number, - dustLimitSat: number, - maxPendingAmtMsat: number, - minHtlcMsat: number, + chanReserveSat: string, + dustLimitSat: string, + maxPendingAmtMsat: string, + minHtlcMsat: string, maxAcceptedHtlcs: number, } } @@ -1144,35 +1144,35 @@ export class Channel extends jspb.Message { getChanId(): string; setChanId(value: string): void; - getCapacity(): number; - setCapacity(value: number): void; + getCapacity(): string; + setCapacity(value: string): void; - getLocalBalance(): number; - setLocalBalance(value: number): void; + getLocalBalance(): string; + setLocalBalance(value: string): void; - getRemoteBalance(): number; - setRemoteBalance(value: number): void; + getRemoteBalance(): string; + setRemoteBalance(value: string): void; - getCommitFee(): number; - setCommitFee(value: number): void; + getCommitFee(): string; + setCommitFee(value: string): void; - getCommitWeight(): number; - setCommitWeight(value: number): void; + getCommitWeight(): string; + setCommitWeight(value: string): void; - getFeePerKw(): number; - setFeePerKw(value: number): void; + getFeePerKw(): string; + setFeePerKw(value: string): void; - getUnsettledBalance(): number; - setUnsettledBalance(value: number): void; + getUnsettledBalance(): string; + setUnsettledBalance(value: string): void; - getTotalSatoshisSent(): number; - setTotalSatoshisSent(value: number): void; + getTotalSatoshisSent(): string; + setTotalSatoshisSent(value: string): void; - getTotalSatoshisReceived(): number; - setTotalSatoshisReceived(value: number): void; + getTotalSatoshisReceived(): string; + setTotalSatoshisReceived(value: string): void; - getNumUpdates(): number; - setNumUpdates(value: number): void; + getNumUpdates(): string; + setNumUpdates(value: string): void; clearPendingHtlcsList(): void; getPendingHtlcsList(): Array; @@ -1191,11 +1191,11 @@ export class Channel extends jspb.Message { getChanStatusFlags(): string; setChanStatusFlags(value: string): void; - getLocalChanReserveSat(): number; - setLocalChanReserveSat(value: number): void; + getLocalChanReserveSat(): string; + setLocalChanReserveSat(value: string): void; - getRemoteChanReserveSat(): number; - setRemoteChanReserveSat(value: number): void; + getRemoteChanReserveSat(): string; + setRemoteChanReserveSat(value: string): void; getStaticRemoteKey(): boolean; setStaticRemoteKey(value: boolean): void; @@ -1203,17 +1203,17 @@ export class Channel extends jspb.Message { getCommitmentType(): CommitmentTypeMap[keyof CommitmentTypeMap]; setCommitmentType(value: CommitmentTypeMap[keyof CommitmentTypeMap]): void; - getLifetime(): number; - setLifetime(value: number): void; + getLifetime(): string; + setLifetime(value: string): void; - getUptime(): number; - setUptime(value: number): void; + getUptime(): string; + setUptime(value: string): void; getCloseAddress(): string; setCloseAddress(value: string): void; - getPushAmountSat(): number; - setPushAmountSat(value: number): void; + getPushAmountSat(): string; + setPushAmountSat(value: string): void; getThawHeight(): number; setThawHeight(value: number): void; @@ -1244,29 +1244,29 @@ export namespace Channel { remotePubkey: string, channelPoint: string, chanId: string, - capacity: number, - localBalance: number, - remoteBalance: number, - commitFee: number, - commitWeight: number, - feePerKw: number, - unsettledBalance: number, - totalSatoshisSent: number, - totalSatoshisReceived: number, - numUpdates: number, + capacity: string, + localBalance: string, + remoteBalance: string, + commitFee: string, + commitWeight: string, + feePerKw: string, + unsettledBalance: string, + totalSatoshisSent: string, + totalSatoshisReceived: string, + numUpdates: string, pendingHtlcsList: Array, csvDelay: number, pb_private: boolean, initiator: boolean, chanStatusFlags: string, - localChanReserveSat: number, - remoteChanReserveSat: number, + localChanReserveSat: string, + remoteChanReserveSat: string, staticRemoteKey: boolean, commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], - lifetime: number, - uptime: number, + lifetime: string, + uptime: string, closeAddress: string, - pushAmountSat: number, + pushAmountSat: string, thawHeight: number, localConstraints?: ChannelConstraints.AsObject, remoteConstraints?: ChannelConstraints.AsObject, @@ -1349,17 +1349,17 @@ export class ChannelCloseSummary extends jspb.Message { getRemotePubkey(): string; setRemotePubkey(value: string): void; - getCapacity(): number; - setCapacity(value: number): void; + getCapacity(): string; + setCapacity(value: string): void; getCloseHeight(): number; setCloseHeight(value: number): void; - getSettledBalance(): number; - setSettledBalance(value: number): void; + getSettledBalance(): string; + setSettledBalance(value: string): void; - getTimeLockedBalance(): number; - setTimeLockedBalance(value: number): void; + getTimeLockedBalance(): string; + setTimeLockedBalance(value: string): void; getCloseType(): ChannelCloseSummary.ClosureTypeMap[keyof ChannelCloseSummary.ClosureTypeMap]; setCloseType(value: ChannelCloseSummary.ClosureTypeMap[keyof ChannelCloseSummary.ClosureTypeMap]): void; @@ -1392,10 +1392,10 @@ export namespace ChannelCloseSummary { chainHash: string, closingTxHash: string, remotePubkey: string, - capacity: number, + capacity: string, closeHeight: number, - settledBalance: number, - timeLockedBalance: number, + settledBalance: string, + timeLockedBalance: string, closeType: ChannelCloseSummary.ClosureTypeMap[keyof ChannelCloseSummary.ClosureTypeMap], openInitiator: InitiatorMap[keyof InitiatorMap], closeInitiator: InitiatorMap[keyof InitiatorMap], @@ -1426,8 +1426,8 @@ export class Resolution extends jspb.Message { getOutpoint(): OutPoint | undefined; setOutpoint(value?: OutPoint): void; - getAmountSat(): number; - setAmountSat(value: number): void; + getAmountSat(): string; + setAmountSat(value: string): void; getSweepTxid(): string; setSweepTxid(value: string): void; @@ -1447,7 +1447,7 @@ export namespace Resolution { resolutionType: ResolutionTypeMap[keyof ResolutionTypeMap], outcome: ResolutionOutcomeMap[keyof ResolutionOutcomeMap], outpoint?: OutPoint.AsObject, - amountSat: number, + amountSat: string, sweepTxid: string, } } @@ -1521,23 +1521,23 @@ export class Peer extends jspb.Message { getAddress(): string; setAddress(value: string): void; - getBytesSent(): number; - setBytesSent(value: number): void; + getBytesSent(): string; + setBytesSent(value: string): void; - getBytesRecv(): number; - setBytesRecv(value: number): void; + getBytesRecv(): string; + setBytesRecv(value: string): void; - getSatSent(): number; - setSatSent(value: number): void; + getSatSent(): string; + setSatSent(value: string): void; - getSatRecv(): number; - setSatRecv(value: number): void; + getSatRecv(): string; + setSatRecv(value: string): void; getInbound(): boolean; setInbound(value: boolean): void; - getPingTime(): number; - setPingTime(value: number): void; + getPingTime(): string; + setPingTime(value: string): void; getSyncType(): Peer.SyncTypeMap[keyof Peer.SyncTypeMap]; setSyncType(value: Peer.SyncTypeMap[keyof Peer.SyncTypeMap]): void; @@ -1552,8 +1552,8 @@ export class Peer extends jspb.Message { getFlapCount(): number; setFlapCount(value: number): void; - getLastFlapNs(): number; - setLastFlapNs(value: number): void; + getLastFlapNs(): string; + setLastFlapNs(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Peer.AsObject; @@ -1569,17 +1569,17 @@ export namespace Peer { export type AsObject = { pubKey: string, address: string, - bytesSent: number, - bytesRecv: number, - satSent: number, - satRecv: number, + bytesSent: string, + bytesRecv: string, + satSent: string, + satRecv: string, inbound: boolean, - pingTime: number, + pingTime: string, syncType: Peer.SyncTypeMap[keyof Peer.SyncTypeMap], featuresMap: Array<[number, Feature.AsObject]>, errorsList: Array, flapCount: number, - lastFlapNs: number, + lastFlapNs: string, } export interface SyncTypeMap { @@ -1593,8 +1593,8 @@ export namespace Peer { } export class TimestampedError extends jspb.Message { - getTimestamp(): number; - setTimestamp(value: number): void; + getTimestamp(): string; + setTimestamp(value: string): void; getError(): string; setError(value: string): void; @@ -1611,7 +1611,7 @@ export class TimestampedError extends jspb.Message { export namespace TimestampedError { export type AsObject = { - timestamp: number, + timestamp: string, error: string, } } @@ -1755,8 +1755,8 @@ export class GetInfoResponse extends jspb.Message { getBlockHash(): string; setBlockHash(value: string): void; - getBestHeaderTimestamp(): number; - setBestHeaderTimestamp(value: number): void; + getBestHeaderTimestamp(): string; + setBestHeaderTimestamp(value: string): void; getSyncedToChain(): boolean; setSyncedToChain(value: boolean): void; @@ -1802,7 +1802,7 @@ export namespace GetInfoResponse { numPeers: number, blockHeight: number, blockHash: string, - bestHeaderTimestamp: number, + bestHeaderTimestamp: string, syncedToChain: boolean, syncedToGraph: boolean, testnet: boolean, @@ -1970,14 +1970,14 @@ export class CloseChannelRequest extends jspb.Message { getTargetConf(): number; setTargetConf(value: number): void; - getSatPerByte(): number; - setSatPerByte(value: number): void; + getSatPerByte(): string; + setSatPerByte(value: string): void; getDeliveryAddress(): string; setDeliveryAddress(value: string): void; - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; + getSatPerVbyte(): string; + setSatPerVbyte(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CloseChannelRequest.AsObject; @@ -1994,9 +1994,9 @@ export namespace CloseChannelRequest { channelPoint?: ChannelPoint.AsObject, force: boolean, targetConf: number, - satPerByte: number, + satPerByte: string, deliveryAddress: string, - satPerVbyte: number, + satPerVbyte: string, } } @@ -2065,8 +2065,8 @@ export class ReadyForPsbtFunding extends jspb.Message { getFundingAddress(): string; setFundingAddress(value: string): void; - getFundingAmount(): number; - setFundingAmount(value: number): void; + getFundingAmount(): string; + setFundingAmount(value: string): void; getPsbt(): Uint8Array | string; getPsbt_asU8(): Uint8Array; @@ -2086,14 +2086,14 @@ export class ReadyForPsbtFunding extends jspb.Message { export namespace ReadyForPsbtFunding { export type AsObject = { fundingAddress: string, - fundingAmount: number, + fundingAmount: string, psbt: Uint8Array | string, } } export class OpenChannelRequest extends jspb.Message { - getSatPerVbyte(): number; - setSatPerVbyte(value: number): void; + getSatPerVbyte(): string; + setSatPerVbyte(value: string): void; getNodePubkey(): Uint8Array | string; getNodePubkey_asU8(): Uint8Array; @@ -2103,23 +2103,23 @@ export class OpenChannelRequest extends jspb.Message { getNodePubkeyString(): string; setNodePubkeyString(value: string): void; - getLocalFundingAmount(): number; - setLocalFundingAmount(value: number): void; + getLocalFundingAmount(): string; + setLocalFundingAmount(value: string): void; - getPushSat(): number; - setPushSat(value: number): void; + getPushSat(): string; + setPushSat(value: string): void; getTargetConf(): number; setTargetConf(value: number): void; - getSatPerByte(): number; - setSatPerByte(value: number): void; + getSatPerByte(): string; + setSatPerByte(value: string): void; getPrivate(): boolean; setPrivate(value: boolean): void; - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; + getMinHtlcMsat(): string; + setMinHtlcMsat(value: string): void; getRemoteCsvDelay(): number; setRemoteCsvDelay(value: number): void; @@ -2138,8 +2138,8 @@ export class OpenChannelRequest extends jspb.Message { getFundingShim(): FundingShim | undefined; setFundingShim(value?: FundingShim): void; - getRemoteMaxValueInFlightMsat(): number; - setRemoteMaxValueInFlightMsat(value: number): void; + getRemoteMaxValueInFlightMsat(): string; + setRemoteMaxValueInFlightMsat(value: string): void; getRemoteMaxHtlcs(): number; setRemoteMaxHtlcs(value: number): void; @@ -2159,21 +2159,21 @@ export class OpenChannelRequest extends jspb.Message { export namespace OpenChannelRequest { export type AsObject = { - satPerVbyte: number, + satPerVbyte: string, nodePubkey: Uint8Array | string, nodePubkeyString: string, - localFundingAmount: number, - pushSat: number, + localFundingAmount: string, + pushSat: string, targetConf: number, - satPerByte: number, + satPerByte: string, pb_private: boolean, - minHtlcMsat: number, + minHtlcMsat: string, remoteCsvDelay: number, minConfs: number, spendUnconfirmed: boolean, closeAddress: string, fundingShim?: FundingShim.AsObject, - remoteMaxValueInFlightMsat: number, + remoteMaxValueInFlightMsat: string, remoteMaxHtlcs: number, maxLocalCsv: number, } @@ -2280,8 +2280,8 @@ export namespace KeyDescriptor { } export class ChanPointShim extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; hasChanPoint(): boolean; clearChanPoint(): void; @@ -2318,7 +2318,7 @@ export class ChanPointShim extends jspb.Message { export namespace ChanPointShim { export type AsObject = { - amt: number, + amt: string, chanPoint?: ChannelPoint.AsObject, localKey?: KeyDescriptor.AsObject, remoteKey: Uint8Array | string, @@ -2547,8 +2547,8 @@ export class PendingHTLC extends jspb.Message { getIncoming(): boolean; setIncoming(value: boolean): void; - getAmount(): number; - setAmount(value: number): void; + getAmount(): string; + setAmount(value: string): void; getOutpoint(): string; setOutpoint(value: string): void; @@ -2575,7 +2575,7 @@ export class PendingHTLC extends jspb.Message { export namespace PendingHTLC { export type AsObject = { incoming: boolean, - amount: number, + amount: string, outpoint: string, maturityHeight: number, blocksTilMaturity: number, @@ -2600,8 +2600,8 @@ export namespace PendingChannelsRequest { } export class PendingChannelsResponse extends jspb.Message { - getTotalLimboBalance(): number; - setTotalLimboBalance(value: number): void; + getTotalLimboBalance(): string; + setTotalLimboBalance(value: string): void; clearPendingOpenChannelsList(): void; getPendingOpenChannelsList(): Array; @@ -2635,7 +2635,7 @@ export class PendingChannelsResponse extends jspb.Message { export namespace PendingChannelsResponse { export type AsObject = { - totalLimboBalance: number, + totalLimboBalance: string, pendingOpenChannelsList: Array, pendingClosingChannelsList: Array, pendingForceClosingChannelsList: Array, @@ -2649,20 +2649,20 @@ export namespace PendingChannelsResponse { getChannelPoint(): string; setChannelPoint(value: string): void; - getCapacity(): number; - setCapacity(value: number): void; + getCapacity(): string; + setCapacity(value: string): void; - getLocalBalance(): number; - setLocalBalance(value: number): void; + getLocalBalance(): string; + setLocalBalance(value: string): void; - getRemoteBalance(): number; - setRemoteBalance(value: number): void; + getRemoteBalance(): string; + setRemoteBalance(value: string): void; - getLocalChanReserveSat(): number; - setLocalChanReserveSat(value: number): void; + getLocalChanReserveSat(): string; + setLocalChanReserveSat(value: string): void; - getRemoteChanReserveSat(): number; - setRemoteChanReserveSat(value: number): void; + getRemoteChanReserveSat(): string; + setRemoteChanReserveSat(value: string): void; getInitiator(): InitiatorMap[keyof InitiatorMap]; setInitiator(value: InitiatorMap[keyof InitiatorMap]): void; @@ -2684,11 +2684,11 @@ export namespace PendingChannelsResponse { export type AsObject = { remoteNodePub: string, channelPoint: string, - capacity: number, - localBalance: number, - remoteBalance: number, - localChanReserveSat: number, - remoteChanReserveSat: number, + capacity: string, + localBalance: string, + remoteBalance: string, + localChanReserveSat: string, + remoteChanReserveSat: string, initiator: InitiatorMap[keyof InitiatorMap], commitmentType: CommitmentTypeMap[keyof CommitmentTypeMap], } @@ -2703,14 +2703,14 @@ export namespace PendingChannelsResponse { getConfirmationHeight(): number; setConfirmationHeight(value: number): void; - getCommitFee(): number; - setCommitFee(value: number): void; + getCommitFee(): string; + setCommitFee(value: string): void; - getCommitWeight(): number; - setCommitWeight(value: number): void; + getCommitWeight(): string; + setCommitWeight(value: string): void; - getFeePerKw(): number; - setFeePerKw(value: number): void; + getFeePerKw(): string; + setFeePerKw(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PendingOpenChannel.AsObject; @@ -2726,9 +2726,9 @@ export namespace PendingChannelsResponse { export type AsObject = { channel?: PendingChannelsResponse.PendingChannel.AsObject, confirmationHeight: number, - commitFee: number, - commitWeight: number, - feePerKw: number, + commitFee: string, + commitWeight: string, + feePerKw: string, } } @@ -2738,8 +2738,8 @@ export namespace PendingChannelsResponse { getChannel(): PendingChannelsResponse.PendingChannel | undefined; setChannel(value?: PendingChannelsResponse.PendingChannel): void; - getLimboBalance(): number; - setLimboBalance(value: number): void; + getLimboBalance(): string; + setLimboBalance(value: string): void; hasCommitments(): boolean; clearCommitments(): void; @@ -2759,7 +2759,7 @@ export namespace PendingChannelsResponse { export namespace WaitingCloseChannel { export type AsObject = { channel?: PendingChannelsResponse.PendingChannel.AsObject, - limboBalance: number, + limboBalance: string, commitments?: PendingChannelsResponse.Commitments.AsObject, } } @@ -2774,14 +2774,14 @@ export namespace PendingChannelsResponse { getRemotePendingTxid(): string; setRemotePendingTxid(value: string): void; - getLocalCommitFeeSat(): number; - setLocalCommitFeeSat(value: number): void; + getLocalCommitFeeSat(): string; + setLocalCommitFeeSat(value: string): void; - getRemoteCommitFeeSat(): number; - setRemoteCommitFeeSat(value: number): void; + getRemoteCommitFeeSat(): string; + setRemoteCommitFeeSat(value: string): void; - getRemotePendingCommitFeeSat(): number; - setRemotePendingCommitFeeSat(value: number): void; + getRemotePendingCommitFeeSat(): string; + setRemotePendingCommitFeeSat(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Commitments.AsObject; @@ -2798,9 +2798,9 @@ export namespace PendingChannelsResponse { localTxid: string, remoteTxid: string, remotePendingTxid: string, - localCommitFeeSat: number, - remoteCommitFeeSat: number, - remotePendingCommitFeeSat: number, + localCommitFeeSat: string, + remoteCommitFeeSat: string, + remotePendingCommitFeeSat: string, } } @@ -2839,8 +2839,8 @@ export namespace PendingChannelsResponse { getClosingTxid(): string; setClosingTxid(value: string): void; - getLimboBalance(): number; - setLimboBalance(value: number): void; + getLimboBalance(): string; + setLimboBalance(value: string): void; getMaturityHeight(): number; setMaturityHeight(value: number): void; @@ -2848,8 +2848,8 @@ export namespace PendingChannelsResponse { getBlocksTilMaturity(): number; setBlocksTilMaturity(value: number): void; - getRecoveredBalance(): number; - setRecoveredBalance(value: number): void; + getRecoveredBalance(): string; + setRecoveredBalance(value: string): void; clearPendingHtlcsList(): void; getPendingHtlcsList(): Array; @@ -2873,10 +2873,10 @@ export namespace PendingChannelsResponse { export type AsObject = { channel?: PendingChannelsResponse.PendingChannel.AsObject, closingTxid: string, - limboBalance: number, + limboBalance: string, maturityHeight: number, blocksTilMaturity: number, - recoveredBalance: number, + recoveredBalance: string, pendingHtlcsList: Array, anchor: PendingChannelsResponse.ForceClosedChannel.AnchorStateMap[keyof PendingChannelsResponse.ForceClosedChannel.AnchorStateMap], } @@ -2978,11 +2978,11 @@ export namespace ChannelEventUpdate { } export class WalletAccountBalance extends jspb.Message { - getConfirmedBalance(): number; - setConfirmedBalance(value: number): void; + getConfirmedBalance(): string; + setConfirmedBalance(value: string): void; - getUnconfirmedBalance(): number; - setUnconfirmedBalance(value: number): void; + getUnconfirmedBalance(): string; + setUnconfirmedBalance(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WalletAccountBalance.AsObject; @@ -2996,8 +2996,8 @@ export class WalletAccountBalance extends jspb.Message { export namespace WalletAccountBalance { export type AsObject = { - confirmedBalance: number, - unconfirmedBalance: number, + confirmedBalance: string, + unconfirmedBalance: string, } } @@ -3018,14 +3018,14 @@ export namespace WalletBalanceRequest { } export class WalletBalanceResponse extends jspb.Message { - getTotalBalance(): number; - setTotalBalance(value: number): void; + getTotalBalance(): string; + setTotalBalance(value: string): void; - getConfirmedBalance(): number; - setConfirmedBalance(value: number): void; + getConfirmedBalance(): string; + setConfirmedBalance(value: string): void; - getUnconfirmedBalance(): number; - setUnconfirmedBalance(value: number): void; + getUnconfirmedBalance(): string; + setUnconfirmedBalance(value: string): void; getAccountBalanceMap(): jspb.Map; clearAccountBalanceMap(): void; @@ -3041,19 +3041,19 @@ export class WalletBalanceResponse extends jspb.Message { export namespace WalletBalanceResponse { export type AsObject = { - totalBalance: number, - confirmedBalance: number, - unconfirmedBalance: number, + totalBalance: string, + confirmedBalance: string, + unconfirmedBalance: string, accountBalanceMap: Array<[string, WalletAccountBalance.AsObject]>, } } export class Amount extends jspb.Message { - getSat(): number; - setSat(value: number): void; + getSat(): string; + setSat(value: string): void; - getMsat(): number; - setMsat(value: number): void; + getMsat(): string; + setMsat(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Amount.AsObject; @@ -3067,8 +3067,8 @@ export class Amount extends jspb.Message { export namespace Amount { export type AsObject = { - sat: number, - msat: number, + sat: string, + msat: string, } } @@ -3089,11 +3089,11 @@ export namespace ChannelBalanceRequest { } export class ChannelBalanceResponse extends jspb.Message { - getBalance(): number; - setBalance(value: number): void; + getBalance(): string; + setBalance(value: string): void; - getPendingOpenBalance(): number; - setPendingOpenBalance(value: number): void; + getPendingOpenBalance(): string; + setPendingOpenBalance(value: string): void; hasLocalBalance(): boolean; clearLocalBalance(): void; @@ -3137,8 +3137,8 @@ export class ChannelBalanceResponse extends jspb.Message { export namespace ChannelBalanceResponse { export type AsObject = { - balance: number, - pendingOpenBalance: number, + balance: string, + pendingOpenBalance: string, localBalance?: Amount.AsObject, remoteBalance?: Amount.AsObject, unsettledLocalBalance?: Amount.AsObject, @@ -3152,11 +3152,11 @@ export class QueryRoutesRequest extends jspb.Message { getPubKey(): string; setPubKey(value: string): void; - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; - getAmtMsat(): number; - setAmtMsat(value: number): void; + getAmtMsat(): string; + setAmtMsat(value: string): void; getFinalCltvDelta(): number; setFinalCltvDelta(value: number): void; @@ -3225,8 +3225,8 @@ export class QueryRoutesRequest extends jspb.Message { export namespace QueryRoutesRequest { export type AsObject = { pubKey: string, - amt: number, - amtMsat: number, + amt: string, + amtMsat: string, finalCltvDelta: number, feeLimit?: FeeLimit.AsObject, ignoredNodesList: Array, @@ -3325,23 +3325,23 @@ export class Hop extends jspb.Message { getChanId(): string; setChanId(value: string): void; - getChanCapacity(): number; - setChanCapacity(value: number): void; + getChanCapacity(): string; + setChanCapacity(value: string): void; - getAmtToForward(): number; - setAmtToForward(value: number): void; + getAmtToForward(): string; + setAmtToForward(value: string): void; - getFee(): number; - setFee(value: number): void; + getFee(): string; + setFee(value: string): void; getExpiry(): number; setExpiry(value: number): void; - getAmtToForwardMsat(): number; - setAmtToForwardMsat(value: number): void; + getAmtToForwardMsat(): string; + setAmtToForwardMsat(value: string): void; - getFeeMsat(): number; - setFeeMsat(value: number): void; + getFeeMsat(): string; + setFeeMsat(value: string): void; getPubKey(): string; setPubKey(value: string): void; @@ -3374,12 +3374,12 @@ export class Hop extends jspb.Message { export namespace Hop { export type AsObject = { chanId: string, - chanCapacity: number, - amtToForward: number, - fee: number, + chanCapacity: string, + amtToForward: string, + fee: string, expiry: number, - amtToForwardMsat: number, - feeMsat: number, + amtToForwardMsat: string, + feeMsat: string, pubKey: string, tlvPayload: boolean, mppRecord?: MPPRecord.AsObject, @@ -3394,8 +3394,8 @@ export class MPPRecord extends jspb.Message { getPaymentAddr_asB64(): string; setPaymentAddr(value: Uint8Array | string): void; - getTotalAmtMsat(): number; - setTotalAmtMsat(value: number): void; + getTotalAmtMsat(): string; + setTotalAmtMsat(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): MPPRecord.AsObject; @@ -3410,7 +3410,7 @@ export class MPPRecord extends jspb.Message { export namespace MPPRecord { export type AsObject = { paymentAddr: Uint8Array | string, - totalAmtMsat: number, + totalAmtMsat: string, } } @@ -3450,22 +3450,22 @@ export class Route extends jspb.Message { getTotalTimeLock(): number; setTotalTimeLock(value: number): void; - getTotalFees(): number; - setTotalFees(value: number): void; + getTotalFees(): string; + setTotalFees(value: string): void; - getTotalAmt(): number; - setTotalAmt(value: number): void; + getTotalAmt(): string; + setTotalAmt(value: string): void; clearHopsList(): void; getHopsList(): Array; setHopsList(value: Array): void; addHops(value?: Hop, index?: number): Hop; - getTotalFeesMsat(): number; - setTotalFeesMsat(value: number): void; + getTotalFeesMsat(): string; + setTotalFeesMsat(value: string): void; - getTotalAmtMsat(): number; - setTotalAmtMsat(value: number): void; + getTotalAmtMsat(): string; + setTotalAmtMsat(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Route.AsObject; @@ -3480,11 +3480,11 @@ export class Route extends jspb.Message { export namespace Route { export type AsObject = { totalTimeLock: number, - totalFees: number, - totalAmt: number, + totalFees: string, + totalAmt: string, hopsList: Array, - totalFeesMsat: number, - totalAmtMsat: number, + totalFeesMsat: string, + totalAmtMsat: string, } } @@ -3521,8 +3521,8 @@ export class NodeInfo extends jspb.Message { getNumChannels(): number; setNumChannels(value: number): void; - getTotalCapacity(): number; - setTotalCapacity(value: number): void; + getTotalCapacity(): string; + setTotalCapacity(value: string): void; clearChannelsList(): void; getChannelsList(): Array; @@ -3543,7 +3543,7 @@ export namespace NodeInfo { export type AsObject = { node?: LightningNode.AsObject, numChannels: number, - totalCapacity: number, + totalCapacity: string, channelsList: Array, } } @@ -3617,20 +3617,20 @@ export class RoutingPolicy extends jspb.Message { getTimeLockDelta(): number; setTimeLockDelta(value: number): void; - getMinHtlc(): number; - setMinHtlc(value: number): void; + getMinHtlc(): string; + setMinHtlc(value: string): void; - getFeeBaseMsat(): number; - setFeeBaseMsat(value: number): void; + getFeeBaseMsat(): string; + setFeeBaseMsat(value: string): void; - getFeeRateMilliMsat(): number; - setFeeRateMilliMsat(value: number): void; + getFeeRateMilliMsat(): string; + setFeeRateMilliMsat(value: string): void; getDisabled(): boolean; setDisabled(value: boolean): void; - getMaxHtlcMsat(): number; - setMaxHtlcMsat(value: number): void; + getMaxHtlcMsat(): string; + setMaxHtlcMsat(value: string): void; getLastUpdate(): number; setLastUpdate(value: number): void; @@ -3648,11 +3648,11 @@ export class RoutingPolicy extends jspb.Message { export namespace RoutingPolicy { export type AsObject = { timeLockDelta: number, - minHtlc: number, - feeBaseMsat: number, - feeRateMilliMsat: number, + minHtlc: string, + feeBaseMsat: string, + feeRateMilliMsat: string, disabled: boolean, - maxHtlcMsat: number, + maxHtlcMsat: string, lastUpdate: number, } } @@ -3673,8 +3673,8 @@ export class ChannelEdge extends jspb.Message { getNode2Pub(): string; setNode2Pub(value: string): void; - getCapacity(): number; - setCapacity(value: number): void; + getCapacity(): string; + setCapacity(value: string): void; hasNode1Policy(): boolean; clearNode1Policy(): void; @@ -3703,7 +3703,7 @@ export namespace ChannelEdge { lastUpdate: number, node1Pub: string, node2Pub: string, - capacity: number, + capacity: string, node1Policy?: RoutingPolicy.AsObject, node2Policy?: RoutingPolicy.AsObject, } @@ -3874,23 +3874,23 @@ export class NetworkInfo extends jspb.Message { getNumChannels(): number; setNumChannels(value: number): void; - getTotalNetworkCapacity(): number; - setTotalNetworkCapacity(value: number): void; + getTotalNetworkCapacity(): string; + setTotalNetworkCapacity(value: string): void; getAvgChannelSize(): number; setAvgChannelSize(value: number): void; - getMinChannelSize(): number; - setMinChannelSize(value: number): void; + getMinChannelSize(): string; + setMinChannelSize(value: string): void; - getMaxChannelSize(): number; - setMaxChannelSize(value: number): void; + getMaxChannelSize(): string; + setMaxChannelSize(value: string): void; - getMedianChannelSizeSat(): number; - setMedianChannelSizeSat(value: number): void; + getMedianChannelSizeSat(): string; + setMedianChannelSizeSat(value: string): void; - getNumZombieChans(): number; - setNumZombieChans(value: number): void; + getNumZombieChans(): string; + setNumZombieChans(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): NetworkInfo.AsObject; @@ -3909,12 +3909,12 @@ export namespace NetworkInfo { maxOutDegree: number, numNodes: number, numChannels: number, - totalNetworkCapacity: number, + totalNetworkCapacity: string, avgChannelSize: number, - minChannelSize: number, - maxChannelSize: number, - medianChannelSizeSat: number, - numZombieChans: number, + minChannelSize: string, + maxChannelSize: string, + medianChannelSizeSat: string, + numZombieChans: string, } } @@ -4058,8 +4058,8 @@ export class ChannelEdgeUpdate extends jspb.Message { getChanPoint(): ChannelPoint | undefined; setChanPoint(value?: ChannelPoint): void; - getCapacity(): number; - setCapacity(value: number): void; + getCapacity(): string; + setCapacity(value: string): void; hasRoutingPolicy(): boolean; clearRoutingPolicy(): void; @@ -4086,7 +4086,7 @@ export namespace ChannelEdgeUpdate { export type AsObject = { chanId: string, chanPoint?: ChannelPoint.AsObject, - capacity: number, + capacity: string, routingPolicy?: RoutingPolicy.AsObject, advertisingNode: string, connectingNode: string, @@ -4097,8 +4097,8 @@ export class ClosedChannelUpdate extends jspb.Message { getChanId(): string; setChanId(value: string): void; - getCapacity(): number; - setCapacity(value: number): void; + getCapacity(): string; + setCapacity(value: string): void; getClosedHeight(): number; setClosedHeight(value: number): void; @@ -4121,7 +4121,7 @@ export class ClosedChannelUpdate extends jspb.Message { export namespace ClosedChannelUpdate { export type AsObject = { chanId: string, - capacity: number, + capacity: string, closedHeight: number, chanPoint?: ChannelPoint.AsObject, } @@ -4199,20 +4199,20 @@ export class Invoice extends jspb.Message { getRHash_asB64(): string; setRHash(value: Uint8Array | string): void; - getValue(): number; - setValue(value: number): void; + getValue(): string; + setValue(value: string): void; - getValueMsat(): number; - setValueMsat(value: number): void; + getValueMsat(): string; + setValueMsat(value: string): void; getSettled(): boolean; setSettled(value: boolean): void; - getCreationDate(): number; - setCreationDate(value: number): void; + getCreationDate(): string; + setCreationDate(value: string): void; - getSettleDate(): number; - setSettleDate(value: number): void; + getSettleDate(): string; + setSettleDate(value: string): void; getPaymentRequest(): string; setPaymentRequest(value: string): void; @@ -4222,14 +4222,14 @@ export class Invoice extends jspb.Message { getDescriptionHash_asB64(): string; setDescriptionHash(value: Uint8Array | string): void; - getExpiry(): number; - setExpiry(value: number): void; + getExpiry(): string; + setExpiry(value: string): void; getFallbackAddr(): string; setFallbackAddr(value: string): void; - getCltvExpiry(): number; - setCltvExpiry(value: number): void; + getCltvExpiry(): string; + setCltvExpiry(value: string): void; clearRouteHintsList(): void; getRouteHintsList(): Array; @@ -4239,20 +4239,20 @@ export class Invoice extends jspb.Message { getPrivate(): boolean; setPrivate(value: boolean): void; - getAddIndex(): number; - setAddIndex(value: number): void; + getAddIndex(): string; + setAddIndex(value: string): void; - getSettleIndex(): number; - setSettleIndex(value: number): void; + getSettleIndex(): string; + setSettleIndex(value: string): void; - getAmtPaid(): number; - setAmtPaid(value: number): void; + getAmtPaid(): string; + setAmtPaid(value: string): void; - getAmtPaidSat(): number; - setAmtPaidSat(value: number): void; + getAmtPaidSat(): string; + setAmtPaidSat(value: string): void; - getAmtPaidMsat(): number; - setAmtPaidMsat(value: number): void; + getAmtPaidMsat(): string; + setAmtPaidMsat(value: string): void; getState(): Invoice.InvoiceStateMap[keyof Invoice.InvoiceStateMap]; setState(value: Invoice.InvoiceStateMap[keyof Invoice.InvoiceStateMap]): void; @@ -4290,23 +4290,23 @@ export namespace Invoice { memo: string, rPreimage: Uint8Array | string, rHash: Uint8Array | string, - value: number, - valueMsat: number, + value: string, + valueMsat: string, settled: boolean, - creationDate: number, - settleDate: number, + creationDate: string, + settleDate: string, paymentRequest: string, descriptionHash: Uint8Array | string, - expiry: number, + expiry: string, fallbackAddr: string, - cltvExpiry: number, + cltvExpiry: string, routeHintsList: Array, pb_private: boolean, - addIndex: number, - settleIndex: number, - amtPaid: number, - amtPaidSat: number, - amtPaidMsat: number, + addIndex: string, + settleIndex: string, + amtPaid: string, + amtPaidSat: string, + amtPaidMsat: string, state: Invoice.InvoiceStateMap[keyof Invoice.InvoiceStateMap], htlcsList: Array, featuresMap: Array<[number, Feature.AsObject]>, @@ -4329,20 +4329,20 @@ export class InvoiceHTLC extends jspb.Message { getChanId(): string; setChanId(value: string): void; - getHtlcIndex(): number; - setHtlcIndex(value: number): void; + getHtlcIndex(): string; + setHtlcIndex(value: string): void; - getAmtMsat(): number; - setAmtMsat(value: number): void; + getAmtMsat(): string; + setAmtMsat(value: string): void; getAcceptHeight(): number; setAcceptHeight(value: number): void; - getAcceptTime(): number; - setAcceptTime(value: number): void; + getAcceptTime(): string; + setAcceptTime(value: string): void; - getResolveTime(): number; - setResolveTime(value: number): void; + getResolveTime(): string; + setResolveTime(value: string): void; getExpiryHeight(): number; setExpiryHeight(value: number): void; @@ -4352,8 +4352,8 @@ export class InvoiceHTLC extends jspb.Message { getCustomRecordsMap(): jspb.Map; clearCustomRecordsMap(): void; - getMppTotalAmtMsat(): number; - setMppTotalAmtMsat(value: number): void; + getMppTotalAmtMsat(): string; + setMppTotalAmtMsat(value: string): void; hasAmp(): boolean; clearAmp(): void; @@ -4373,15 +4373,15 @@ export class InvoiceHTLC extends jspb.Message { export namespace InvoiceHTLC { export type AsObject = { chanId: string, - htlcIndex: number, - amtMsat: number, + htlcIndex: string, + amtMsat: string, acceptHeight: number, - acceptTime: number, - resolveTime: number, + acceptTime: string, + resolveTime: string, expiryHeight: number, state: InvoiceHTLCStateMap[keyof InvoiceHTLCStateMap], customRecordsMap: Array<[number, Uint8Array | string]>, - mppTotalAmtMsat: number, + mppTotalAmtMsat: string, amp?: AMP.AsObject, } } @@ -4439,8 +4439,8 @@ export class AddInvoiceResponse extends jspb.Message { getPaymentRequest(): string; setPaymentRequest(value: string): void; - getAddIndex(): number; - setAddIndex(value: number): void; + getAddIndex(): string; + setAddIndex(value: string): void; getPaymentAddr(): Uint8Array | string; getPaymentAddr_asU8(): Uint8Array; @@ -4461,7 +4461,7 @@ export namespace AddInvoiceResponse { export type AsObject = { rHash: Uint8Array | string, paymentRequest: string, - addIndex: number, + addIndex: string, paymentAddr: Uint8Array | string, } } @@ -4496,11 +4496,11 @@ export class ListInvoiceRequest extends jspb.Message { getPendingOnly(): boolean; setPendingOnly(value: boolean): void; - getIndexOffset(): number; - setIndexOffset(value: number): void; + getIndexOffset(): string; + setIndexOffset(value: string): void; - getNumMaxInvoices(): number; - setNumMaxInvoices(value: number): void; + getNumMaxInvoices(): string; + setNumMaxInvoices(value: string): void; getReversed(): boolean; setReversed(value: boolean): void; @@ -4518,8 +4518,8 @@ export class ListInvoiceRequest extends jspb.Message { export namespace ListInvoiceRequest { export type AsObject = { pendingOnly: boolean, - indexOffset: number, - numMaxInvoices: number, + indexOffset: string, + numMaxInvoices: string, reversed: boolean, } } @@ -4530,11 +4530,11 @@ export class ListInvoiceResponse extends jspb.Message { setInvoicesList(value: Array): void; addInvoices(value?: Invoice, index?: number): Invoice; - getLastIndexOffset(): number; - setLastIndexOffset(value: number): void; + getLastIndexOffset(): string; + setLastIndexOffset(value: string): void; - getFirstIndexOffset(): number; - setFirstIndexOffset(value: number): void; + getFirstIndexOffset(): string; + setFirstIndexOffset(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListInvoiceResponse.AsObject; @@ -4549,17 +4549,17 @@ export class ListInvoiceResponse extends jspb.Message { export namespace ListInvoiceResponse { export type AsObject = { invoicesList: Array, - lastIndexOffset: number, - firstIndexOffset: number, + lastIndexOffset: string, + firstIndexOffset: string, } } export class InvoiceSubscription extends jspb.Message { - getAddIndex(): number; - setAddIndex(value: number): void; + getAddIndex(): string; + setAddIndex(value: string): void; - getSettleIndex(): number; - setSettleIndex(value: number): void; + getSettleIndex(): string; + setSettleIndex(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InvoiceSubscription.AsObject; @@ -4573,8 +4573,8 @@ export class InvoiceSubscription extends jspb.Message { export namespace InvoiceSubscription { export type AsObject = { - addIndex: number, - settleIndex: number, + addIndex: string, + settleIndex: string, } } @@ -4582,23 +4582,23 @@ export class Payment extends jspb.Message { getPaymentHash(): string; setPaymentHash(value: string): void; - getValue(): number; - setValue(value: number): void; + getValue(): string; + setValue(value: string): void; - getCreationDate(): number; - setCreationDate(value: number): void; + getCreationDate(): string; + setCreationDate(value: string): void; - getFee(): number; - setFee(value: number): void; + getFee(): string; + setFee(value: string): void; getPaymentPreimage(): string; setPaymentPreimage(value: string): void; - getValueSat(): number; - setValueSat(value: number): void; + getValueSat(): string; + setValueSat(value: string): void; - getValueMsat(): number; - setValueMsat(value: number): void; + getValueMsat(): string; + setValueMsat(value: string): void; getPaymentRequest(): string; setPaymentRequest(value: string): void; @@ -4606,22 +4606,22 @@ export class Payment extends jspb.Message { getStatus(): Payment.PaymentStatusMap[keyof Payment.PaymentStatusMap]; setStatus(value: Payment.PaymentStatusMap[keyof Payment.PaymentStatusMap]): void; - getFeeSat(): number; - setFeeSat(value: number): void; + getFeeSat(): string; + setFeeSat(value: string): void; - getFeeMsat(): number; - setFeeMsat(value: number): void; + getFeeMsat(): string; + setFeeMsat(value: string): void; - getCreationTimeNs(): number; - setCreationTimeNs(value: number): void; + getCreationTimeNs(): string; + setCreationTimeNs(value: string): void; clearHtlcsList(): void; getHtlcsList(): Array; setHtlcsList(value: Array): void; addHtlcs(value?: HTLCAttempt, index?: number): HTLCAttempt; - getPaymentIndex(): number; - setPaymentIndex(value: number): void; + getPaymentIndex(): string; + setPaymentIndex(value: string): void; getFailureReason(): PaymentFailureReasonMap[keyof PaymentFailureReasonMap]; setFailureReason(value: PaymentFailureReasonMap[keyof PaymentFailureReasonMap]): void; @@ -4639,19 +4639,19 @@ export class Payment extends jspb.Message { export namespace Payment { export type AsObject = { paymentHash: string, - value: number, - creationDate: number, - fee: number, + value: string, + creationDate: string, + fee: string, paymentPreimage: string, - valueSat: number, - valueMsat: number, + valueSat: string, + valueMsat: string, paymentRequest: string, status: Payment.PaymentStatusMap[keyof Payment.PaymentStatusMap], - feeSat: number, - feeMsat: number, - creationTimeNs: number, + feeSat: string, + feeMsat: string, + creationTimeNs: string, htlcsList: Array, - paymentIndex: number, + paymentIndex: string, failureReason: PaymentFailureReasonMap[keyof PaymentFailureReasonMap], } @@ -4666,8 +4666,8 @@ export namespace Payment { } export class HTLCAttempt extends jspb.Message { - getAttemptId(): number; - setAttemptId(value: number): void; + getAttemptId(): string; + setAttemptId(value: string): void; getStatus(): HTLCAttempt.HTLCStatusMap[keyof HTLCAttempt.HTLCStatusMap]; setStatus(value: HTLCAttempt.HTLCStatusMap[keyof HTLCAttempt.HTLCStatusMap]): void; @@ -4677,11 +4677,11 @@ export class HTLCAttempt extends jspb.Message { getRoute(): Route | undefined; setRoute(value?: Route): void; - getAttemptTimeNs(): number; - setAttemptTimeNs(value: number): void; + getAttemptTimeNs(): string; + setAttemptTimeNs(value: string): void; - getResolveTimeNs(): number; - setResolveTimeNs(value: number): void; + getResolveTimeNs(): string; + setResolveTimeNs(value: string): void; hasFailure(): boolean; clearFailure(): void; @@ -4705,11 +4705,11 @@ export class HTLCAttempt extends jspb.Message { export namespace HTLCAttempt { export type AsObject = { - attemptId: number, + attemptId: string, status: HTLCAttempt.HTLCStatusMap[keyof HTLCAttempt.HTLCStatusMap], route?: Route.AsObject, - attemptTimeNs: number, - resolveTimeNs: number, + attemptTimeNs: string, + resolveTimeNs: string, failure?: Failure.AsObject, preimage: Uint8Array | string, } @@ -4727,11 +4727,11 @@ export class ListPaymentsRequest extends jspb.Message { getIncludeIncomplete(): boolean; setIncludeIncomplete(value: boolean): void; - getIndexOffset(): number; - setIndexOffset(value: number): void; + getIndexOffset(): string; + setIndexOffset(value: string): void; - getMaxPayments(): number; - setMaxPayments(value: number): void; + getMaxPayments(): string; + setMaxPayments(value: string): void; getReversed(): boolean; setReversed(value: boolean): void; @@ -4749,8 +4749,8 @@ export class ListPaymentsRequest extends jspb.Message { export namespace ListPaymentsRequest { export type AsObject = { includeIncomplete: boolean, - indexOffset: number, - maxPayments: number, + indexOffset: string, + maxPayments: string, reversed: boolean, } } @@ -4761,11 +4761,11 @@ export class ListPaymentsResponse extends jspb.Message { setPaymentsList(value: Array): void; addPayments(value?: Payment, index?: number): Payment; - getFirstIndexOffset(): number; - setFirstIndexOffset(value: number): void; + getFirstIndexOffset(): string; + setFirstIndexOffset(value: string): void; - getLastIndexOffset(): number; - setLastIndexOffset(value: number): void; + getLastIndexOffset(): string; + setLastIndexOffset(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListPaymentsResponse.AsObject; @@ -4780,8 +4780,8 @@ export class ListPaymentsResponse extends jspb.Message { export namespace ListPaymentsResponse { export type AsObject = { paymentsList: Array, - firstIndexOffset: number, - lastIndexOffset: number, + firstIndexOffset: string, + lastIndexOffset: string, } } @@ -4938,14 +4938,14 @@ export class PayReq extends jspb.Message { getPaymentHash(): string; setPaymentHash(value: string): void; - getNumSatoshis(): number; - setNumSatoshis(value: number): void; + getNumSatoshis(): string; + setNumSatoshis(value: string): void; - getTimestamp(): number; - setTimestamp(value: number): void; + getTimestamp(): string; + setTimestamp(value: string): void; - getExpiry(): number; - setExpiry(value: number): void; + getExpiry(): string; + setExpiry(value: string): void; getDescription(): string; setDescription(value: string): void; @@ -4956,8 +4956,8 @@ export class PayReq extends jspb.Message { getFallbackAddr(): string; setFallbackAddr(value: string): void; - getCltvExpiry(): number; - setCltvExpiry(value: number): void; + getCltvExpiry(): string; + setCltvExpiry(value: string): void; clearRouteHintsList(): void; getRouteHintsList(): Array; @@ -4969,8 +4969,8 @@ export class PayReq extends jspb.Message { getPaymentAddr_asB64(): string; setPaymentAddr(value: Uint8Array | string): void; - getNumMsat(): number; - setNumMsat(value: number): void; + getNumMsat(): string; + setNumMsat(value: string): void; getFeaturesMap(): jspb.Map; clearFeaturesMap(): void; @@ -4988,16 +4988,16 @@ export namespace PayReq { export type AsObject = { destination: string, paymentHash: string, - numSatoshis: number, - timestamp: number, - expiry: number, + numSatoshis: string, + timestamp: string, + expiry: string, description: string, descriptionHash: string, fallbackAddr: string, - cltvExpiry: number, + cltvExpiry: string, routeHintsList: Array, paymentAddr: Uint8Array | string, - numMsat: number, + numMsat: string, featuresMap: Array<[number, Feature.AsObject]>, } } @@ -5053,11 +5053,11 @@ export class ChannelFeeReport extends jspb.Message { getChannelPoint(): string; setChannelPoint(value: string): void; - getBaseFeeMsat(): number; - setBaseFeeMsat(value: number): void; + getBaseFeeMsat(): string; + setBaseFeeMsat(value: string): void; - getFeePerMil(): number; - setFeePerMil(value: number): void; + getFeePerMil(): string; + setFeePerMil(value: string): void; getFeeRate(): number; setFeeRate(value: number): void; @@ -5076,8 +5076,8 @@ export namespace ChannelFeeReport { export type AsObject = { chanId: string, channelPoint: string, - baseFeeMsat: number, - feePerMil: number, + baseFeeMsat: string, + feePerMil: string, feeRate: number, } } @@ -5088,14 +5088,14 @@ export class FeeReportResponse extends jspb.Message { setChannelFeesList(value: Array): void; addChannelFees(value?: ChannelFeeReport, index?: number): ChannelFeeReport; - getDayFeeSum(): number; - setDayFeeSum(value: number): void; + getDayFeeSum(): string; + setDayFeeSum(value: string): void; - getWeekFeeSum(): number; - setWeekFeeSum(value: number): void; + getWeekFeeSum(): string; + setWeekFeeSum(value: string): void; - getMonthFeeSum(): number; - setMonthFeeSum(value: number): void; + getMonthFeeSum(): string; + setMonthFeeSum(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FeeReportResponse.AsObject; @@ -5110,9 +5110,9 @@ export class FeeReportResponse extends jspb.Message { export namespace FeeReportResponse { export type AsObject = { channelFeesList: Array, - dayFeeSum: number, - weekFeeSum: number, - monthFeeSum: number, + dayFeeSum: string, + weekFeeSum: string, + monthFeeSum: string, } } @@ -5127,8 +5127,8 @@ export class PolicyUpdateRequest extends jspb.Message { getChanPoint(): ChannelPoint | undefined; setChanPoint(value?: ChannelPoint): void; - getBaseFeeMsat(): number; - setBaseFeeMsat(value: number): void; + getBaseFeeMsat(): string; + setBaseFeeMsat(value: string): void; getFeeRate(): number; setFeeRate(value: number): void; @@ -5136,11 +5136,11 @@ export class PolicyUpdateRequest extends jspb.Message { getTimeLockDelta(): number; setTimeLockDelta(value: number): void; - getMaxHtlcMsat(): number; - setMaxHtlcMsat(value: number): void; + getMaxHtlcMsat(): string; + setMaxHtlcMsat(value: string): void; - getMinHtlcMsat(): number; - setMinHtlcMsat(value: number): void; + getMinHtlcMsat(): string; + setMinHtlcMsat(value: string): void; getMinHtlcMsatSpecified(): boolean; setMinHtlcMsatSpecified(value: boolean): void; @@ -5160,11 +5160,11 @@ export namespace PolicyUpdateRequest { export type AsObject = { global: boolean, chanPoint?: ChannelPoint.AsObject, - baseFeeMsat: number, + baseFeeMsat: string, feeRate: number, timeLockDelta: number, - maxHtlcMsat: number, - minHtlcMsat: number, + maxHtlcMsat: string, + minHtlcMsat: string, minHtlcMsatSpecified: boolean, } @@ -5192,11 +5192,11 @@ export namespace PolicyUpdateResponse { } export class ForwardingHistoryRequest extends jspb.Message { - getStartTime(): number; - setStartTime(value: number): void; + getStartTime(): string; + setStartTime(value: string): void; - getEndTime(): number; - setEndTime(value: number): void; + getEndTime(): string; + setEndTime(value: string): void; getIndexOffset(): number; setIndexOffset(value: number): void; @@ -5216,16 +5216,16 @@ export class ForwardingHistoryRequest extends jspb.Message { export namespace ForwardingHistoryRequest { export type AsObject = { - startTime: number, - endTime: number, + startTime: string, + endTime: string, indexOffset: number, numMaxEvents: number, } } export class ForwardingEvent extends jspb.Message { - getTimestamp(): number; - setTimestamp(value: number): void; + getTimestamp(): string; + setTimestamp(value: string): void; getChanIdIn(): string; setChanIdIn(value: string): void; @@ -5233,26 +5233,26 @@ export class ForwardingEvent extends jspb.Message { getChanIdOut(): string; setChanIdOut(value: string): void; - getAmtIn(): number; - setAmtIn(value: number): void; + getAmtIn(): string; + setAmtIn(value: string): void; - getAmtOut(): number; - setAmtOut(value: number): void; + getAmtOut(): string; + setAmtOut(value: string): void; - getFee(): number; - setFee(value: number): void; + getFee(): string; + setFee(value: string): void; - getFeeMsat(): number; - setFeeMsat(value: number): void; + getFeeMsat(): string; + setFeeMsat(value: string): void; - getAmtInMsat(): number; - setAmtInMsat(value: number): void; + getAmtInMsat(): string; + setAmtInMsat(value: string): void; - getAmtOutMsat(): number; - setAmtOutMsat(value: number): void; + getAmtOutMsat(): string; + setAmtOutMsat(value: string): void; - getTimestampNs(): number; - setTimestampNs(value: number): void; + getTimestampNs(): string; + setTimestampNs(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ForwardingEvent.AsObject; @@ -5266,16 +5266,16 @@ export class ForwardingEvent extends jspb.Message { export namespace ForwardingEvent { export type AsObject = { - timestamp: number, + timestamp: string, chanIdIn: string, chanIdOut: string, - amtIn: number, - amtOut: number, - fee: number, - feeMsat: number, - amtInMsat: number, - amtOutMsat: number, - timestampNs: number, + amtIn: string, + amtOut: string, + fee: string, + feeMsat: string, + amtInMsat: string, + amtOutMsat: string, + timestampNs: string, } } @@ -5564,8 +5564,8 @@ export class BakeMacaroonRequest extends jspb.Message { setPermissionsList(value: Array): void; addPermissions(value?: MacaroonPermission, index?: number): MacaroonPermission; - getRootKeyId(): number; - setRootKeyId(value: number): void; + getRootKeyId(): string; + setRootKeyId(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BakeMacaroonRequest.AsObject; @@ -5580,7 +5580,7 @@ export class BakeMacaroonRequest extends jspb.Message { export namespace BakeMacaroonRequest { export type AsObject = { permissionsList: Array, - rootKeyId: number, + rootKeyId: string, } } @@ -5622,9 +5622,9 @@ export namespace ListMacaroonIDsRequest { export class ListMacaroonIDsResponse extends jspb.Message { clearRootKeyIdsList(): void; - getRootKeyIdsList(): Array; - setRootKeyIdsList(value: Array): void; - addRootKeyIds(value: number, index?: number): number; + getRootKeyIdsList(): Array; + setRootKeyIdsList(value: Array): void; + addRootKeyIds(value: string, index?: number): string; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListMacaroonIDsResponse.AsObject; @@ -5638,13 +5638,13 @@ export class ListMacaroonIDsResponse extends jspb.Message { export namespace ListMacaroonIDsResponse { export type AsObject = { - rootKeyIdsList: Array, + rootKeyIdsList: Array, } } export class DeleteMacaroonIDRequest extends jspb.Message { - getRootKeyId(): number; - setRootKeyId(value: number): void; + getRootKeyId(): string; + setRootKeyId(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DeleteMacaroonIDRequest.AsObject; @@ -5658,7 +5658,7 @@ export class DeleteMacaroonIDRequest extends jspb.Message { export namespace DeleteMacaroonIDRequest { export type AsObject = { - rootKeyId: number, + rootKeyId: string, } } @@ -5748,8 +5748,8 @@ export class Failure extends jspb.Message { getChannelUpdate(): ChannelUpdate | undefined; setChannelUpdate(value?: ChannelUpdate): void; - getHtlcMsat(): number; - setHtlcMsat(value: number): void; + getHtlcMsat(): string; + setHtlcMsat(value: string): void; getOnionSha256(): Uint8Array | string; getOnionSha256_asU8(): Uint8Array; @@ -5782,7 +5782,7 @@ export namespace Failure { export type AsObject = { code: Failure.FailureCodeMap[keyof Failure.FailureCodeMap], channelUpdate?: ChannelUpdate.AsObject, - htlcMsat: number, + htlcMsat: string, onionSha256: Uint8Array | string, cltvExpiry: number, flags: number, @@ -5850,8 +5850,8 @@ export class ChannelUpdate extends jspb.Message { getTimeLockDelta(): number; setTimeLockDelta(value: number): void; - getHtlcMinimumMsat(): number; - setHtlcMinimumMsat(value: number): void; + getHtlcMinimumMsat(): string; + setHtlcMinimumMsat(value: string): void; getBaseFee(): number; setBaseFee(value: number): void; @@ -5859,8 +5859,8 @@ export class ChannelUpdate extends jspb.Message { getFeeRate(): number; setFeeRate(value: number): void; - getHtlcMaximumMsat(): number; - setHtlcMaximumMsat(value: number): void; + getHtlcMaximumMsat(): string; + setHtlcMaximumMsat(value: string): void; getExtraOpaqueData(): Uint8Array | string; getExtraOpaqueData_asU8(): Uint8Array; @@ -5886,10 +5886,10 @@ export namespace ChannelUpdate { messageFlags: number, channelFlags: number, timeLockDelta: number, - htlcMinimumMsat: number, + htlcMinimumMsat: string, baseFee: number, feeRate: number, - htlcMaximumMsat: number, + htlcMaximumMsat: string, extraOpaqueData: Uint8Array | string, } } diff --git a/app/src/types/generated/lnd_pb.js b/app/src/types/generated/lnd_pb.js index 1a358a3a..c84381b8 100644 --- a/app/src/types/generated/lnd_pb.js +++ b/app/src/types/generated/lnd_pb.js @@ -252,10 +252,10 @@ proto.lnrpc.Utxo.toObject = function(includeInstance, msg) { var f, obj = { addressType: jspb.Message.getFieldWithDefault(msg, 1, 0), address: jspb.Message.getFieldWithDefault(msg, 2, ""), - amountSat: jspb.Message.getFieldWithDefault(msg, 3, 0), + amountSat: jspb.Message.getFieldWithDefault(msg, 3, "0"), pkScript: jspb.Message.getFieldWithDefault(msg, 4, ""), outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), - confirmations: jspb.Message.getFieldWithDefault(msg, 6, 0) + confirmations: jspb.Message.getFieldWithDefault(msg, 6, "0") }; if (includeInstance) { @@ -301,7 +301,7 @@ proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { msg.setAddress(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmountSat(value); break; case 4: @@ -314,7 +314,7 @@ proto.lnrpc.Utxo.deserializeBinaryFromReader = function(msg, reader) { msg.setOutpoint(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setConfirmations(value); break; default: @@ -361,8 +361,8 @@ proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmountSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -383,8 +383,8 @@ proto.lnrpc.Utxo.serializeBinaryToWriter = function(message, writer) { ); } f = message.getConfirmations(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -424,16 +424,16 @@ proto.lnrpc.Utxo.prototype.setAddress = function(value) { /** * optional int64 amount_sat = 3; - * @return {number} + * @return {string} */ proto.lnrpc.Utxo.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Utxo.prototype.setAmountSat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -484,16 +484,16 @@ proto.lnrpc.Utxo.prototype.hasOutpoint = function() { /** * optional int64 confirmations = 6; - * @return {number} + * @return {string} */ proto.lnrpc.Utxo.prototype.getConfirmations = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Utxo.prototype.setConfirmations = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -552,12 +552,12 @@ proto.lnrpc.Transaction.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.Transaction.toObject = function(includeInstance, msg) { var f, obj = { txHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + amount: jspb.Message.getFieldWithDefault(msg, 2, "0"), numConfirmations: jspb.Message.getFieldWithDefault(msg, 3, 0), blockHash: jspb.Message.getFieldWithDefault(msg, 4, ""), blockHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeStamp: jspb.Message.getFieldWithDefault(msg, 6, 0), - totalFees: jspb.Message.getFieldWithDefault(msg, 7, 0), + timeStamp: jspb.Message.getFieldWithDefault(msg, 6, "0"), + totalFees: jspb.Message.getFieldWithDefault(msg, 7, "0"), destAddressesList: jspb.Message.getRepeatedField(msg, 8), rawTxHex: jspb.Message.getFieldWithDefault(msg, 9, ""), label: jspb.Message.getFieldWithDefault(msg, 10, "") @@ -602,7 +602,7 @@ proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { msg.setTxHash(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmount(value); break; case 3: @@ -618,11 +618,11 @@ proto.lnrpc.Transaction.deserializeBinaryFromReader = function(msg, reader) { msg.setBlockHeight(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTimeStamp(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalFees(value); break; case 8: @@ -674,8 +674,8 @@ proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -702,15 +702,15 @@ proto.lnrpc.Transaction.serializeBinaryToWriter = function(message, writer) { ); } f = message.getTimeStamp(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); } f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); @@ -756,16 +756,16 @@ proto.lnrpc.Transaction.prototype.setTxHash = function(value) { /** * optional int64 amount = 2; - * @return {number} + * @return {string} */ proto.lnrpc.Transaction.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Transaction.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -816,31 +816,31 @@ proto.lnrpc.Transaction.prototype.setBlockHeight = function(value) { /** * optional int64 time_stamp = 6; - * @return {number} + * @return {string} */ proto.lnrpc.Transaction.prototype.getTimeStamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Transaction.prototype.setTimeStamp = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional int64 total_fees = 7; - * @return {number} + * @return {string} */ proto.lnrpc.Transaction.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Transaction.prototype.setTotalFees = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -1341,9 +1341,9 @@ proto.lnrpc.FeeLimit.prototype.toObject = function(opt_includeInstance) { */ proto.lnrpc.FeeLimit.toObject = function(includeInstance, msg) { var f, obj = { - fixed: jspb.Message.getFieldWithDefault(msg, 1, 0), - fixedMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - percent: jspb.Message.getFieldWithDefault(msg, 2, 0) + fixed: jspb.Message.getFieldWithDefault(msg, 1, "0"), + fixedMsat: jspb.Message.getFieldWithDefault(msg, 3, "0"), + percent: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -1381,15 +1381,15 @@ proto.lnrpc.FeeLimit.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFixed(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFixedMsat(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setPercent(value); break; default: @@ -1421,23 +1421,23 @@ proto.lnrpc.FeeLimit.prototype.serializeBinary = function() { */ proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeInt64( + writer.writeInt64String( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); + f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { - writer.writeInt64( + writer.writeInt64String( 3, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeInt64( + writer.writeInt64String( 2, f ); @@ -1447,14 +1447,14 @@ proto.lnrpc.FeeLimit.serializeBinaryToWriter = function(message, writer) { /** * optional int64 fixed = 1; - * @return {number} + * @return {string} */ proto.lnrpc.FeeLimit.prototype.getFixed = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.FeeLimit.prototype.setFixed = function(value) { jspb.Message.setOneofField(this, 1, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; @@ -1476,14 +1476,14 @@ proto.lnrpc.FeeLimit.prototype.hasFixed = function() { /** * optional int64 fixed_msat = 3; - * @return {number} + * @return {string} */ proto.lnrpc.FeeLimit.prototype.getFixedMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.FeeLimit.prototype.setFixedMsat = function(value) { jspb.Message.setOneofField(this, 3, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; @@ -1505,14 +1505,14 @@ proto.lnrpc.FeeLimit.prototype.hasFixedMsat = function() { /** * optional int64 percent = 2; - * @return {number} + * @return {string} */ proto.lnrpc.FeeLimit.prototype.getPercent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.FeeLimit.prototype.setPercent = function(value) { jspb.Message.setOneofField(this, 2, proto.lnrpc.FeeLimit.oneofGroups_[0], value); }; @@ -1588,8 +1588,8 @@ proto.lnrpc.SendRequest.toObject = function(includeInstance, msg) { var f, obj = { dest: msg.getDest_asB64(), destString: jspb.Message.getFieldWithDefault(msg, 2, ""), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), + amt: jspb.Message.getFieldWithDefault(msg, 3, "0"), + amtMsat: jspb.Message.getFieldWithDefault(msg, 12, "0"), paymentHash: msg.getPaymentHash_asB64(), paymentHashString: jspb.Message.getFieldWithDefault(msg, 5, ""), paymentRequest: jspb.Message.getFieldWithDefault(msg, 6, ""), @@ -1647,11 +1647,11 @@ proto.lnrpc.SendRequest.deserializeBinaryFromReader = function(msg, reader) { msg.setDestString(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 12: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtMsat(value); break; case 4: @@ -1749,15 +1749,15 @@ proto.lnrpc.SendRequest.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 12, f ); @@ -1903,31 +1903,31 @@ proto.lnrpc.SendRequest.prototype.setDestString = function(value) { /** * optional int64 amt = 3; - * @return {number} + * @return {string} */ proto.lnrpc.SendRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 amt_msat = 12; - * @return {number} + * @return {string} */ proto.lnrpc.SendRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendRequest.prototype.setAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + jspb.Message.setProto3StringIntField(this, 12, value); }; @@ -2792,13 +2792,13 @@ proto.lnrpc.ChannelAcceptRequest.toObject = function(includeInstance, msg) { nodePubkey: msg.getNodePubkey_asB64(), chainHash: msg.getChainHash_asB64(), pendingChanId: msg.getPendingChanId_asB64(), - fundingAmt: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushAmt: jspb.Message.getFieldWithDefault(msg, 5, 0), - dustLimit: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxValueInFlight: jspb.Message.getFieldWithDefault(msg, 7, 0), - channelReserve: jspb.Message.getFieldWithDefault(msg, 8, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), + fundingAmt: jspb.Message.getFieldWithDefault(msg, 4, "0"), + pushAmt: jspb.Message.getFieldWithDefault(msg, 5, "0"), + dustLimit: jspb.Message.getFieldWithDefault(msg, 6, "0"), + maxValueInFlight: jspb.Message.getFieldWithDefault(msg, 7, "0"), + channelReserve: jspb.Message.getFieldWithDefault(msg, 8, "0"), + minHtlc: jspb.Message.getFieldWithDefault(msg, 9, "0"), + feePerKw: jspb.Message.getFieldWithDefault(msg, 10, "0"), csvDelay: jspb.Message.getFieldWithDefault(msg, 11, 0), maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 12, 0), channelFlags: jspb.Message.getFieldWithDefault(msg, 13, 0) @@ -2851,31 +2851,31 @@ proto.lnrpc.ChannelAcceptRequest.deserializeBinaryFromReader = function(msg, rea msg.setPendingChanId(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFundingAmt(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setPushAmt(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setDustLimit(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxValueInFlight(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setChannelReserve(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinHtlc(value); break; case 10: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeePerKw(value); break; case 11: @@ -2941,50 +2941,50 @@ proto.lnrpc.ChannelAcceptRequest.serializeBinaryToWriter = function(message, wri ); } f = message.getFundingAmt(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getPushAmt(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getDustLimit(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getMaxValueInFlight(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); } f = message.getChannelReserve(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 8, f ); } f = message.getMinHtlc(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); } f = message.getFeePerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 10, f ); @@ -3132,106 +3132,106 @@ proto.lnrpc.ChannelAcceptRequest.prototype.setPendingChanId = function(value) { /** * optional uint64 funding_amt = 4; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getFundingAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setFundingAmt = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 push_amt = 5; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getPushAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setPushAmt = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional uint64 dust_limit = 6; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getDustLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setDustLimit = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 max_value_in_flight = 7; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getMaxValueInFlight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setMaxValueInFlight = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional uint64 channel_reserve = 8; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getChannelReserve = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setChannelReserve = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional uint64 min_htlc = 9; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getMinHtlc = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setMinHtlc = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; /** * optional uint64 fee_per_kw = 10; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptRequest.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptRequest.prototype.setFeePerKw = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; @@ -3332,10 +3332,10 @@ proto.lnrpc.ChannelAcceptResponse.toObject = function(includeInstance, msg) { error: jspb.Message.getFieldWithDefault(msg, 3, ""), upfrontShutdown: jspb.Message.getFieldWithDefault(msg, 4, ""), csvDelay: jspb.Message.getFieldWithDefault(msg, 5, 0), - reserveSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - inFlightMaxMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + reserveSat: jspb.Message.getFieldWithDefault(msg, 6, "0"), + inFlightMaxMsat: jspb.Message.getFieldWithDefault(msg, 7, "0"), maxHtlcCount: jspb.Message.getFieldWithDefault(msg, 8, 0), - minHtlcIn: jspb.Message.getFieldWithDefault(msg, 9, 0), + minHtlcIn: jspb.Message.getFieldWithDefault(msg, 9, "0"), minAcceptDepth: jspb.Message.getFieldWithDefault(msg, 10, 0) }; @@ -3394,11 +3394,11 @@ proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, re msg.setCsvDelay(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setReserveSat(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setInFlightMaxMsat(value); break; case 8: @@ -3406,7 +3406,7 @@ proto.lnrpc.ChannelAcceptResponse.deserializeBinaryFromReader = function(msg, re msg.setMaxHtlcCount(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinHtlcIn(value); break; case 10: @@ -3478,15 +3478,15 @@ proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, wr ); } f = message.getReserveSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getInFlightMaxMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -3499,8 +3499,8 @@ proto.lnrpc.ChannelAcceptResponse.serializeBinaryToWriter = function(message, wr ); } f = message.getMinHtlcIn(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); @@ -3618,31 +3618,31 @@ proto.lnrpc.ChannelAcceptResponse.prototype.setCsvDelay = function(value) { /** * optional uint64 reserve_sat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptResponse.prototype.getReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptResponse.prototype.setReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 in_flight_max_msat = 7; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptResponse.prototype.getInFlightMaxMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptResponse.prototype.setInFlightMaxMsat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -3663,16 +3663,16 @@ proto.lnrpc.ChannelAcceptResponse.prototype.setMaxHtlcCount = function(value) { /** * optional uint64 min_htlc_in = 9; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelAcceptResponse.prototype.getMinHtlcIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelAcceptResponse.prototype.setMinHtlcIn = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -4628,9 +4628,9 @@ proto.lnrpc.EstimateFeeResponse.prototype.toObject = function(opt_includeInstanc */ proto.lnrpc.EstimateFeeResponse.toObject = function(includeInstance, msg) { var f, obj = { - feeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - feerateSatPerByte: jspb.Message.getFieldWithDefault(msg, 2, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 3, 0) + feeSat: jspb.Message.getFieldWithDefault(msg, 1, "0"), + feerateSatPerByte: jspb.Message.getFieldWithDefault(msg, 2, "0"), + satPerVbyte: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -4668,15 +4668,15 @@ proto.lnrpc.EstimateFeeResponse.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeeSat(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeerateSatPerByte(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSatPerVbyte(value); break; default: @@ -4709,22 +4709,22 @@ proto.lnrpc.EstimateFeeResponse.prototype.serializeBinary = function() { proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFeeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getFeerateSatPerByte(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -4734,46 +4734,46 @@ proto.lnrpc.EstimateFeeResponse.serializeBinaryToWriter = function(message, writ /** * optional int64 fee_sat = 1; - * @return {number} + * @return {string} */ proto.lnrpc.EstimateFeeResponse.prototype.getFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.EstimateFeeResponse.prototype.setFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 feerate_sat_per_byte = 2; - * @return {number} + * @return {string} */ proto.lnrpc.EstimateFeeResponse.prototype.getFeerateSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.EstimateFeeResponse.prototype.setFeerateSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 sat_per_vbyte = 3; - * @return {number} + * @return {string} */ proto.lnrpc.EstimateFeeResponse.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.EstimateFeeResponse.prototype.setSatPerVbyte = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -4826,8 +4826,8 @@ proto.lnrpc.SendManyRequest.toObject = function(includeInstance, msg) { var f, obj = { addrtoamountMap: (f = msg.getAddrtoamountMap()) ? f.toObject(includeInstance, undefined) : [], targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), + satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, "0"), + satPerByte: jspb.Message.getFieldWithDefault(msg, 5, "0"), label: jspb.Message.getFieldWithDefault(msg, 6, ""), minConfs: jspb.Message.getFieldWithDefault(msg, 7, 0), spendUnconfirmed: jspb.Message.getFieldWithDefault(msg, 8, false) @@ -4878,11 +4878,11 @@ proto.lnrpc.SendManyRequest.deserializeBinaryFromReader = function(msg, reader) msg.setTargetConf(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSatPerVbyte(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSatPerByte(value); break; case 6: @@ -4938,15 +4938,15 @@ proto.lnrpc.SendManyRequest.serializeBinaryToWriter = function(message, writer) ); } f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); @@ -5010,31 +5010,31 @@ proto.lnrpc.SendManyRequest.prototype.setTargetConf = function(value) { /** * optional uint64 sat_per_vbyte = 4; - * @return {number} + * @return {string} */ proto.lnrpc.SendManyRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendManyRequest.prototype.setSatPerVbyte = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 sat_per_byte = 5; - * @return {number} + * @return {string} */ proto.lnrpc.SendManyRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendManyRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -5275,10 +5275,10 @@ proto.lnrpc.SendCoinsRequest.prototype.toObject = function(opt_includeInstance) proto.lnrpc.SendCoinsRequest.toObject = function(includeInstance, msg) { var f, obj = { addr: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + amount: jspb.Message.getFieldWithDefault(msg, 2, "0"), targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 5, 0), + satPerVbyte: jspb.Message.getFieldWithDefault(msg, 4, "0"), + satPerByte: jspb.Message.getFieldWithDefault(msg, 5, "0"), sendAll: jspb.Message.getFieldWithDefault(msg, 6, false), label: jspb.Message.getFieldWithDefault(msg, 7, ""), minConfs: jspb.Message.getFieldWithDefault(msg, 8, 0), @@ -5324,7 +5324,7 @@ proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) msg.setAddr(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmount(value); break; case 3: @@ -5332,11 +5332,11 @@ proto.lnrpc.SendCoinsRequest.deserializeBinaryFromReader = function(msg, reader) msg.setTargetConf(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSatPerVbyte(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSatPerByte(value); break; case 6: @@ -5392,8 +5392,8 @@ proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) ); } f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -5406,15 +5406,15 @@ proto.lnrpc.SendCoinsRequest.serializeBinaryToWriter = function(message, writer) ); } f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); @@ -5467,16 +5467,16 @@ proto.lnrpc.SendCoinsRequest.prototype.setAddr = function(value) { /** * optional int64 amount = 2; - * @return {number} + * @return {string} */ proto.lnrpc.SendCoinsRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendCoinsRequest.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -5497,31 +5497,31 @@ proto.lnrpc.SendCoinsRequest.prototype.setTargetConf = function(value) { /** * optional uint64 sat_per_vbyte = 4; - * @return {number} + * @return {string} */ proto.lnrpc.SendCoinsRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendCoinsRequest.prototype.setSatPerVbyte = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 sat_per_byte = 5; - * @return {number} + * @return {string} */ proto.lnrpc.SendCoinsRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.SendCoinsRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -7127,7 +7127,7 @@ proto.lnrpc.ConnectPeerRequest.toObject = function(includeInstance, msg) { var f, obj = { addr: (f = msg.getAddr()) && proto.lnrpc.LightningAddress.toObject(includeInstance, f), perm: jspb.Message.getFieldWithDefault(msg, 2, false), - timeout: jspb.Message.getFieldWithDefault(msg, 3, 0) + timeout: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -7174,7 +7174,7 @@ proto.lnrpc.ConnectPeerRequest.deserializeBinaryFromReader = function(msg, reade msg.setPerm(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTimeout(value); break; default: @@ -7222,8 +7222,8 @@ proto.lnrpc.ConnectPeerRequest.serializeBinaryToWriter = function(message, write ); } f = message.getTimeout(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -7280,16 +7280,16 @@ proto.lnrpc.ConnectPeerRequest.prototype.setPerm = function(value) { /** * optional uint64 timeout = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ConnectPeerRequest.prototype.getTimeout = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ConnectPeerRequest.prototype.setTimeout = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -7715,12 +7715,12 @@ proto.lnrpc.HTLC.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.HTLC.toObject = function(includeInstance, msg) { var f, obj = { incoming: jspb.Message.getFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + amount: jspb.Message.getFieldWithDefault(msg, 2, "0"), hashLock: msg.getHashLock_asB64(), expirationHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - htlcIndex: jspb.Message.getFieldWithDefault(msg, 5, 0), - forwardingChannel: jspb.Message.getFieldWithDefault(msg, 6, 0), - forwardingHtlcIndex: jspb.Message.getFieldWithDefault(msg, 7, 0) + htlcIndex: jspb.Message.getFieldWithDefault(msg, 5, "0"), + forwardingChannel: jspb.Message.getFieldWithDefault(msg, 6, "0"), + forwardingHtlcIndex: jspb.Message.getFieldWithDefault(msg, 7, "0") }; if (includeInstance) { @@ -7762,7 +7762,7 @@ proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { msg.setIncoming(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmount(value); break; case 3: @@ -7774,15 +7774,15 @@ proto.lnrpc.HTLC.deserializeBinaryFromReader = function(msg, reader) { msg.setExpirationHeight(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setHtlcIndex(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setForwardingChannel(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setForwardingHtlcIndex(value); break; default: @@ -7822,8 +7822,8 @@ proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -7843,22 +7843,22 @@ proto.lnrpc.HTLC.serializeBinaryToWriter = function(message, writer) { ); } f = message.getHtlcIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getForwardingChannel(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getForwardingHtlcIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -7885,16 +7885,16 @@ proto.lnrpc.HTLC.prototype.setIncoming = function(value) { /** * optional int64 amount = 2; - * @return {number} + * @return {string} */ proto.lnrpc.HTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLC.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -7954,46 +7954,46 @@ proto.lnrpc.HTLC.prototype.setExpirationHeight = function(value) { /** * optional uint64 htlc_index = 5; - * @return {number} + * @return {string} */ proto.lnrpc.HTLC.prototype.getHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLC.prototype.setHtlcIndex = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional uint64 forwarding_channel = 6; - * @return {number} + * @return {string} */ proto.lnrpc.HTLC.prototype.getForwardingChannel = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLC.prototype.setForwardingChannel = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 forwarding_htlc_index = 7; - * @return {number} + * @return {string} */ proto.lnrpc.HTLC.prototype.getForwardingHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLC.prototype.setForwardingHtlcIndex = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -8045,10 +8045,10 @@ proto.lnrpc.ChannelConstraints.prototype.toObject = function(opt_includeInstance proto.lnrpc.ChannelConstraints.toObject = function(includeInstance, msg) { var f, obj = { csvDelay: jspb.Message.getFieldWithDefault(msg, 1, 0), - chanReserveSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - dustLimitSat: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxPendingAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), + chanReserveSat: jspb.Message.getFieldWithDefault(msg, 2, "0"), + dustLimitSat: jspb.Message.getFieldWithDefault(msg, 3, "0"), + maxPendingAmtMsat: jspb.Message.getFieldWithDefault(msg, 4, "0"), + minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 5, "0"), maxAcceptedHtlcs: jspb.Message.getFieldWithDefault(msg, 6, 0) }; @@ -8091,19 +8091,19 @@ proto.lnrpc.ChannelConstraints.deserializeBinaryFromReader = function(msg, reade msg.setCsvDelay(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setChanReserveSat(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setDustLimitSat(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxPendingAmtMsat(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinHtlcMsat(value); break; case 6: @@ -8147,29 +8147,29 @@ proto.lnrpc.ChannelConstraints.serializeBinaryToWriter = function(message, write ); } f = message.getChanReserveSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getDustLimitSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); } f = message.getMaxPendingAmtMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); @@ -8201,61 +8201,61 @@ proto.lnrpc.ChannelConstraints.prototype.setCsvDelay = function(value) { /** * optional uint64 chan_reserve_sat = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelConstraints.prototype.getChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelConstraints.prototype.setChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 dust_limit_sat = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelConstraints.prototype.getDustLimitSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelConstraints.prototype.setDustLimitSat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional uint64 max_pending_amt_msat = 4; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelConstraints.prototype.getMaxPendingAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelConstraints.prototype.setMaxPendingAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 min_htlc_msat = 5; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelConstraints.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelConstraints.prototype.setMinHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -8332,30 +8332,30 @@ proto.lnrpc.Channel.toObject = function(includeInstance, msg) { remotePubkey: jspb.Message.getFieldWithDefault(msg, 2, ""), channelPoint: jspb.Message.getFieldWithDefault(msg, 3, ""), chanId: jspb.Message.getFieldWithDefault(msg, 4, "0"), - capacity: jspb.Message.getFieldWithDefault(msg, 5, 0), - localBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteBalance: jspb.Message.getFieldWithDefault(msg, 7, 0), - commitFee: jspb.Message.getFieldWithDefault(msg, 8, 0), - commitWeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 10, 0), - unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, 0), - totalSatoshisSent: jspb.Message.getFieldWithDefault(msg, 12, 0), - totalSatoshisReceived: jspb.Message.getFieldWithDefault(msg, 13, 0), - numUpdates: jspb.Message.getFieldWithDefault(msg, 14, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 5, "0"), + localBalance: jspb.Message.getFieldWithDefault(msg, 6, "0"), + remoteBalance: jspb.Message.getFieldWithDefault(msg, 7, "0"), + commitFee: jspb.Message.getFieldWithDefault(msg, 8, "0"), + commitWeight: jspb.Message.getFieldWithDefault(msg, 9, "0"), + feePerKw: jspb.Message.getFieldWithDefault(msg, 10, "0"), + unsettledBalance: jspb.Message.getFieldWithDefault(msg, 11, "0"), + totalSatoshisSent: jspb.Message.getFieldWithDefault(msg, 12, "0"), + totalSatoshisReceived: jspb.Message.getFieldWithDefault(msg, 13, "0"), + numUpdates: jspb.Message.getFieldWithDefault(msg, 14, "0"), pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), proto.lnrpc.HTLC.toObject, includeInstance), csvDelay: jspb.Message.getFieldWithDefault(msg, 16, 0), pb_private: jspb.Message.getFieldWithDefault(msg, 17, false), initiator: jspb.Message.getFieldWithDefault(msg, 18, false), chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 19, ""), - localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 20, 0), - remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 21, 0), + localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 20, "0"), + remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 21, "0"), staticRemoteKey: jspb.Message.getFieldWithDefault(msg, 22, false), commitmentType: jspb.Message.getFieldWithDefault(msg, 26, 0), - lifetime: jspb.Message.getFieldWithDefault(msg, 23, 0), - uptime: jspb.Message.getFieldWithDefault(msg, 24, 0), + lifetime: jspb.Message.getFieldWithDefault(msg, 23, "0"), + uptime: jspb.Message.getFieldWithDefault(msg, 24, "0"), closeAddress: jspb.Message.getFieldWithDefault(msg, 25, ""), - pushAmountSat: jspb.Message.getFieldWithDefault(msg, 27, 0), + pushAmountSat: jspb.Message.getFieldWithDefault(msg, 27, "0"), thawHeight: jspb.Message.getFieldWithDefault(msg, 28, 0), localConstraints: (f = msg.getLocalConstraints()) && proto.lnrpc.ChannelConstraints.toObject(includeInstance, f), remoteConstraints: (f = msg.getRemoteConstraints()) && proto.lnrpc.ChannelConstraints.toObject(includeInstance, f) @@ -8412,43 +8412,43 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { msg.setChanId(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCapacity(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLocalBalance(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRemoteBalance(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCommitFee(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCommitWeight(value); break; case 10: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeePerKw(value); break; case 11: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setUnsettledBalance(value); break; case 12: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalSatoshisSent(value); break; case 13: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalSatoshisReceived(value); break; case 14: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setNumUpdates(value); break; case 15: @@ -8473,11 +8473,11 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { msg.setChanStatusFlags(value); break; case 20: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLocalChanReserveSat(value); break; case 21: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRemoteChanReserveSat(value); break; case 22: @@ -8489,11 +8489,11 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { msg.setCommitmentType(value); break; case 23: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLifetime(value); break; case 24: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setUptime(value); break; case 25: @@ -8501,7 +8501,7 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { msg.setCloseAddress(value); break; case 27: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setPushAmountSat(value); break; case 28: @@ -8576,71 +8576,71 @@ proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { ); } f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getLocalBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); } f = message.getRemoteBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); } f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 8, f ); } f = message.getCommitWeight(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); } f = message.getFeePerKw(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 10, f ); } f = message.getUnsettledBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 11, f ); } f = message.getTotalSatoshisSent(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 12, f ); } f = message.getTotalSatoshisReceived(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 13, f ); } f = message.getNumUpdates(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 14, f ); @@ -8682,15 +8682,15 @@ proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { ); } f = message.getLocalChanReserveSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 20, f ); } f = message.getRemoteChanReserveSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 21, f ); @@ -8710,15 +8710,15 @@ proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { ); } f = message.getLifetime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 23, f ); } f = message.getUptime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 24, f ); @@ -8731,8 +8731,8 @@ proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { ); } f = message.getPushAmountSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 27, f ); @@ -8827,151 +8827,151 @@ proto.lnrpc.Channel.prototype.setChanId = function(value) { /** * optional int64 capacity = 5; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 local_balance = 6; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setLocalBalance = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional int64 remote_balance = 7; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setRemoteBalance = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional int64 commit_fee = 8; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setCommitFee = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional int64 commit_weight = 9; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setCommitWeight = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; /** * optional int64 fee_per_kw = 10; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setFeePerKw = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; /** * optional int64 unsettled_balance = 11; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getUnsettledBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setUnsettledBalance = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; /** * optional int64 total_satoshis_sent = 12; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getTotalSatoshisSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setTotalSatoshisSent = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + jspb.Message.setProto3StringIntField(this, 12, value); }; /** * optional int64 total_satoshis_received = 13; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getTotalSatoshisReceived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setTotalSatoshisReceived = function(value) { - jspb.Message.setProto3IntField(this, 13, value); + jspb.Message.setProto3StringIntField(this, 13, value); }; /** * optional uint64 num_updates = 14; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getNumUpdates = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setNumUpdates = function(value) { - jspb.Message.setProto3IntField(this, 14, value); + jspb.Message.setProto3StringIntField(this, 14, value); }; @@ -9072,31 +9072,31 @@ proto.lnrpc.Channel.prototype.setChanStatusFlags = function(value) { /** * optional int64 local_chan_reserve_sat = 20; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getLocalChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setLocalChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 20, value); + jspb.Message.setProto3StringIntField(this, 20, value); }; /** * optional int64 remote_chan_reserve_sat = 21; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getRemoteChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setRemoteChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 21, value); + jspb.Message.setProto3StringIntField(this, 21, value); }; @@ -9134,31 +9134,31 @@ proto.lnrpc.Channel.prototype.setCommitmentType = function(value) { /** * optional int64 lifetime = 23; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getLifetime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setLifetime = function(value) { - jspb.Message.setProto3IntField(this, 23, value); + jspb.Message.setProto3StringIntField(this, 23, value); }; /** * optional int64 uptime = 24; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getUptime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 24, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setUptime = function(value) { - jspb.Message.setProto3IntField(this, 24, value); + jspb.Message.setProto3StringIntField(this, 24, value); }; @@ -9179,16 +9179,16 @@ proto.lnrpc.Channel.prototype.setCloseAddress = function(value) { /** * optional uint64 push_amount_sat = 27; - * @return {number} + * @return {string} */ proto.lnrpc.Channel.prototype.getPushAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 27, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Channel.prototype.setPushAmountSat = function(value) { - jspb.Message.setProto3IntField(this, 27, value); + jspb.Message.setProto3StringIntField(this, 27, value); }; @@ -9776,10 +9776,10 @@ proto.lnrpc.ChannelCloseSummary.toObject = function(includeInstance, msg) { chainHash: jspb.Message.getFieldWithDefault(msg, 3, ""), closingTxHash: jspb.Message.getFieldWithDefault(msg, 4, ""), remotePubkey: jspb.Message.getFieldWithDefault(msg, 5, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 6, "0"), closeHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - settledBalance: jspb.Message.getFieldWithDefault(msg, 8, 0), - timeLockedBalance: jspb.Message.getFieldWithDefault(msg, 9, 0), + settledBalance: jspb.Message.getFieldWithDefault(msg, 8, "0"), + timeLockedBalance: jspb.Message.getFieldWithDefault(msg, 9, "0"), closeType: jspb.Message.getFieldWithDefault(msg, 10, 0), openInitiator: jspb.Message.getFieldWithDefault(msg, 11, 0), closeInitiator: jspb.Message.getFieldWithDefault(msg, 12, 0), @@ -9842,7 +9842,7 @@ proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, read msg.setRemotePubkey(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCapacity(value); break; case 7: @@ -9850,11 +9850,11 @@ proto.lnrpc.ChannelCloseSummary.deserializeBinaryFromReader = function(msg, read msg.setCloseHeight(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSettledBalance(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTimeLockedBalance(value); break; case 10: @@ -9939,8 +9939,8 @@ proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writ ); } f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -9953,15 +9953,15 @@ proto.lnrpc.ChannelCloseSummary.serializeBinaryToWriter = function(message, writ ); } f = message.getSettledBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 8, f ); } f = message.getTimeLockedBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); @@ -10087,16 +10087,16 @@ proto.lnrpc.ChannelCloseSummary.prototype.setRemotePubkey = function(value) { /** * optional int64 capacity = 6; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelCloseSummary.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelCloseSummary.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -10117,31 +10117,31 @@ proto.lnrpc.ChannelCloseSummary.prototype.setCloseHeight = function(value) { /** * optional int64 settled_balance = 8; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelCloseSummary.prototype.getSettledBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelCloseSummary.prototype.setSettledBalance = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional int64 time_locked_balance = 9; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelCloseSummary.prototype.getTimeLockedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelCloseSummary.prototype.setTimeLockedBalance = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -10271,7 +10271,7 @@ proto.lnrpc.Resolution.toObject = function(includeInstance, msg) { resolutionType: jspb.Message.getFieldWithDefault(msg, 1, 0), outcome: jspb.Message.getFieldWithDefault(msg, 2, 0), outpoint: (f = msg.getOutpoint()) && proto.lnrpc.OutPoint.toObject(includeInstance, f), - amountSat: jspb.Message.getFieldWithDefault(msg, 4, 0), + amountSat: jspb.Message.getFieldWithDefault(msg, 4, "0"), sweepTxid: jspb.Message.getFieldWithDefault(msg, 5, "") }; @@ -10323,7 +10323,7 @@ proto.lnrpc.Resolution.deserializeBinaryFromReader = function(msg, reader) { msg.setOutpoint(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmountSat(value); break; case 5: @@ -10382,8 +10382,8 @@ proto.lnrpc.Resolution.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmountSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -10460,16 +10460,16 @@ proto.lnrpc.Resolution.prototype.hasOutpoint = function() { /** * optional uint64 amount_sat = 4; - * @return {number} + * @return {string} */ proto.lnrpc.Resolution.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Resolution.prototype.setAmountSat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -11001,18 +11001,18 @@ proto.lnrpc.Peer.toObject = function(includeInstance, msg) { var f, obj = { pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), address: jspb.Message.getFieldWithDefault(msg, 3, ""), - bytesSent: jspb.Message.getFieldWithDefault(msg, 4, 0), - bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, 0), - satSent: jspb.Message.getFieldWithDefault(msg, 6, 0), - satRecv: jspb.Message.getFieldWithDefault(msg, 7, 0), + bytesSent: jspb.Message.getFieldWithDefault(msg, 4, "0"), + bytesRecv: jspb.Message.getFieldWithDefault(msg, 5, "0"), + satSent: jspb.Message.getFieldWithDefault(msg, 6, "0"), + satRecv: jspb.Message.getFieldWithDefault(msg, 7, "0"), inbound: jspb.Message.getFieldWithDefault(msg, 8, false), - pingTime: jspb.Message.getFieldWithDefault(msg, 9, 0), + pingTime: jspb.Message.getFieldWithDefault(msg, 9, "0"), syncType: jspb.Message.getFieldWithDefault(msg, 10, 0), featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [], errorsList: jspb.Message.toObjectList(msg.getErrorsList(), proto.lnrpc.TimestampedError.toObject, includeInstance), flapCount: jspb.Message.getFieldWithDefault(msg, 13, 0), - lastFlapNs: jspb.Message.getFieldWithDefault(msg, 14, 0) + lastFlapNs: jspb.Message.getFieldWithDefault(msg, 14, "0") }; if (includeInstance) { @@ -11058,19 +11058,19 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { msg.setAddress(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setBytesSent(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setBytesRecv(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSatSent(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSatRecv(value); break; case 8: @@ -11078,7 +11078,7 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { msg.setInbound(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setPingTime(value); break; case 10: @@ -11101,7 +11101,7 @@ proto.lnrpc.Peer.deserializeBinaryFromReader = function(msg, reader) { msg.setFlapCount(value); break; case 14: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLastFlapNs(value); break; default: @@ -11148,29 +11148,29 @@ proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { ); } f = message.getBytesSent(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getBytesRecv(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getSatSent(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); } f = message.getSatRecv(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); @@ -11183,8 +11183,8 @@ proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { ); } f = message.getPingTime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); @@ -11216,8 +11216,8 @@ proto.lnrpc.Peer.serializeBinaryToWriter = function(message, writer) { ); } f = message.getLastFlapNs(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 14, f ); @@ -11267,61 +11267,61 @@ proto.lnrpc.Peer.prototype.setAddress = function(value) { /** * optional uint64 bytes_sent = 4; - * @return {number} + * @return {string} */ proto.lnrpc.Peer.prototype.getBytesSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Peer.prototype.setBytesSent = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 bytes_recv = 5; - * @return {number} + * @return {string} */ proto.lnrpc.Peer.prototype.getBytesRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Peer.prototype.setBytesRecv = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 sat_sent = 6; - * @return {number} + * @return {string} */ proto.lnrpc.Peer.prototype.getSatSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Peer.prototype.setSatSent = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional int64 sat_recv = 7; - * @return {number} + * @return {string} */ proto.lnrpc.Peer.prototype.getSatRecv = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Peer.prototype.setSatRecv = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -11344,16 +11344,16 @@ proto.lnrpc.Peer.prototype.setInbound = function(value) { /** * optional int64 ping_time = 9; - * @return {number} + * @return {string} */ proto.lnrpc.Peer.prototype.getPingTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Peer.prototype.setPingTime = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -11438,16 +11438,16 @@ proto.lnrpc.Peer.prototype.setFlapCount = function(value) { /** * optional int64 last_flap_ns = 14; - * @return {number} + * @return {string} */ proto.lnrpc.Peer.prototype.getLastFlapNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Peer.prototype.setLastFlapNs = function(value) { - jspb.Message.setProto3IntField(this, 14, value); + jspb.Message.setProto3StringIntField(this, 14, value); }; @@ -11498,7 +11498,7 @@ proto.lnrpc.TimestampedError.prototype.toObject = function(opt_includeInstance) */ proto.lnrpc.TimestampedError.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 1, "0"), error: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -11537,7 +11537,7 @@ proto.lnrpc.TimestampedError.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTimestamp(value); break; case 2: @@ -11574,8 +11574,8 @@ proto.lnrpc.TimestampedError.prototype.serializeBinary = function() { proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -11592,16 +11592,16 @@ proto.lnrpc.TimestampedError.serializeBinaryToWriter = function(message, writer) /** * optional uint64 timestamp = 1; - * @return {number} + * @return {string} */ proto.lnrpc.TimestampedError.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.TimestampedError.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -12406,7 +12406,7 @@ proto.lnrpc.GetInfoResponse.toObject = function(includeInstance, msg) { numPeers: jspb.Message.getFieldWithDefault(msg, 5, 0), blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), blockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), - bestHeaderTimestamp: jspb.Message.getFieldWithDefault(msg, 13, 0), + bestHeaderTimestamp: jspb.Message.getFieldWithDefault(msg, 13, "0"), syncedToChain: jspb.Message.getFieldWithDefault(msg, 9, false), syncedToGraph: jspb.Message.getFieldWithDefault(msg, 18, false), testnet: jspb.Message.getFieldWithDefault(msg, 10, false), @@ -12495,7 +12495,7 @@ proto.lnrpc.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) msg.setBlockHash(value); break; case 13: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setBestHeaderTimestamp(value); break; case 9: @@ -12632,8 +12632,8 @@ proto.lnrpc.GetInfoResponse.serializeBinaryToWriter = function(message, writer) ); } f = message.getBestHeaderTimestamp(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 13, f ); @@ -12848,16 +12848,16 @@ proto.lnrpc.GetInfoResponse.prototype.setBlockHash = function(value) { /** * optional int64 best_header_timestamp = 13; - * @return {number} + * @return {string} */ proto.lnrpc.GetInfoResponse.prototype.getBestHeaderTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.GetInfoResponse.prototype.setBestHeaderTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 13, value); + jspb.Message.setProto3StringIntField(this, 13, value); }; @@ -14099,9 +14099,9 @@ proto.lnrpc.CloseChannelRequest.toObject = function(includeInstance, msg) { channelPoint: (f = msg.getChannelPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), force: jspb.Message.getFieldWithDefault(msg, 2, false), targetConf: jspb.Message.getFieldWithDefault(msg, 3, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 4, 0), + satPerByte: jspb.Message.getFieldWithDefault(msg, 4, "0"), deliveryAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 6, 0) + satPerVbyte: jspb.Message.getFieldWithDefault(msg, 6, "0") }; if (includeInstance) { @@ -14152,7 +14152,7 @@ proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, read msg.setTargetConf(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSatPerByte(value); break; case 5: @@ -14160,7 +14160,7 @@ proto.lnrpc.CloseChannelRequest.deserializeBinaryFromReader = function(msg, read msg.setDeliveryAddress(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSatPerVbyte(value); break; default: @@ -14215,8 +14215,8 @@ proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); @@ -14229,8 +14229,8 @@ proto.lnrpc.CloseChannelRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); @@ -14302,16 +14302,16 @@ proto.lnrpc.CloseChannelRequest.prototype.setTargetConf = function(value) { /** * optional int64 sat_per_byte = 4; - * @return {number} + * @return {string} */ proto.lnrpc.CloseChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.CloseChannelRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -14332,16 +14332,16 @@ proto.lnrpc.CloseChannelRequest.prototype.setDeliveryAddress = function(value) { /** * optional uint64 sat_per_vbyte = 6; - * @return {number} + * @return {string} */ proto.lnrpc.CloseChannelRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.CloseChannelRequest.prototype.setSatPerVbyte = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -14815,7 +14815,7 @@ proto.lnrpc.ReadyForPsbtFunding.prototype.toObject = function(opt_includeInstanc proto.lnrpc.ReadyForPsbtFunding.toObject = function(includeInstance, msg) { var f, obj = { fundingAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - fundingAmount: jspb.Message.getFieldWithDefault(msg, 2, 0), + fundingAmount: jspb.Message.getFieldWithDefault(msg, 2, "0"), psbt: msg.getPsbt_asB64() }; @@ -14858,7 +14858,7 @@ proto.lnrpc.ReadyForPsbtFunding.deserializeBinaryFromReader = function(msg, read msg.setFundingAddress(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFundingAmount(value); break; case 3: @@ -14902,8 +14902,8 @@ proto.lnrpc.ReadyForPsbtFunding.serializeBinaryToWriter = function(message, writ ); } f = message.getFundingAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -14935,16 +14935,16 @@ proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAddress = function(value) { /** * optional int64 funding_amount = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ReadyForPsbtFunding.prototype.getFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ReadyForPsbtFunding.prototype.setFundingAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -15034,21 +15034,21 @@ proto.lnrpc.OpenChannelRequest.prototype.toObject = function(opt_includeInstance */ proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { var f, obj = { - satPerVbyte: jspb.Message.getFieldWithDefault(msg, 1, 0), + satPerVbyte: jspb.Message.getFieldWithDefault(msg, 1, "0"), nodePubkey: msg.getNodePubkey_asB64(), nodePubkeyString: jspb.Message.getFieldWithDefault(msg, 3, ""), - localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, 0), - pushSat: jspb.Message.getFieldWithDefault(msg, 5, 0), + localFundingAmount: jspb.Message.getFieldWithDefault(msg, 4, "0"), + pushSat: jspb.Message.getFieldWithDefault(msg, 5, "0"), targetConf: jspb.Message.getFieldWithDefault(msg, 6, 0), - satPerByte: jspb.Message.getFieldWithDefault(msg, 7, 0), + satPerByte: jspb.Message.getFieldWithDefault(msg, 7, "0"), pb_private: jspb.Message.getFieldWithDefault(msg, 8, false), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), + minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 9, "0"), remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 10, 0), minConfs: jspb.Message.getFieldWithDefault(msg, 11, 0), spendUnconfirmed: jspb.Message.getFieldWithDefault(msg, 12, false), closeAddress: jspb.Message.getFieldWithDefault(msg, 13, ""), fundingShim: (f = msg.getFundingShim()) && proto.lnrpc.FundingShim.toObject(includeInstance, f), - remoteMaxValueInFlightMsat: jspb.Message.getFieldWithDefault(msg, 15, 0), + remoteMaxValueInFlightMsat: jspb.Message.getFieldWithDefault(msg, 15, "0"), remoteMaxHtlcs: jspb.Message.getFieldWithDefault(msg, 16, 0), maxLocalCsv: jspb.Message.getFieldWithDefault(msg, 17, 0) }; @@ -15088,7 +15088,7 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSatPerVbyte(value); break; case 2: @@ -15100,11 +15100,11 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade msg.setNodePubkeyString(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLocalFundingAmount(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setPushSat(value); break; case 6: @@ -15112,7 +15112,7 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade msg.setTargetConf(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSatPerByte(value); break; case 8: @@ -15120,7 +15120,7 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade msg.setPrivate(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMinHtlcMsat(value); break; case 10: @@ -15145,7 +15145,7 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade msg.setFundingShim(value); break; case 15: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setRemoteMaxValueInFlightMsat(value); break; case 16: @@ -15186,8 +15186,8 @@ proto.lnrpc.OpenChannelRequest.prototype.serializeBinary = function() { proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -15207,15 +15207,15 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write ); } f = message.getLocalFundingAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getPushSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); @@ -15228,8 +15228,8 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write ); } f = message.getSatPerByte(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); @@ -15242,8 +15242,8 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write ); } f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); @@ -15285,8 +15285,8 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write ); } f = message.getRemoteMaxValueInFlightMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 15, f ); @@ -15310,16 +15310,16 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write /** * optional uint64 sat_per_vbyte = 1; - * @return {number} + * @return {string} */ proto.lnrpc.OpenChannelRequest.prototype.getSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.OpenChannelRequest.prototype.setSatPerVbyte = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -15379,31 +15379,31 @@ proto.lnrpc.OpenChannelRequest.prototype.setNodePubkeyString = function(value) { /** * optional int64 local_funding_amount = 4; - * @return {number} + * @return {string} */ proto.lnrpc.OpenChannelRequest.prototype.getLocalFundingAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.OpenChannelRequest.prototype.setLocalFundingAmount = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 push_sat = 5; - * @return {number} + * @return {string} */ proto.lnrpc.OpenChannelRequest.prototype.getPushSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.OpenChannelRequest.prototype.setPushSat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -15424,16 +15424,16 @@ proto.lnrpc.OpenChannelRequest.prototype.setTargetConf = function(value) { /** * optional int64 sat_per_byte = 7; - * @return {number} + * @return {string} */ proto.lnrpc.OpenChannelRequest.prototype.getSatPerByte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.OpenChannelRequest.prototype.setSatPerByte = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -15456,16 +15456,16 @@ proto.lnrpc.OpenChannelRequest.prototype.setPrivate = function(value) { /** * optional int64 min_htlc_msat = 9; - * @return {number} + * @return {string} */ proto.lnrpc.OpenChannelRequest.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.OpenChannelRequest.prototype.setMinHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -15563,16 +15563,16 @@ proto.lnrpc.OpenChannelRequest.prototype.hasFundingShim = function() { /** * optional uint64 remote_max_value_in_flight_msat = 15; - * @return {number} + * @return {string} */ proto.lnrpc.OpenChannelRequest.prototype.getRemoteMaxValueInFlightMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.OpenChannelRequest.prototype.setRemoteMaxValueInFlightMsat = function(value) { - jspb.Message.setProto3IntField(this, 15, value); + jspb.Message.setProto3StringIntField(this, 15, value); }; @@ -16357,7 +16357,7 @@ proto.lnrpc.ChanPointShim.prototype.toObject = function(opt_includeInstance) { */ proto.lnrpc.ChanPointShim.toObject = function(includeInstance, msg) { var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), localKey: (f = msg.getLocalKey()) && proto.lnrpc.KeyDescriptor.toObject(includeInstance, f), remoteKey: msg.getRemoteKey_asB64(), @@ -16400,7 +16400,7 @@ proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 2: @@ -16455,8 +16455,8 @@ proto.lnrpc.ChanPointShim.prototype.serializeBinary = function() { proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); @@ -16503,16 +16503,16 @@ proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { /** * optional int64 amt = 1; - * @return {number} + * @return {string} */ proto.lnrpc.ChanPointShim.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChanPointShim.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -18278,7 +18278,7 @@ proto.lnrpc.PendingHTLC.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.PendingHTLC.toObject = function(includeInstance, msg) { var f, obj = { incoming: jspb.Message.getFieldWithDefault(msg, 1, false), - amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + amount: jspb.Message.getFieldWithDefault(msg, 2, "0"), outpoint: jspb.Message.getFieldWithDefault(msg, 3, ""), maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), @@ -18324,7 +18324,7 @@ proto.lnrpc.PendingHTLC.deserializeBinaryFromReader = function(msg, reader) { msg.setIncoming(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmount(value); break; case 3: @@ -18380,8 +18380,8 @@ proto.lnrpc.PendingHTLC.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -18436,16 +18436,16 @@ proto.lnrpc.PendingHTLC.prototype.setIncoming = function(value) { /** * optional int64 amount = 2; - * @return {number} + * @return {string} */ proto.lnrpc.PendingHTLC.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingHTLC.prototype.setAmount = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -18679,7 +18679,7 @@ proto.lnrpc.PendingChannelsResponse.prototype.toObject = function(opt_includeIns */ proto.lnrpc.PendingChannelsResponse.toObject = function(includeInstance, msg) { var f, obj = { - totalLimboBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), + totalLimboBalance: jspb.Message.getFieldWithDefault(msg, 1, "0"), pendingOpenChannelsList: jspb.Message.toObjectList(msg.getPendingOpenChannelsList(), proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject, includeInstance), pendingClosingChannelsList: jspb.Message.toObjectList(msg.getPendingClosingChannelsList(), @@ -18725,7 +18725,7 @@ proto.lnrpc.PendingChannelsResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalLimboBalance(value); break; case 2: @@ -18778,8 +18778,8 @@ proto.lnrpc.PendingChannelsResponse.prototype.serializeBinary = function() { proto.lnrpc.PendingChannelsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTotalLimboBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); @@ -18868,11 +18868,11 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject = function(includeIn var f, obj = { remoteNodePub: jspb.Message.getFieldWithDefault(msg, 1, ""), channelPoint: jspb.Message.getFieldWithDefault(msg, 2, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), - localBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), - remoteBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), - localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 7, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 3, "0"), + localBalance: jspb.Message.getFieldWithDefault(msg, 4, "0"), + remoteBalance: jspb.Message.getFieldWithDefault(msg, 5, "0"), + localChanReserveSat: jspb.Message.getFieldWithDefault(msg, 6, "0"), + remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 7, "0"), initiator: jspb.Message.getFieldWithDefault(msg, 8, 0), commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0) }; @@ -18920,23 +18920,23 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = msg.setChannelPoint(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCapacity(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLocalBalance(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRemoteBalance(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLocalChanReserveSat(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRemoteChanReserveSat(value); break; case 8: @@ -18991,36 +18991,36 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = fun ); } f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getLocalBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getRemoteBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getLocalChanReserveSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); } f = message.getRemoteChanReserveSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); @@ -19074,76 +19074,76 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setChannelPoint = f /** * optional int64 capacity = 3; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 local_balance = 4; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalBalance = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 remote_balance = 5; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteBalance = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 local_chan_reserve_sat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getLocalChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setLocalChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional int64 remote_chan_reserve_sat = 7; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getRemoteChanReserveSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setRemoteChanReserveSat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -19226,9 +19226,9 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(inclu var f, obj = { channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), confirmationHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - commitFee: jspb.Message.getFieldWithDefault(msg, 4, 0), - commitWeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 6, 0) + commitFee: jspb.Message.getFieldWithDefault(msg, 4, "0"), + commitWeight: jspb.Message.getFieldWithDefault(msg, 5, "0"), + feePerKw: jspb.Message.getFieldWithDefault(msg, 6, "0") }; if (includeInstance) { @@ -19275,15 +19275,15 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromRead msg.setConfirmationHeight(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCommitFee(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCommitWeight(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeePerKw(value); break; default: @@ -19331,22 +19331,22 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = ); } f = message.getCommitFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getCommitWeight(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getFeePerKw(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -19401,46 +19401,46 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setConfirmation /** * optional int64 commit_fee = 4; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 commit_weight = 5; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getCommitWeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setCommitWeight = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 fee_per_kw = 6; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFeePerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -19492,7 +19492,7 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.toObject = fun proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.toObject = function(includeInstance, msg) { var f, obj = { channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), - limboBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + limboBalance: jspb.Message.getFieldWithDefault(msg, 2, "0"), commitments: (f = msg.getCommitments()) && proto.lnrpc.PendingChannelsResponse.Commitments.toObject(includeInstance, f) }; @@ -19536,7 +19536,7 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.deserializeBinaryFromRea msg.setChannel(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLimboBalance(value); break; case 3: @@ -19582,8 +19582,8 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.serializeBinaryToWriter ); } f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -19631,16 +19631,16 @@ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.hasChannel = f /** * optional int64 limbo_balance = 2; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.WaitingCloseChannel.prototype.setLimboBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -19724,9 +19724,9 @@ proto.lnrpc.PendingChannelsResponse.Commitments.toObject = function(includeInsta localTxid: jspb.Message.getFieldWithDefault(msg, 1, ""), remoteTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), remotePendingTxid: jspb.Message.getFieldWithDefault(msg, 3, ""), - localCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 4, 0), - remoteCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 5, 0), - remotePendingCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 6, 0) + localCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 4, "0"), + remoteCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 5, "0"), + remotePendingCommitFeeSat: jspb.Message.getFieldWithDefault(msg, 6, "0") }; if (includeInstance) { @@ -19776,15 +19776,15 @@ proto.lnrpc.PendingChannelsResponse.Commitments.deserializeBinaryFromReader = fu msg.setRemotePendingTxid(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setLocalCommitFeeSat(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setRemoteCommitFeeSat(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setRemotePendingCommitFeeSat(value); break; default: @@ -19838,22 +19838,22 @@ proto.lnrpc.PendingChannelsResponse.Commitments.serializeBinaryToWriter = functi ); } f = message.getLocalCommitFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getRemoteCommitFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getRemotePendingCommitFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); @@ -19908,46 +19908,46 @@ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingTxid = /** * optional uint64 local_commit_fee_sat = 4; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getLocalCommitFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setLocalCommitFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 remote_commit_fee_sat = 5; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemoteCommitFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemoteCommitFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional uint64 remote_pending_commit_fee_sat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.getRemotePendingCommitFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.Commitments.prototype.setRemotePendingCommitFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -20193,10 +20193,10 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.toObject = function(inclu var f, obj = { channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), closingTxid: jspb.Message.getFieldWithDefault(msg, 2, ""), - limboBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), + limboBalance: jspb.Message.getFieldWithDefault(msg, 3, "0"), maturityHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), blocksTilMaturity: jspb.Message.getFieldWithDefault(msg, 5, 0), - recoveredBalance: jspb.Message.getFieldWithDefault(msg, 6, 0), + recoveredBalance: jspb.Message.getFieldWithDefault(msg, 6, "0"), pendingHtlcsList: jspb.Message.toObjectList(msg.getPendingHtlcsList(), proto.lnrpc.PendingHTLC.toObject, includeInstance), anchor: jspb.Message.getFieldWithDefault(msg, 9, 0) @@ -20246,7 +20246,7 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromRead msg.setClosingTxid(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLimboBalance(value); break; case 4: @@ -20258,7 +20258,7 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.deserializeBinaryFromRead msg.setBlocksTilMaturity(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRecoveredBalance(value); break; case 8: @@ -20315,8 +20315,8 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = ); } f = message.getLimboBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -20336,8 +20336,8 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.serializeBinaryToWriter = ); } f = message.getRecoveredBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -20416,16 +20416,16 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setClosingTxid /** * optional int64 limbo_balance = 3; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setLimboBalance = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -20461,16 +20461,16 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setBlocksTilMat /** * optional int64 recovered_balance = 6; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.getRecoveredBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setRecoveredBalance = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -20522,16 +20522,16 @@ proto.lnrpc.PendingChannelsResponse.ForceClosedChannel.prototype.setAnchor = fun /** * optional int64 total_limbo_balance = 1; - * @return {number} + * @return {string} */ proto.lnrpc.PendingChannelsResponse.prototype.getTotalLimboBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PendingChannelsResponse.prototype.setTotalLimboBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -21224,8 +21224,8 @@ proto.lnrpc.WalletAccountBalance.prototype.toObject = function(opt_includeInstan */ proto.lnrpc.WalletAccountBalance.toObject = function(includeInstance, msg) { var f, obj = { - confirmedBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) + confirmedBalance: jspb.Message.getFieldWithDefault(msg, 1, "0"), + unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -21263,11 +21263,11 @@ proto.lnrpc.WalletAccountBalance.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setConfirmedBalance(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setUnconfirmedBalance(value); break; default: @@ -21300,15 +21300,15 @@ proto.lnrpc.WalletAccountBalance.prototype.serializeBinary = function() { proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getConfirmedBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getUnconfirmedBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -21318,31 +21318,31 @@ proto.lnrpc.WalletAccountBalance.serializeBinaryToWriter = function(message, wri /** * optional int64 confirmed_balance = 1; - * @return {number} + * @return {string} */ proto.lnrpc.WalletAccountBalance.prototype.getConfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.WalletAccountBalance.prototype.setConfirmedBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 unconfirmed_balance = 2; - * @return {number} + * @return {string} */ proto.lnrpc.WalletAccountBalance.prototype.getUnconfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.WalletAccountBalance.prototype.setUnconfirmedBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -21509,9 +21509,9 @@ proto.lnrpc.WalletBalanceResponse.prototype.toObject = function(opt_includeInsta */ proto.lnrpc.WalletBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - totalBalance: jspb.Message.getFieldWithDefault(msg, 1, 0), - confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), - unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalBalance: jspb.Message.getFieldWithDefault(msg, 1, "0"), + confirmedBalance: jspb.Message.getFieldWithDefault(msg, 2, "0"), + unconfirmedBalance: jspb.Message.getFieldWithDefault(msg, 3, "0"), accountBalanceMap: (f = msg.getAccountBalanceMap()) ? f.toObject(includeInstance, proto.lnrpc.WalletAccountBalance.toObject) : [] }; @@ -21550,15 +21550,15 @@ proto.lnrpc.WalletBalanceResponse.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalBalance(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setConfirmedBalance(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setUnconfirmedBalance(value); break; case 4: @@ -21597,22 +21597,22 @@ proto.lnrpc.WalletBalanceResponse.prototype.serializeBinary = function() { proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTotalBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getConfirmedBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getUnconfirmedBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -21626,46 +21626,46 @@ proto.lnrpc.WalletBalanceResponse.serializeBinaryToWriter = function(message, wr /** * optional int64 total_balance = 1; - * @return {number} + * @return {string} */ proto.lnrpc.WalletBalanceResponse.prototype.getTotalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.WalletBalanceResponse.prototype.setTotalBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 confirmed_balance = 2; - * @return {number} + * @return {string} */ proto.lnrpc.WalletBalanceResponse.prototype.getConfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.WalletBalanceResponse.prototype.setConfirmedBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 unconfirmed_balance = 3; - * @return {number} + * @return {string} */ proto.lnrpc.WalletBalanceResponse.prototype.getUnconfirmedBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.WalletBalanceResponse.prototype.setUnconfirmedBalance = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -21734,8 +21734,8 @@ proto.lnrpc.Amount.prototype.toObject = function(opt_includeInstance) { */ proto.lnrpc.Amount.toObject = function(includeInstance, msg) { var f, obj = { - sat: jspb.Message.getFieldWithDefault(msg, 1, 0), - msat: jspb.Message.getFieldWithDefault(msg, 2, 0) + sat: jspb.Message.getFieldWithDefault(msg, 1, "0"), + msat: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -21773,11 +21773,11 @@ proto.lnrpc.Amount.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSat(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMsat(value); break; default: @@ -21810,15 +21810,15 @@ proto.lnrpc.Amount.prototype.serializeBinary = function() { proto.lnrpc.Amount.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } f = message.getMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -21828,31 +21828,31 @@ proto.lnrpc.Amount.serializeBinaryToWriter = function(message, writer) { /** * optional uint64 sat = 1; - * @return {number} + * @return {string} */ proto.lnrpc.Amount.prototype.getSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Amount.prototype.setSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional uint64 msat = 2; - * @return {number} + * @return {string} */ proto.lnrpc.Amount.prototype.getMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Amount.prototype.setMsat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -22019,8 +22019,8 @@ proto.lnrpc.ChannelBalanceResponse.prototype.toObject = function(opt_includeInst */ proto.lnrpc.ChannelBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, 0), + balance: jspb.Message.getFieldWithDefault(msg, 1, "0"), + pendingOpenBalance: jspb.Message.getFieldWithDefault(msg, 2, "0"), localBalance: (f = msg.getLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), remoteBalance: (f = msg.getRemoteBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), unsettledLocalBalance: (f = msg.getUnsettledLocalBalance()) && proto.lnrpc.Amount.toObject(includeInstance, f), @@ -22064,11 +22064,11 @@ proto.lnrpc.ChannelBalanceResponse.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setBalance(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setPendingOpenBalance(value); break; case 3: @@ -22131,15 +22131,15 @@ proto.lnrpc.ChannelBalanceResponse.prototype.serializeBinary = function() { proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getPendingOpenBalance(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -22197,31 +22197,31 @@ proto.lnrpc.ChannelBalanceResponse.serializeBinaryToWriter = function(message, w /** * optional int64 balance = 1; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelBalanceResponse.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelBalanceResponse.prototype.setBalance = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 pending_open_balance = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelBalanceResponse.prototype.getPendingOpenBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelBalanceResponse.prototype.setPendingOpenBalance = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -22460,8 +22460,8 @@ proto.lnrpc.QueryRoutesRequest.prototype.toObject = function(opt_includeInstance proto.lnrpc.QueryRoutesRequest.toObject = function(includeInstance, msg) { var f, obj = { pubKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - amt: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), + amt: jspb.Message.getFieldWithDefault(msg, 2, "0"), + amtMsat: jspb.Message.getFieldWithDefault(msg, 12, "0"), finalCltvDelta: jspb.Message.getFieldWithDefault(msg, 4, 0), feeLimit: (f = msg.getFeeLimit()) && proto.lnrpc.FeeLimit.toObject(includeInstance, f), ignoredNodesList: msg.getIgnoredNodesList_asB64(), @@ -22519,11 +22519,11 @@ proto.lnrpc.QueryRoutesRequest.deserializeBinaryFromReader = function(msg, reade msg.setPubKey(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 12: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtMsat(value); break; case 4: @@ -22621,15 +22621,15 @@ proto.lnrpc.QueryRoutesRequest.serializeBinaryToWriter = function(message, write ); } f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getAmtMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 12, f ); @@ -22746,31 +22746,31 @@ proto.lnrpc.QueryRoutesRequest.prototype.setPubKey = function(value) { /** * optional int64 amt = 2; - * @return {number} + * @return {string} */ proto.lnrpc.QueryRoutesRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.QueryRoutesRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 amt_msat = 12; - * @return {number} + * @return {string} */ proto.lnrpc.QueryRoutesRequest.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.QueryRoutesRequest.prototype.setAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + jspb.Message.setProto3StringIntField(this, 12, value); }; @@ -23744,12 +23744,12 @@ proto.lnrpc.Hop.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.Hop.toObject = function(includeInstance, msg) { var f, obj = { chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - chanCapacity: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtToForward: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0), + chanCapacity: jspb.Message.getFieldWithDefault(msg, 2, "0"), + amtToForward: jspb.Message.getFieldWithDefault(msg, 3, "0"), + fee: jspb.Message.getFieldWithDefault(msg, 4, "0"), expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), - amtToForwardMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + amtToForwardMsat: jspb.Message.getFieldWithDefault(msg, 6, "0"), + feeMsat: jspb.Message.getFieldWithDefault(msg, 7, "0"), pubKey: jspb.Message.getFieldWithDefault(msg, 8, ""), tlvPayload: jspb.Message.getFieldWithDefault(msg, 9, false), mppRecord: (f = msg.getMppRecord()) && proto.lnrpc.MPPRecord.toObject(includeInstance, f), @@ -23796,15 +23796,15 @@ proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { msg.setChanId(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setChanCapacity(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtToForward(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFee(value); break; case 5: @@ -23812,11 +23812,11 @@ proto.lnrpc.Hop.deserializeBinaryFromReader = function(msg, reader) { msg.setExpiry(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtToForwardMsat(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeeMsat(value); break; case 8: @@ -23880,22 +23880,22 @@ proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { ); } f = message.getChanCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getAmtToForward(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); @@ -23908,15 +23908,15 @@ proto.lnrpc.Hop.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmtToForwardMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); } f = message.getFeeMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); @@ -23975,46 +23975,46 @@ proto.lnrpc.Hop.prototype.setChanId = function(value) { /** * optional int64 chan_capacity = 2; - * @return {number} + * @return {string} */ proto.lnrpc.Hop.prototype.getChanCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Hop.prototype.setChanCapacity = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 amt_to_forward = 3; - * @return {number} + * @return {string} */ proto.lnrpc.Hop.prototype.getAmtToForward = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Hop.prototype.setAmtToForward = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 fee = 4; - * @return {number} + * @return {string} */ proto.lnrpc.Hop.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Hop.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -24035,31 +24035,31 @@ proto.lnrpc.Hop.prototype.setExpiry = function(value) { /** * optional int64 amt_to_forward_msat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.Hop.prototype.getAmtToForwardMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Hop.prototype.setAmtToForwardMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional int64 fee_msat = 7; - * @return {number} + * @return {string} */ proto.lnrpc.Hop.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Hop.prototype.setFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -24221,7 +24221,7 @@ proto.lnrpc.MPPRecord.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.MPPRecord.toObject = function(includeInstance, msg) { var f, obj = { paymentAddr: msg.getPaymentAddr_asB64(), - totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, 0) + totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, "0") }; if (includeInstance) { @@ -24263,7 +24263,7 @@ proto.lnrpc.MPPRecord.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentAddr(value); break; case 10: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalAmtMsat(value); break; default: @@ -24303,8 +24303,8 @@ proto.lnrpc.MPPRecord.serializeBinaryToWriter = function(message, writer) { ); } f = message.getTotalAmtMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 10, f ); @@ -24353,16 +24353,16 @@ proto.lnrpc.MPPRecord.prototype.setPaymentAddr = function(value) { /** * optional int64 total_amt_msat = 10; - * @return {number} + * @return {string} */ proto.lnrpc.MPPRecord.prototype.getTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.MPPRecord.prototype.setTotalAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; @@ -24665,12 +24665,12 @@ proto.lnrpc.Route.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.Route.toObject = function(includeInstance, msg) { var f, obj = { totalTimeLock: jspb.Message.getFieldWithDefault(msg, 1, 0), - totalFees: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalAmt: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalFees: jspb.Message.getFieldWithDefault(msg, 2, "0"), + totalAmt: jspb.Message.getFieldWithDefault(msg, 3, "0"), hopsList: jspb.Message.toObjectList(msg.getHopsList(), proto.lnrpc.Hop.toObject, includeInstance), - totalFeesMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 6, 0) + totalFeesMsat: jspb.Message.getFieldWithDefault(msg, 5, "0"), + totalAmtMsat: jspb.Message.getFieldWithDefault(msg, 6, "0") }; if (includeInstance) { @@ -24712,11 +24712,11 @@ proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { msg.setTotalTimeLock(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalFees(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalAmt(value); break; case 4: @@ -24725,11 +24725,11 @@ proto.lnrpc.Route.deserializeBinaryFromReader = function(msg, reader) { msg.addHops(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalFeesMsat(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalAmtMsat(value); break; default: @@ -24769,15 +24769,15 @@ proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { ); } f = message.getTotalFees(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getTotalAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -24791,15 +24791,15 @@ proto.lnrpc.Route.serializeBinaryToWriter = function(message, writer) { ); } f = message.getTotalFeesMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getTotalAmtMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -24824,31 +24824,31 @@ proto.lnrpc.Route.prototype.setTotalTimeLock = function(value) { /** * optional int64 total_fees = 2; - * @return {number} + * @return {string} */ proto.lnrpc.Route.prototype.getTotalFees = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Route.prototype.setTotalFees = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 total_amt = 3; - * @return {number} + * @return {string} */ proto.lnrpc.Route.prototype.getTotalAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Route.prototype.setTotalAmt = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -24885,31 +24885,31 @@ proto.lnrpc.Route.prototype.clearHopsList = function() { /** * optional int64 total_fees_msat = 5; - * @return {number} + * @return {string} */ proto.lnrpc.Route.prototype.getTotalFeesMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Route.prototype.setTotalFeesMsat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 total_amt_msat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.Route.prototype.getTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Route.prototype.setTotalAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -25140,7 +25140,7 @@ proto.lnrpc.NodeInfo.toObject = function(includeInstance, msg) { var f, obj = { node: (f = msg.getNode()) && proto.lnrpc.LightningNode.toObject(includeInstance, f), numChannels: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalCapacity: jspb.Message.getFieldWithDefault(msg, 3, "0"), channelsList: jspb.Message.toObjectList(msg.getChannelsList(), proto.lnrpc.ChannelEdge.toObject, includeInstance) }; @@ -25189,7 +25189,7 @@ proto.lnrpc.NodeInfo.deserializeBinaryFromReader = function(msg, reader) { msg.setNumChannels(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalCapacity(value); break; case 4: @@ -25242,8 +25242,8 @@ proto.lnrpc.NodeInfo.serializeBinaryToWriter = function(message, writer) { ); } f = message.getTotalCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -25306,16 +25306,16 @@ proto.lnrpc.NodeInfo.prototype.setNumChannels = function(value) { /** * optional int64 total_capacity = 3; - * @return {number} + * @return {string} */ proto.lnrpc.NodeInfo.prototype.getTotalCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.NodeInfo.prototype.setTotalCapacity = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -25872,11 +25872,11 @@ proto.lnrpc.RoutingPolicy.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.RoutingPolicy.toObject = function(includeInstance, msg) { var f, obj = { timeLockDelta: jspb.Message.getFieldWithDefault(msg, 1, 0), - minHtlc: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRateMilliMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), + minHtlc: jspb.Message.getFieldWithDefault(msg, 2, "0"), + feeBaseMsat: jspb.Message.getFieldWithDefault(msg, 3, "0"), + feeRateMilliMsat: jspb.Message.getFieldWithDefault(msg, 4, "0"), disabled: jspb.Message.getFieldWithDefault(msg, 5, false), - maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), + maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, "0"), lastUpdate: jspb.Message.getFieldWithDefault(msg, 7, 0) }; @@ -25919,15 +25919,15 @@ proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { msg.setTimeLockDelta(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMinHtlc(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeeBaseMsat(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeeRateMilliMsat(value); break; case 5: @@ -25935,7 +25935,7 @@ proto.lnrpc.RoutingPolicy.deserializeBinaryFromReader = function(msg, reader) { msg.setDisabled(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxHtlcMsat(value); break; case 7: @@ -25979,22 +25979,22 @@ proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { ); } f = message.getMinHtlc(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getFeeBaseMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getFeeRateMilliMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); @@ -26007,8 +26007,8 @@ proto.lnrpc.RoutingPolicy.serializeBinaryToWriter = function(message, writer) { ); } f = message.getMaxHtlcMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); @@ -26040,46 +26040,46 @@ proto.lnrpc.RoutingPolicy.prototype.setTimeLockDelta = function(value) { /** * optional int64 min_htlc = 2; - * @return {number} + * @return {string} */ proto.lnrpc.RoutingPolicy.prototype.getMinHtlc = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.RoutingPolicy.prototype.setMinHtlc = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 fee_base_msat = 3; - * @return {number} + * @return {string} */ proto.lnrpc.RoutingPolicy.prototype.getFeeBaseMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.RoutingPolicy.prototype.setFeeBaseMsat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 fee_rate_milli_msat = 4; - * @return {number} + * @return {string} */ proto.lnrpc.RoutingPolicy.prototype.getFeeRateMilliMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.RoutingPolicy.prototype.setFeeRateMilliMsat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -26102,16 +26102,16 @@ proto.lnrpc.RoutingPolicy.prototype.setDisabled = function(value) { /** * optional uint64 max_htlc_msat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.RoutingPolicy.prototype.getMaxHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.RoutingPolicy.prototype.setMaxHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -26182,7 +26182,7 @@ proto.lnrpc.ChannelEdge.toObject = function(includeInstance, msg) { lastUpdate: jspb.Message.getFieldWithDefault(msg, 3, 0), node1Pub: jspb.Message.getFieldWithDefault(msg, 4, ""), node2Pub: jspb.Message.getFieldWithDefault(msg, 5, ""), - capacity: jspb.Message.getFieldWithDefault(msg, 6, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 6, "0"), node1Policy: (f = msg.getNode1Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), node2Policy: (f = msg.getNode2Policy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f) }; @@ -26242,7 +26242,7 @@ proto.lnrpc.ChannelEdge.deserializeBinaryFromReader = function(msg, reader) { msg.setNode2Pub(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCapacity(value); break; case 7: @@ -26320,8 +26320,8 @@ proto.lnrpc.ChannelEdge.serializeBinaryToWriter = function(message, writer) { ); } f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -26422,16 +26422,16 @@ proto.lnrpc.ChannelEdge.prototype.setNode2Pub = function(value) { /** * optional int64 capacity = 6; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelEdge.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelEdge.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -27639,12 +27639,12 @@ proto.lnrpc.NetworkInfo.toObject = function(includeInstance, msg) { maxOutDegree: jspb.Message.getFieldWithDefault(msg, 3, 0), numNodes: jspb.Message.getFieldWithDefault(msg, 4, 0), numChannels: jspb.Message.getFieldWithDefault(msg, 5, 0), - totalNetworkCapacity: jspb.Message.getFieldWithDefault(msg, 6, 0), + totalNetworkCapacity: jspb.Message.getFieldWithDefault(msg, 6, "0"), avgChannelSize: +jspb.Message.getFieldWithDefault(msg, 7, 0.0), - minChannelSize: jspb.Message.getFieldWithDefault(msg, 8, 0), - maxChannelSize: jspb.Message.getFieldWithDefault(msg, 9, 0), - medianChannelSizeSat: jspb.Message.getFieldWithDefault(msg, 10, 0), - numZombieChans: jspb.Message.getFieldWithDefault(msg, 11, 0) + minChannelSize: jspb.Message.getFieldWithDefault(msg, 8, "0"), + maxChannelSize: jspb.Message.getFieldWithDefault(msg, 9, "0"), + medianChannelSizeSat: jspb.Message.getFieldWithDefault(msg, 10, "0"), + numZombieChans: jspb.Message.getFieldWithDefault(msg, 11, "0") }; if (includeInstance) { @@ -27702,7 +27702,7 @@ proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { msg.setNumChannels(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTotalNetworkCapacity(value); break; case 7: @@ -27710,19 +27710,19 @@ proto.lnrpc.NetworkInfo.deserializeBinaryFromReader = function(msg, reader) { msg.setAvgChannelSize(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMinChannelSize(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxChannelSize(value); break; case 10: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMedianChannelSizeSat(value); break; case 11: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setNumZombieChans(value); break; default: @@ -27790,8 +27790,8 @@ proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { ); } f = message.getTotalNetworkCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -27804,29 +27804,29 @@ proto.lnrpc.NetworkInfo.serializeBinaryToWriter = function(message, writer) { ); } f = message.getMinChannelSize(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 8, f ); } f = message.getMaxChannelSize(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); } f = message.getMedianChannelSizeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 10, f ); } f = message.getNumZombieChans(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 11, f ); @@ -27911,16 +27911,16 @@ proto.lnrpc.NetworkInfo.prototype.setNumChannels = function(value) { /** * optional int64 total_network_capacity = 6; - * @return {number} + * @return {string} */ proto.lnrpc.NetworkInfo.prototype.getTotalNetworkCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.NetworkInfo.prototype.setTotalNetworkCapacity = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -27941,61 +27941,61 @@ proto.lnrpc.NetworkInfo.prototype.setAvgChannelSize = function(value) { /** * optional int64 min_channel_size = 8; - * @return {number} + * @return {string} */ proto.lnrpc.NetworkInfo.prototype.getMinChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.NetworkInfo.prototype.setMinChannelSize = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional int64 max_channel_size = 9; - * @return {number} + * @return {string} */ proto.lnrpc.NetworkInfo.prototype.getMaxChannelSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.NetworkInfo.prototype.setMaxChannelSize = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; /** * optional int64 median_channel_size_sat = 10; - * @return {number} + * @return {string} */ proto.lnrpc.NetworkInfo.prototype.getMedianChannelSizeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.NetworkInfo.prototype.setMedianChannelSizeSat = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; /** * optional uint64 num_zombie_chans = 11; - * @return {number} + * @return {string} */ proto.lnrpc.NetworkInfo.prototype.getNumZombieChans = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.NetworkInfo.prototype.setNumZombieChans = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; @@ -29026,7 +29026,7 @@ proto.lnrpc.ChannelEdgeUpdate.toObject = function(includeInstance, msg) { var f, obj = { chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - capacity: jspb.Message.getFieldWithDefault(msg, 3, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 3, "0"), routingPolicy: (f = msg.getRoutingPolicy()) && proto.lnrpc.RoutingPolicy.toObject(includeInstance, f), advertisingNode: jspb.Message.getFieldWithDefault(msg, 5, ""), connectingNode: jspb.Message.getFieldWithDefault(msg, 6, "") @@ -29076,7 +29076,7 @@ proto.lnrpc.ChannelEdgeUpdate.deserializeBinaryFromReader = function(msg, reader msg.setChanPoint(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCapacity(value); break; case 4: @@ -29137,8 +29137,8 @@ proto.lnrpc.ChannelEdgeUpdate.serializeBinaryToWriter = function(message, writer ); } f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -29215,16 +29215,16 @@ proto.lnrpc.ChannelEdgeUpdate.prototype.hasChanPoint = function() { /** * optional int64 capacity = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelEdgeUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelEdgeUpdate.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -29336,7 +29336,7 @@ proto.lnrpc.ClosedChannelUpdate.prototype.toObject = function(opt_includeInstanc proto.lnrpc.ClosedChannelUpdate.toObject = function(includeInstance, msg) { var f, obj = { chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - capacity: jspb.Message.getFieldWithDefault(msg, 2, 0), + capacity: jspb.Message.getFieldWithDefault(msg, 2, "0"), closedHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f) }; @@ -29380,7 +29380,7 @@ proto.lnrpc.ClosedChannelUpdate.deserializeBinaryFromReader = function(msg, read msg.setChanId(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCapacity(value); break; case 3: @@ -29429,8 +29429,8 @@ proto.lnrpc.ClosedChannelUpdate.serializeBinaryToWriter = function(message, writ ); } f = message.getCapacity(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); @@ -29470,16 +29470,16 @@ proto.lnrpc.ClosedChannelUpdate.prototype.setChanId = function(value) { /** * optional int64 capacity = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ClosedChannelUpdate.prototype.getCapacity = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ClosedChannelUpdate.prototype.setCapacity = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -30003,24 +30003,24 @@ proto.lnrpc.Invoice.toObject = function(includeInstance, msg) { memo: jspb.Message.getFieldWithDefault(msg, 1, ""), rPreimage: msg.getRPreimage_asB64(), rHash: msg.getRHash_asB64(), - value: jspb.Message.getFieldWithDefault(msg, 5, 0), - valueMsat: jspb.Message.getFieldWithDefault(msg, 23, 0), + value: jspb.Message.getFieldWithDefault(msg, 5, "0"), + valueMsat: jspb.Message.getFieldWithDefault(msg, 23, "0"), settled: jspb.Message.getFieldWithDefault(msg, 6, false), - creationDate: jspb.Message.getFieldWithDefault(msg, 7, 0), - settleDate: jspb.Message.getFieldWithDefault(msg, 8, 0), + creationDate: jspb.Message.getFieldWithDefault(msg, 7, "0"), + settleDate: jspb.Message.getFieldWithDefault(msg, 8, "0"), paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), descriptionHash: msg.getDescriptionHash_asB64(), - expiry: jspb.Message.getFieldWithDefault(msg, 11, 0), + expiry: jspb.Message.getFieldWithDefault(msg, 11, "0"), fallbackAddr: jspb.Message.getFieldWithDefault(msg, 12, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 13, 0), + cltvExpiry: jspb.Message.getFieldWithDefault(msg, 13, "0"), routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), proto.lnrpc.RouteHint.toObject, includeInstance), pb_private: jspb.Message.getFieldWithDefault(msg, 15, false), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 17, 0), - amtPaid: jspb.Message.getFieldWithDefault(msg, 18, 0), - amtPaidSat: jspb.Message.getFieldWithDefault(msg, 19, 0), - amtPaidMsat: jspb.Message.getFieldWithDefault(msg, 20, 0), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, "0"), + settleIndex: jspb.Message.getFieldWithDefault(msg, 17, "0"), + amtPaid: jspb.Message.getFieldWithDefault(msg, 18, "0"), + amtPaidSat: jspb.Message.getFieldWithDefault(msg, 19, "0"), + amtPaidMsat: jspb.Message.getFieldWithDefault(msg, 20, "0"), state: jspb.Message.getFieldWithDefault(msg, 21, 0), htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), proto.lnrpc.InvoiceHTLC.toObject, includeInstance), @@ -30077,11 +30077,11 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { msg.setRHash(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setValue(value); break; case 23: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setValueMsat(value); break; case 6: @@ -30089,11 +30089,11 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { msg.setSettled(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCreationDate(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSettleDate(value); break; case 9: @@ -30105,7 +30105,7 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { msg.setDescriptionHash(value); break; case 11: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setExpiry(value); break; case 12: @@ -30113,7 +30113,7 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { msg.setFallbackAddr(value); break; case 13: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setCltvExpiry(value); break; case 14: @@ -30126,23 +30126,23 @@ proto.lnrpc.Invoice.deserializeBinaryFromReader = function(msg, reader) { msg.setPrivate(value); break; case 16: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAddIndex(value); break; case 17: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSettleIndex(value); break; case 18: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtPaid(value); break; case 19: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtPaidSat(value); break; case 20: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmtPaidMsat(value); break; case 21: @@ -30223,15 +30223,15 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { ); } f = message.getValue(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getValueMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 23, f ); @@ -30244,15 +30244,15 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { ); } f = message.getCreationDate(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); } f = message.getSettleDate(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 8, f ); @@ -30272,8 +30272,8 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { ); } f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 11, f ); @@ -30286,8 +30286,8 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { ); } f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 13, f ); @@ -30308,36 +30308,36 @@ proto.lnrpc.Invoice.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 16, f ); } f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 17, f ); } f = message.getAmtPaid(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 18, f ); } f = message.getAmtPaidSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 19, f ); } f = message.getAmtPaidMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 20, f ); @@ -30490,31 +30490,31 @@ proto.lnrpc.Invoice.prototype.setRHash = function(value) { /** * optional int64 value = 5; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 value_msat = 23; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getValueMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setValueMsat = function(value) { - jspb.Message.setProto3IntField(this, 23, value); + jspb.Message.setProto3StringIntField(this, 23, value); }; @@ -30537,31 +30537,31 @@ proto.lnrpc.Invoice.prototype.setSettled = function(value) { /** * optional int64 creation_date = 7; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setCreationDate = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional int64 settle_date = 8; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getSettleDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setSettleDate = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; @@ -30621,16 +30621,16 @@ proto.lnrpc.Invoice.prototype.setDescriptionHash = function(value) { /** * optional int64 expiry = 11; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setExpiry = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; @@ -30651,16 +30651,16 @@ proto.lnrpc.Invoice.prototype.setFallbackAddr = function(value) { /** * optional uint64 cltv_expiry = 13; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setCltvExpiry = function(value) { - jspb.Message.setProto3IntField(this, 13, value); + jspb.Message.setProto3StringIntField(this, 13, value); }; @@ -30714,76 +30714,76 @@ proto.lnrpc.Invoice.prototype.setPrivate = function(value) { /** * optional uint64 add_index = 16; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setAddIndex = function(value) { - jspb.Message.setProto3IntField(this, 16, value); + jspb.Message.setProto3StringIntField(this, 16, value); }; /** * optional uint64 settle_index = 17; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setSettleIndex = function(value) { - jspb.Message.setProto3IntField(this, 17, value); + jspb.Message.setProto3StringIntField(this, 17, value); }; /** * optional int64 amt_paid = 18; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getAmtPaid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setAmtPaid = function(value) { - jspb.Message.setProto3IntField(this, 18, value); + jspb.Message.setProto3StringIntField(this, 18, value); }; /** * optional int64 amt_paid_sat = 19; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getAmtPaidSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setAmtPaidSat = function(value) { - jspb.Message.setProto3IntField(this, 19, value); + jspb.Message.setProto3StringIntField(this, 19, value); }; /** * optional int64 amt_paid_msat = 20; - * @return {number} + * @return {string} */ proto.lnrpc.Invoice.prototype.getAmtPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Invoice.prototype.setAmtPaidMsat = function(value) { - jspb.Message.setProto3IntField(this, 20, value); + jspb.Message.setProto3StringIntField(this, 20, value); }; @@ -30972,15 +30972,15 @@ proto.lnrpc.InvoiceHTLC.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.InvoiceHTLC.toObject = function(includeInstance, msg) { var f, obj = { chanId: jspb.Message.getFieldWithDefault(msg, 1, "0"), - htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), - amtMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + htlcIndex: jspb.Message.getFieldWithDefault(msg, 2, "0"), + amtMsat: jspb.Message.getFieldWithDefault(msg, 3, "0"), acceptHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - acceptTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - resolveTime: jspb.Message.getFieldWithDefault(msg, 6, 0), + acceptTime: jspb.Message.getFieldWithDefault(msg, 5, "0"), + resolveTime: jspb.Message.getFieldWithDefault(msg, 6, "0"), expiryHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), state: jspb.Message.getFieldWithDefault(msg, 8, 0), customRecordsMap: (f = msg.getCustomRecordsMap()) ? f.toObject(includeInstance, undefined) : [], - mppTotalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, 0), + mppTotalAmtMsat: jspb.Message.getFieldWithDefault(msg, 10, "0"), amp: (f = msg.getAmp()) && proto.lnrpc.AMP.toObject(includeInstance, f) }; @@ -31023,11 +31023,11 @@ proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { msg.setChanId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setHtlcIndex(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmtMsat(value); break; case 4: @@ -31035,11 +31035,11 @@ proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { msg.setAcceptHeight(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAcceptTime(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setResolveTime(value); break; case 7: @@ -31057,7 +31057,7 @@ proto.lnrpc.InvoiceHTLC.deserializeBinaryFromReader = function(msg, reader) { }); break; case 10: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMppTotalAmtMsat(value); break; case 11: @@ -31102,15 +31102,15 @@ proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { ); } f = message.getHtlcIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getAmtMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -31123,15 +31123,15 @@ proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAcceptTime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getResolveTime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -31155,8 +31155,8 @@ proto.lnrpc.InvoiceHTLC.serializeBinaryToWriter = function(message, writer) { f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeUint64, jspb.BinaryWriter.prototype.writeBytes); } f = message.getMppTotalAmtMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 10, f ); @@ -31189,31 +31189,31 @@ proto.lnrpc.InvoiceHTLC.prototype.setChanId = function(value) { /** * optional uint64 htlc_index = 2; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceHTLC.prototype.getHtlcIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceHTLC.prototype.setHtlcIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 amt_msat = 3; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceHTLC.prototype.getAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceHTLC.prototype.setAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -31234,31 +31234,31 @@ proto.lnrpc.InvoiceHTLC.prototype.setAcceptHeight = function(value) { /** * optional int64 accept_time = 5; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceHTLC.prototype.getAcceptTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceHTLC.prototype.setAcceptTime = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 resolve_time = 6; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceHTLC.prototype.getResolveTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceHTLC.prototype.setResolveTime = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -31312,16 +31312,16 @@ proto.lnrpc.InvoiceHTLC.prototype.clearCustomRecordsMap = function() { /** * optional uint64 mpp_total_amt_msat = 10; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceHTLC.prototype.getMppTotalAmtMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceHTLC.prototype.setMppTotalAmtMsat = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; @@ -31750,7 +31750,7 @@ proto.lnrpc.AddInvoiceResponse.toObject = function(includeInstance, msg) { var f, obj = { rHash: msg.getRHash_asB64(), paymentRequest: jspb.Message.getFieldWithDefault(msg, 2, ""), - addIndex: jspb.Message.getFieldWithDefault(msg, 16, 0), + addIndex: jspb.Message.getFieldWithDefault(msg, 16, "0"), paymentAddr: msg.getPaymentAddr_asB64() }; @@ -31797,7 +31797,7 @@ proto.lnrpc.AddInvoiceResponse.deserializeBinaryFromReader = function(msg, reade msg.setPaymentRequest(value); break; case 16: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAddIndex(value); break; case 17: @@ -31848,8 +31848,8 @@ proto.lnrpc.AddInvoiceResponse.serializeBinaryToWriter = function(message, write ); } f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 16, f ); @@ -31920,16 +31920,16 @@ proto.lnrpc.AddInvoiceResponse.prototype.setPaymentRequest = function(value) { /** * optional uint64 add_index = 16; - * @return {number} + * @return {string} */ proto.lnrpc.AddInvoiceResponse.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.AddInvoiceResponse.prototype.setAddIndex = function(value) { - jspb.Message.setProto3IntField(this, 16, value); + jspb.Message.setProto3StringIntField(this, 16, value); }; @@ -32213,8 +32213,8 @@ proto.lnrpc.ListInvoiceRequest.prototype.toObject = function(opt_includeInstance proto.lnrpc.ListInvoiceRequest.toObject = function(includeInstance, msg) { var f, obj = { pendingOnly: jspb.Message.getFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 4, 0), - numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, 0), + indexOffset: jspb.Message.getFieldWithDefault(msg, 4, "0"), + numMaxInvoices: jspb.Message.getFieldWithDefault(msg, 5, "0"), reversed: jspb.Message.getFieldWithDefault(msg, 6, false) }; @@ -32257,11 +32257,11 @@ proto.lnrpc.ListInvoiceRequest.deserializeBinaryFromReader = function(msg, reade msg.setPendingOnly(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setIndexOffset(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setNumMaxInvoices(value); break; case 6: @@ -32305,15 +32305,15 @@ proto.lnrpc.ListInvoiceRequest.serializeBinaryToWriter = function(message, write ); } f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getNumMaxInvoices(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); @@ -32347,31 +32347,31 @@ proto.lnrpc.ListInvoiceRequest.prototype.setPendingOnly = function(value) { /** * optional uint64 index_offset = 4; - * @return {number} + * @return {string} */ proto.lnrpc.ListInvoiceRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListInvoiceRequest.prototype.setIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 num_max_invoices = 5; - * @return {number} + * @return {string} */ proto.lnrpc.ListInvoiceRequest.prototype.getNumMaxInvoices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListInvoiceRequest.prototype.setNumMaxInvoices = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -32448,8 +32448,8 @@ proto.lnrpc.ListInvoiceResponse.toObject = function(includeInstance, msg) { var f, obj = { invoicesList: jspb.Message.toObjectList(msg.getInvoicesList(), proto.lnrpc.Invoice.toObject, includeInstance), - lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) + lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, "0"), + firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -32492,11 +32492,11 @@ proto.lnrpc.ListInvoiceResponse.deserializeBinaryFromReader = function(msg, read msg.addInvoices(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setLastIndexOffset(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFirstIndexOffset(value); break; default: @@ -32537,15 +32537,15 @@ proto.lnrpc.ListInvoiceResponse.serializeBinaryToWriter = function(message, writ ); } f = message.getLastIndexOffset(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getFirstIndexOffset(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -32586,31 +32586,31 @@ proto.lnrpc.ListInvoiceResponse.prototype.clearInvoicesList = function() { /** * optional uint64 last_index_offset = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ListInvoiceResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListInvoiceResponse.prototype.setLastIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 first_index_offset = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ListInvoiceResponse.prototype.getFirstIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListInvoiceResponse.prototype.setFirstIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -32661,8 +32661,8 @@ proto.lnrpc.InvoiceSubscription.prototype.toObject = function(opt_includeInstanc */ proto.lnrpc.InvoiceSubscription.toObject = function(includeInstance, msg) { var f, obj = { - addIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), - settleIndex: jspb.Message.getFieldWithDefault(msg, 2, 0) + addIndex: jspb.Message.getFieldWithDefault(msg, 1, "0"), + settleIndex: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -32700,11 +32700,11 @@ proto.lnrpc.InvoiceSubscription.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAddIndex(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSettleIndex(value); break; default: @@ -32737,15 +32737,15 @@ proto.lnrpc.InvoiceSubscription.prototype.serializeBinary = function() { proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAddIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } f = message.getSettleIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -32755,31 +32755,31 @@ proto.lnrpc.InvoiceSubscription.serializeBinaryToWriter = function(message, writ /** * optional uint64 add_index = 1; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceSubscription.prototype.getAddIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceSubscription.prototype.setAddIndex = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional uint64 settle_index = 2; - * @return {number} + * @return {string} */ proto.lnrpc.InvoiceSubscription.prototype.getSettleIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.InvoiceSubscription.prototype.setSettleIndex = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -32838,20 +32838,20 @@ proto.lnrpc.Payment.prototype.toObject = function(opt_includeInstance) { proto.lnrpc.Payment.toObject = function(includeInstance, msg) { var f, obj = { paymentHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - value: jspb.Message.getFieldWithDefault(msg, 2, 0), - creationDate: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0), + value: jspb.Message.getFieldWithDefault(msg, 2, "0"), + creationDate: jspb.Message.getFieldWithDefault(msg, 3, "0"), + fee: jspb.Message.getFieldWithDefault(msg, 5, "0"), paymentPreimage: jspb.Message.getFieldWithDefault(msg, 6, ""), - valueSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - valueMsat: jspb.Message.getFieldWithDefault(msg, 8, 0), + valueSat: jspb.Message.getFieldWithDefault(msg, 7, "0"), + valueMsat: jspb.Message.getFieldWithDefault(msg, 8, "0"), paymentRequest: jspb.Message.getFieldWithDefault(msg, 9, ""), status: jspb.Message.getFieldWithDefault(msg, 10, 0), - feeSat: jspb.Message.getFieldWithDefault(msg, 11, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), - creationTimeNs: jspb.Message.getFieldWithDefault(msg, 13, 0), + feeSat: jspb.Message.getFieldWithDefault(msg, 11, "0"), + feeMsat: jspb.Message.getFieldWithDefault(msg, 12, "0"), + creationTimeNs: jspb.Message.getFieldWithDefault(msg, 13, "0"), htlcsList: jspb.Message.toObjectList(msg.getHtlcsList(), proto.lnrpc.HTLCAttempt.toObject, includeInstance), - paymentIndex: jspb.Message.getFieldWithDefault(msg, 15, 0), + paymentIndex: jspb.Message.getFieldWithDefault(msg, 15, "0"), failureReason: jspb.Message.getFieldWithDefault(msg, 16, 0) }; @@ -32894,15 +32894,15 @@ proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentHash(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setValue(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCreationDate(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFee(value); break; case 6: @@ -32910,11 +32910,11 @@ proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentPreimage(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setValueSat(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setValueMsat(value); break; case 9: @@ -32926,15 +32926,15 @@ proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { msg.setStatus(value); break; case 11: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeeSat(value); break; case 12: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeeMsat(value); break; case 13: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCreationTimeNs(value); break; case 14: @@ -32943,7 +32943,7 @@ proto.lnrpc.Payment.deserializeBinaryFromReader = function(msg, reader) { msg.addHtlcs(value); break; case 15: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setPaymentIndex(value); break; case 16: @@ -32987,22 +32987,22 @@ proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { ); } f = message.getValue(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getCreationDate(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); @@ -33015,15 +33015,15 @@ proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { ); } f = message.getValueSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); } f = message.getValueMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 8, f ); @@ -33043,22 +33043,22 @@ proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { ); } f = message.getFeeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 11, f ); } f = message.getFeeMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 12, f ); } f = message.getCreationTimeNs(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 13, f ); @@ -33072,8 +33072,8 @@ proto.lnrpc.Payment.serializeBinaryToWriter = function(message, writer) { ); } f = message.getPaymentIndex(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 15, f ); @@ -33115,46 +33115,46 @@ proto.lnrpc.Payment.prototype.setPaymentHash = function(value) { /** * optional int64 value = 2; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 creation_date = 3; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getCreationDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setCreationDate = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 fee = 5; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -33175,31 +33175,31 @@ proto.lnrpc.Payment.prototype.setPaymentPreimage = function(value) { /** * optional int64 value_sat = 7; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setValueSat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional int64 value_msat = 8; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getValueMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setValueMsat = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; @@ -33235,46 +33235,46 @@ proto.lnrpc.Payment.prototype.setStatus = function(value) { /** * optional int64 fee_sat = 11; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; /** * optional int64 fee_msat = 12; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + jspb.Message.setProto3StringIntField(this, 12, value); }; /** * optional int64 creation_time_ns = 13; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getCreationTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setCreationTimeNs = function(value) { - jspb.Message.setProto3IntField(this, 13, value); + jspb.Message.setProto3StringIntField(this, 13, value); }; @@ -33311,16 +33311,16 @@ proto.lnrpc.Payment.prototype.clearHtlcsList = function() { /** * optional uint64 payment_index = 15; - * @return {number} + * @return {string} */ proto.lnrpc.Payment.prototype.getPaymentIndex = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Payment.prototype.setPaymentIndex = function(value) { - jspb.Message.setProto3IntField(this, 15, value); + jspb.Message.setProto3StringIntField(this, 15, value); }; @@ -33386,11 +33386,11 @@ proto.lnrpc.HTLCAttempt.prototype.toObject = function(opt_includeInstance) { */ proto.lnrpc.HTLCAttempt.toObject = function(includeInstance, msg) { var f, obj = { - attemptId: jspb.Message.getFieldWithDefault(msg, 7, 0), + attemptId: jspb.Message.getFieldWithDefault(msg, 7, "0"), status: jspb.Message.getFieldWithDefault(msg, 1, 0), route: (f = msg.getRoute()) && proto.lnrpc.Route.toObject(includeInstance, f), - attemptTimeNs: jspb.Message.getFieldWithDefault(msg, 3, 0), - resolveTimeNs: jspb.Message.getFieldWithDefault(msg, 4, 0), + attemptTimeNs: jspb.Message.getFieldWithDefault(msg, 3, "0"), + resolveTimeNs: jspb.Message.getFieldWithDefault(msg, 4, "0"), failure: (f = msg.getFailure()) && proto.lnrpc.Failure.toObject(includeInstance, f), preimage: msg.getPreimage_asB64() }; @@ -33430,7 +33430,7 @@ proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAttemptId(value); break; case 1: @@ -33443,11 +33443,11 @@ proto.lnrpc.HTLCAttempt.deserializeBinaryFromReader = function(msg, reader) { msg.setRoute(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAttemptTimeNs(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setResolveTimeNs(value); break; case 5: @@ -33489,8 +33489,8 @@ proto.lnrpc.HTLCAttempt.prototype.serializeBinary = function() { proto.lnrpc.HTLCAttempt.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAttemptId(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -33511,15 +33511,15 @@ proto.lnrpc.HTLCAttempt.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAttemptTimeNs(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getResolveTimeNs(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); @@ -33553,16 +33553,16 @@ proto.lnrpc.HTLCAttempt.HTLCStatus = { /** * optional uint64 attempt_id = 7; - * @return {number} + * @return {string} */ proto.lnrpc.HTLCAttempt.prototype.getAttemptId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLCAttempt.prototype.setAttemptId = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -33613,31 +33613,31 @@ proto.lnrpc.HTLCAttempt.prototype.hasRoute = function() { /** * optional int64 attempt_time_ns = 3; - * @return {number} + * @return {string} */ proto.lnrpc.HTLCAttempt.prototype.getAttemptTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLCAttempt.prototype.setAttemptTimeNs = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 resolve_time_ns = 4; - * @return {number} + * @return {string} */ proto.lnrpc.HTLCAttempt.prototype.getResolveTimeNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.HTLCAttempt.prototype.setResolveTimeNs = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -33758,8 +33758,8 @@ proto.lnrpc.ListPaymentsRequest.prototype.toObject = function(opt_includeInstanc proto.lnrpc.ListPaymentsRequest.toObject = function(includeInstance, msg) { var f, obj = { includeIncomplete: jspb.Message.getFieldWithDefault(msg, 1, false), - indexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxPayments: jspb.Message.getFieldWithDefault(msg, 3, 0), + indexOffset: jspb.Message.getFieldWithDefault(msg, 2, "0"), + maxPayments: jspb.Message.getFieldWithDefault(msg, 3, "0"), reversed: jspb.Message.getFieldWithDefault(msg, 4, false) }; @@ -33802,11 +33802,11 @@ proto.lnrpc.ListPaymentsRequest.deserializeBinaryFromReader = function(msg, read msg.setIncludeIncomplete(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setIndexOffset(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxPayments(value); break; case 4: @@ -33850,15 +33850,15 @@ proto.lnrpc.ListPaymentsRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getIndexOffset(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getMaxPayments(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -33892,31 +33892,31 @@ proto.lnrpc.ListPaymentsRequest.prototype.setIncludeIncomplete = function(value) /** * optional uint64 index_offset = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ListPaymentsRequest.prototype.getIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListPaymentsRequest.prototype.setIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 max_payments = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ListPaymentsRequest.prototype.getMaxPayments = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListPaymentsRequest.prototype.setMaxPayments = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -33993,8 +33993,8 @@ proto.lnrpc.ListPaymentsResponse.toObject = function(includeInstance, msg) { var f, obj = { paymentsList: jspb.Message.toObjectList(msg.getPaymentsList(), proto.lnrpc.Payment.toObject, includeInstance), - firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0) + firstIndexOffset: jspb.Message.getFieldWithDefault(msg, 2, "0"), + lastIndexOffset: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -34037,11 +34037,11 @@ proto.lnrpc.ListPaymentsResponse.deserializeBinaryFromReader = function(msg, rea msg.addPayments(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFirstIndexOffset(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setLastIndexOffset(value); break; default: @@ -34082,15 +34082,15 @@ proto.lnrpc.ListPaymentsResponse.serializeBinaryToWriter = function(message, wri ); } f = message.getFirstIndexOffset(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getLastIndexOffset(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -34131,31 +34131,31 @@ proto.lnrpc.ListPaymentsResponse.prototype.clearPaymentsList = function() { /** * optional uint64 first_index_offset = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ListPaymentsResponse.prototype.getFirstIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListPaymentsResponse.prototype.setFirstIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 last_index_offset = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ListPaymentsResponse.prototype.getLastIndexOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ListPaymentsResponse.prototype.setLastIndexOffset = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -35263,17 +35263,17 @@ proto.lnrpc.PayReq.toObject = function(includeInstance, msg) { var f, obj = { destination: jspb.Message.getFieldWithDefault(msg, 1, ""), paymentHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - numSatoshis: jspb.Message.getFieldWithDefault(msg, 3, 0), - timestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiry: jspb.Message.getFieldWithDefault(msg, 5, 0), + numSatoshis: jspb.Message.getFieldWithDefault(msg, 3, "0"), + timestamp: jspb.Message.getFieldWithDefault(msg, 4, "0"), + expiry: jspb.Message.getFieldWithDefault(msg, 5, "0"), description: jspb.Message.getFieldWithDefault(msg, 6, ""), descriptionHash: jspb.Message.getFieldWithDefault(msg, 7, ""), fallbackAddr: jspb.Message.getFieldWithDefault(msg, 8, ""), - cltvExpiry: jspb.Message.getFieldWithDefault(msg, 9, 0), + cltvExpiry: jspb.Message.getFieldWithDefault(msg, 9, "0"), routeHintsList: jspb.Message.toObjectList(msg.getRouteHintsList(), proto.lnrpc.RouteHint.toObject, includeInstance), paymentAddr: msg.getPaymentAddr_asB64(), - numMsat: jspb.Message.getFieldWithDefault(msg, 12, 0), + numMsat: jspb.Message.getFieldWithDefault(msg, 12, "0"), featuresMap: (f = msg.getFeaturesMap()) ? f.toObject(includeInstance, proto.lnrpc.Feature.toObject) : [] }; @@ -35320,15 +35320,15 @@ proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentHash(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setNumSatoshis(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTimestamp(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setExpiry(value); break; case 6: @@ -35344,7 +35344,7 @@ proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { msg.setFallbackAddr(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCltvExpiry(value); break; case 10: @@ -35357,7 +35357,7 @@ proto.lnrpc.PayReq.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentAddr(value); break; case 12: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setNumMsat(value); break; case 13: @@ -35410,22 +35410,22 @@ proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { ); } f = message.getNumSatoshis(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getTimestamp(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getExpiry(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); @@ -35452,8 +35452,8 @@ proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { ); } f = message.getCltvExpiry(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); @@ -35474,8 +35474,8 @@ proto.lnrpc.PayReq.serializeBinaryToWriter = function(message, writer) { ); } f = message.getNumMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 12, f ); @@ -35519,46 +35519,46 @@ proto.lnrpc.PayReq.prototype.setPaymentHash = function(value) { /** * optional int64 num_satoshis = 3; - * @return {number} + * @return {string} */ proto.lnrpc.PayReq.prototype.getNumSatoshis = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PayReq.prototype.setNumSatoshis = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 timestamp = 4; - * @return {number} + * @return {string} */ proto.lnrpc.PayReq.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PayReq.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 expiry = 5; - * @return {number} + * @return {string} */ proto.lnrpc.PayReq.prototype.getExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PayReq.prototype.setExpiry = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -35609,16 +35609,16 @@ proto.lnrpc.PayReq.prototype.setFallbackAddr = function(value) { /** * optional int64 cltv_expiry = 9; - * @return {number} + * @return {string} */ proto.lnrpc.PayReq.prototype.getCltvExpiry = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PayReq.prototype.setCltvExpiry = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -35694,16 +35694,16 @@ proto.lnrpc.PayReq.prototype.setPaymentAddr = function(value) { /** * optional int64 num_msat = 12; - * @return {number} + * @return {string} */ proto.lnrpc.PayReq.prototype.getNumMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PayReq.prototype.setNumMsat = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + jspb.Message.setProto3StringIntField(this, 12, value); }; @@ -36090,8 +36090,8 @@ proto.lnrpc.ChannelFeeReport.toObject = function(includeInstance, msg) { var f, obj = { chanId: jspb.Message.getFieldWithDefault(msg, 5, "0"), channelPoint: jspb.Message.getFieldWithDefault(msg, 1, ""), - baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 2, 0), - feePerMil: jspb.Message.getFieldWithDefault(msg, 3, 0), + baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 2, "0"), + feePerMil: jspb.Message.getFieldWithDefault(msg, 3, "0"), feeRate: +jspb.Message.getFieldWithDefault(msg, 4, 0.0) }; @@ -36138,11 +36138,11 @@ proto.lnrpc.ChannelFeeReport.deserializeBinaryFromReader = function(msg, reader) msg.setChannelPoint(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setBaseFeeMsat(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setFeePerMil(value); break; case 4: @@ -36193,15 +36193,15 @@ proto.lnrpc.ChannelFeeReport.serializeBinaryToWriter = function(message, writer) ); } f = message.getBaseFeeMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getFeePerMil(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -36248,31 +36248,31 @@ proto.lnrpc.ChannelFeeReport.prototype.setChannelPoint = function(value) { /** * optional int64 base_fee_msat = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelFeeReport.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelFeeReport.prototype.setBaseFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 fee_per_mil = 3; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelFeeReport.prototype.getFeePerMil = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelFeeReport.prototype.setFeePerMil = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -36347,9 +36347,9 @@ proto.lnrpc.FeeReportResponse.toObject = function(includeInstance, msg) { var f, obj = { channelFeesList: jspb.Message.toObjectList(msg.getChannelFeesList(), proto.lnrpc.ChannelFeeReport.toObject, includeInstance), - dayFeeSum: jspb.Message.getFieldWithDefault(msg, 2, 0), - weekFeeSum: jspb.Message.getFieldWithDefault(msg, 3, 0), - monthFeeSum: jspb.Message.getFieldWithDefault(msg, 4, 0) + dayFeeSum: jspb.Message.getFieldWithDefault(msg, 2, "0"), + weekFeeSum: jspb.Message.getFieldWithDefault(msg, 3, "0"), + monthFeeSum: jspb.Message.getFieldWithDefault(msg, 4, "0") }; if (includeInstance) { @@ -36392,15 +36392,15 @@ proto.lnrpc.FeeReportResponse.deserializeBinaryFromReader = function(msg, reader msg.addChannelFees(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setDayFeeSum(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setWeekFeeSum(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMonthFeeSum(value); break; default: @@ -36441,22 +36441,22 @@ proto.lnrpc.FeeReportResponse.serializeBinaryToWriter = function(message, writer ); } f = message.getDayFeeSum(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getWeekFeeSum(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); } f = message.getMonthFeeSum(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -36497,46 +36497,46 @@ proto.lnrpc.FeeReportResponse.prototype.clearChannelFeesList = function() { /** * optional uint64 day_fee_sum = 2; - * @return {number} + * @return {string} */ proto.lnrpc.FeeReportResponse.prototype.getDayFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.FeeReportResponse.prototype.setDayFeeSum = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 week_fee_sum = 3; - * @return {number} + * @return {string} */ proto.lnrpc.FeeReportResponse.prototype.getWeekFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.FeeReportResponse.prototype.setWeekFeeSum = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional uint64 month_fee_sum = 4; - * @return {number} + * @return {string} */ proto.lnrpc.FeeReportResponse.prototype.getMonthFeeSum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.FeeReportResponse.prototype.setMonthFeeSum = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -36615,11 +36615,11 @@ proto.lnrpc.PolicyUpdateRequest.toObject = function(includeInstance, msg) { var f, obj = { global: jspb.Message.getFieldWithDefault(msg, 1, false), chanPoint: (f = msg.getChanPoint()) && proto.lnrpc.ChannelPoint.toObject(includeInstance, f), - baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 3, 0), + baseFeeMsat: jspb.Message.getFieldWithDefault(msg, 3, "0"), feeRate: +jspb.Message.getFieldWithDefault(msg, 4, 0.0), timeLockDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, 0), - minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxHtlcMsat: jspb.Message.getFieldWithDefault(msg, 6, "0"), + minHtlcMsat: jspb.Message.getFieldWithDefault(msg, 7, "0"), minHtlcMsatSpecified: jspb.Message.getFieldWithDefault(msg, 8, false) }; @@ -36667,7 +36667,7 @@ proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, read msg.setChanPoint(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setBaseFeeMsat(value); break; case 4: @@ -36679,11 +36679,11 @@ proto.lnrpc.PolicyUpdateRequest.deserializeBinaryFromReader = function(msg, read msg.setTimeLockDelta(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxHtlcMsat(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinHtlcMsat(value); break; case 8: @@ -36735,8 +36735,8 @@ proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getBaseFeeMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -36756,15 +36756,15 @@ proto.lnrpc.PolicyUpdateRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getMaxHtlcMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getMinHtlcMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -36842,16 +36842,16 @@ proto.lnrpc.PolicyUpdateRequest.prototype.hasChanPoint = function() { /** * optional int64 base_fee_msat = 3; - * @return {number} + * @return {string} */ proto.lnrpc.PolicyUpdateRequest.prototype.getBaseFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PolicyUpdateRequest.prototype.setBaseFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -36887,31 +36887,31 @@ proto.lnrpc.PolicyUpdateRequest.prototype.setTimeLockDelta = function(value) { /** * optional uint64 max_htlc_msat = 6; - * @return {number} + * @return {string} */ proto.lnrpc.PolicyUpdateRequest.prototype.getMaxHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PolicyUpdateRequest.prototype.setMaxHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 min_htlc_msat = 7; - * @return {number} + * @return {string} */ proto.lnrpc.PolicyUpdateRequest.prototype.getMinHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.PolicyUpdateRequest.prototype.setMinHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -37095,8 +37095,8 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.toObject = function(opt_includeIn */ proto.lnrpc.ForwardingHistoryRequest.toObject = function(includeInstance, msg) { var f, obj = { - startTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - endTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + startTime: jspb.Message.getFieldWithDefault(msg, 1, "0"), + endTime: jspb.Message.getFieldWithDefault(msg, 2, "0"), indexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0), numMaxEvents: jspb.Message.getFieldWithDefault(msg, 4, 0) }; @@ -37136,11 +37136,11 @@ proto.lnrpc.ForwardingHistoryRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setStartTime(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setEndTime(value); break; case 3: @@ -37181,15 +37181,15 @@ proto.lnrpc.ForwardingHistoryRequest.prototype.serializeBinary = function() { proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } f = message.getEndTime(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -37213,31 +37213,31 @@ proto.lnrpc.ForwardingHistoryRequest.serializeBinaryToWriter = function(message, /** * optional uint64 start_time = 1; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingHistoryRequest.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingHistoryRequest.prototype.setStartTime = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional uint64 end_time = 2; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingHistoryRequest.prototype.getEndTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingHistoryRequest.prototype.setEndTime = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -37318,16 +37318,16 @@ proto.lnrpc.ForwardingEvent.prototype.toObject = function(opt_includeInstance) { */ proto.lnrpc.ForwardingEvent.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestamp: jspb.Message.getFieldWithDefault(msg, 1, "0"), chanIdIn: jspb.Message.getFieldWithDefault(msg, 2, "0"), chanIdOut: jspb.Message.getFieldWithDefault(msg, 4, "0"), - amtIn: jspb.Message.getFieldWithDefault(msg, 5, 0), - amtOut: jspb.Message.getFieldWithDefault(msg, 6, 0), - fee: jspb.Message.getFieldWithDefault(msg, 7, 0), - feeMsat: jspb.Message.getFieldWithDefault(msg, 8, 0), - amtInMsat: jspb.Message.getFieldWithDefault(msg, 9, 0), - amtOutMsat: jspb.Message.getFieldWithDefault(msg, 10, 0), - timestampNs: jspb.Message.getFieldWithDefault(msg, 11, 0) + amtIn: jspb.Message.getFieldWithDefault(msg, 5, "0"), + amtOut: jspb.Message.getFieldWithDefault(msg, 6, "0"), + fee: jspb.Message.getFieldWithDefault(msg, 7, "0"), + feeMsat: jspb.Message.getFieldWithDefault(msg, 8, "0"), + amtInMsat: jspb.Message.getFieldWithDefault(msg, 9, "0"), + amtOutMsat: jspb.Message.getFieldWithDefault(msg, 10, "0"), + timestampNs: jspb.Message.getFieldWithDefault(msg, 11, "0") }; if (includeInstance) { @@ -37365,7 +37365,7 @@ proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTimestamp(value); break; case 2: @@ -37377,31 +37377,31 @@ proto.lnrpc.ForwardingEvent.deserializeBinaryFromReader = function(msg, reader) msg.setChanIdOut(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmtIn(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmtOut(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFee(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeMsat(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmtInMsat(value); break; case 10: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmtOutMsat(value); break; case 11: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTimestampNs(value); break; default: @@ -37434,8 +37434,8 @@ proto.lnrpc.ForwardingEvent.prototype.serializeBinary = function() { proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -37455,50 +37455,50 @@ proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) ); } f = message.getAmtIn(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getAmtOut(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getFee(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); } f = message.getFeeMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 8, f ); } f = message.getAmtInMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); } f = message.getAmtOutMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 10, f ); } f = message.getTimestampNs(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 11, f ); @@ -37508,16 +37508,16 @@ proto.lnrpc.ForwardingEvent.serializeBinaryToWriter = function(message, writer) /** * optional uint64 timestamp = 1; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -37553,106 +37553,106 @@ proto.lnrpc.ForwardingEvent.prototype.setChanIdOut = function(value) { /** * optional uint64 amt_in = 5; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getAmtIn = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setAmtIn = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional uint64 amt_out = 6; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getAmtOut = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setAmtOut = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 fee = 7; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setFee = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional uint64 fee_msat = 8; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getFeeMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setFeeMsat = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional uint64 amt_in_msat = 9; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getAmtInMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setAmtInMsat = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; /** * optional uint64 amt_out_msat = 10; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getAmtOutMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setAmtOutMsat = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; /** * optional uint64 timestamp_ns = 11; - * @return {number} + * @return {string} */ proto.lnrpc.ForwardingEvent.prototype.getTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ForwardingEvent.prototype.setTimestampNs = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; @@ -39749,7 +39749,7 @@ proto.lnrpc.BakeMacaroonRequest.toObject = function(includeInstance, msg) { var f, obj = { permissionsList: jspb.Message.toObjectList(msg.getPermissionsList(), proto.lnrpc.MacaroonPermission.toObject, includeInstance), - rootKeyId: jspb.Message.getFieldWithDefault(msg, 2, 0) + rootKeyId: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -39792,7 +39792,7 @@ proto.lnrpc.BakeMacaroonRequest.deserializeBinaryFromReader = function(msg, read msg.addPermissions(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setRootKeyId(value); break; default: @@ -39833,8 +39833,8 @@ proto.lnrpc.BakeMacaroonRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getRootKeyId(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -39875,16 +39875,16 @@ proto.lnrpc.BakeMacaroonRequest.prototype.clearPermissionsList = function() { /** * optional uint64 root_key_id = 2; - * @return {number} + * @return {string} */ proto.lnrpc.BakeMacaroonRequest.prototype.getRootKeyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.BakeMacaroonRequest.prototype.setRootKeyId = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -40238,7 +40238,7 @@ proto.lnrpc.ListMacaroonIDsResponse.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Array} */ (reader.readPackedUint64()); + var value = /** @type {!Array} */ (reader.readPackedUint64String()); msg.setRootKeyIdsList(value); break; default: @@ -40272,7 +40272,7 @@ proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter = function(message, var f = undefined; f = message.getRootKeyIdsList(); if (f.length > 0) { - writer.writePackedUint64( + writer.writePackedUint64String( 1, f ); @@ -40282,21 +40282,21 @@ proto.lnrpc.ListMacaroonIDsResponse.serializeBinaryToWriter = function(message, /** * repeated uint64 root_key_ids = 1; - * @return {!Array} + * @return {!Array} */ proto.lnrpc.ListMacaroonIDsResponse.prototype.getRootKeyIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; -/** @param {!Array} value */ +/** @param {!Array} value */ proto.lnrpc.ListMacaroonIDsResponse.prototype.setRootKeyIdsList = function(value) { jspb.Message.setField(this, 1, value || []); }; /** - * @param {!number} value + * @param {!string} value * @param {number=} opt_index */ proto.lnrpc.ListMacaroonIDsResponse.prototype.addRootKeyIds = function(value, opt_index) { @@ -40356,7 +40356,7 @@ proto.lnrpc.DeleteMacaroonIDRequest.prototype.toObject = function(opt_includeIns */ proto.lnrpc.DeleteMacaroonIDRequest.toObject = function(includeInstance, msg) { var f, obj = { - rootKeyId: jspb.Message.getFieldWithDefault(msg, 1, 0) + rootKeyId: jspb.Message.getFieldWithDefault(msg, 1, "0") }; if (includeInstance) { @@ -40394,7 +40394,7 @@ proto.lnrpc.DeleteMacaroonIDRequest.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setRootKeyId(value); break; default: @@ -40427,8 +40427,8 @@ proto.lnrpc.DeleteMacaroonIDRequest.prototype.serializeBinary = function() { proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRootKeyId(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -40438,16 +40438,16 @@ proto.lnrpc.DeleteMacaroonIDRequest.serializeBinaryToWriter = function(message, /** * optional uint64 root_key_id = 1; - * @return {number} + * @return {string} */ proto.lnrpc.DeleteMacaroonIDRequest.prototype.getRootKeyId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.DeleteMacaroonIDRequest.prototype.setRootKeyId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -41072,7 +41072,7 @@ proto.lnrpc.Failure.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), channelUpdate: (f = msg.getChannelUpdate()) && proto.lnrpc.ChannelUpdate.toObject(includeInstance, f), - htlcMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), + htlcMsat: jspb.Message.getFieldWithDefault(msg, 4, "0"), onionSha256: msg.getOnionSha256_asB64(), cltvExpiry: jspb.Message.getFieldWithDefault(msg, 6, 0), flags: jspb.Message.getFieldWithDefault(msg, 7, 0), @@ -41124,7 +41124,7 @@ proto.lnrpc.Failure.deserializeBinaryFromReader = function(msg, reader) { msg.setChannelUpdate(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setHtlcMsat(value); break; case 5: @@ -41192,8 +41192,8 @@ proto.lnrpc.Failure.serializeBinaryToWriter = function(message, writer) { ); } f = message.getHtlcMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -41317,16 +41317,16 @@ proto.lnrpc.Failure.prototype.hasChannelUpdate = function() { /** * optional uint64 htlc_msat = 4; - * @return {number} + * @return {string} */ proto.lnrpc.Failure.prototype.getHtlcMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.Failure.prototype.setHtlcMsat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -41483,10 +41483,10 @@ proto.lnrpc.ChannelUpdate.toObject = function(includeInstance, msg) { messageFlags: jspb.Message.getFieldWithDefault(msg, 10, 0), channelFlags: jspb.Message.getFieldWithDefault(msg, 5, 0), timeLockDelta: jspb.Message.getFieldWithDefault(msg, 6, 0), - htlcMinimumMsat: jspb.Message.getFieldWithDefault(msg, 7, 0), + htlcMinimumMsat: jspb.Message.getFieldWithDefault(msg, 7, "0"), baseFee: jspb.Message.getFieldWithDefault(msg, 8, 0), feeRate: jspb.Message.getFieldWithDefault(msg, 9, 0), - htlcMaximumMsat: jspb.Message.getFieldWithDefault(msg, 11, 0), + htlcMaximumMsat: jspb.Message.getFieldWithDefault(msg, 11, "0"), extraOpaqueData: msg.getExtraOpaqueData_asB64() }; @@ -41553,7 +41553,7 @@ proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { msg.setTimeLockDelta(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setHtlcMinimumMsat(value); break; case 8: @@ -41565,7 +41565,7 @@ proto.lnrpc.ChannelUpdate.deserializeBinaryFromReader = function(msg, reader) { msg.setFeeRate(value); break; case 11: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setHtlcMaximumMsat(value); break; case 12: @@ -41651,8 +41651,8 @@ proto.lnrpc.ChannelUpdate.serializeBinaryToWriter = function(message, writer) { ); } f = message.getHtlcMinimumMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -41672,8 +41672,8 @@ proto.lnrpc.ChannelUpdate.serializeBinaryToWriter = function(message, writer) { ); } f = message.getHtlcMaximumMsat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 11, f ); @@ -41843,16 +41843,16 @@ proto.lnrpc.ChannelUpdate.prototype.setTimeLockDelta = function(value) { /** * optional uint64 htlc_minimum_msat = 7; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelUpdate.prototype.getHtlcMinimumMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelUpdate.prototype.setHtlcMinimumMsat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -41888,16 +41888,16 @@ proto.lnrpc.ChannelUpdate.prototype.setFeeRate = function(value) { /** * optional uint64 htlc_maximum_msat = 11; - * @return {number} + * @return {string} */ proto.lnrpc.ChannelUpdate.prototype.getHtlcMaximumMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.lnrpc.ChannelUpdate.prototype.setHtlcMaximumMsat = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; diff --git a/app/src/types/generated/loop_pb.d.ts b/app/src/types/generated/loop_pb.d.ts index d12c85dd..a9d75485 100644 --- a/app/src/types/generated/loop_pb.d.ts +++ b/app/src/types/generated/loop_pb.d.ts @@ -5,34 +5,34 @@ import * as jspb from "google-protobuf"; import * as google_api_annotations_pb from "./google/api/annotations_pb"; export class LoopOutRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; getDest(): string; setDest(value: string): void; - getMaxSwapRoutingFee(): number; - setMaxSwapRoutingFee(value: number): void; + getMaxSwapRoutingFee(): string; + setMaxSwapRoutingFee(value: string): void; - getMaxPrepayRoutingFee(): number; - setMaxPrepayRoutingFee(value: number): void; + getMaxPrepayRoutingFee(): string; + setMaxPrepayRoutingFee(value: string): void; - getMaxSwapFee(): number; - setMaxSwapFee(value: number): void; + getMaxSwapFee(): string; + setMaxSwapFee(value: string): void; - getMaxPrepayAmt(): number; - setMaxPrepayAmt(value: number): void; + getMaxPrepayAmt(): string; + setMaxPrepayAmt(value: string): void; - getMaxMinerFee(): number; - setMaxMinerFee(value: number): void; + getMaxMinerFee(): string; + setMaxMinerFee(value: string): void; - getLoopOutChannel(): number; - setLoopOutChannel(value: number): void; + getLoopOutChannel(): string; + setLoopOutChannel(value: string): void; clearOutgoingChanSetList(): void; - getOutgoingChanSetList(): Array; - setOutgoingChanSetList(value: Array): void; - addOutgoingChanSet(value: number, index?: number): number; + getOutgoingChanSetList(): Array; + setOutgoingChanSetList(value: Array): void; + addOutgoingChanSet(value: string, index?: number): string; getSweepConfTarget(): number; setSweepConfTarget(value: number): void; @@ -40,8 +40,8 @@ export class LoopOutRequest extends jspb.Message { getHtlcConfirmations(): number; setHtlcConfirmations(value: number): void; - getSwapPublicationDeadline(): number; - setSwapPublicationDeadline(value: number): void; + getSwapPublicationDeadline(): string; + setSwapPublicationDeadline(value: string): void; getLabel(): string; setLabel(value: string): void; @@ -61,32 +61,32 @@ export class LoopOutRequest extends jspb.Message { export namespace LoopOutRequest { export type AsObject = { - amt: number, + amt: string, dest: string, - maxSwapRoutingFee: number, - maxPrepayRoutingFee: number, - maxSwapFee: number, - maxPrepayAmt: number, - maxMinerFee: number, - loopOutChannel: number, - outgoingChanSetList: Array, + maxSwapRoutingFee: string, + maxPrepayRoutingFee: string, + maxSwapFee: string, + maxPrepayAmt: string, + maxMinerFee: string, + loopOutChannel: string, + outgoingChanSetList: Array, sweepConfTarget: number, htlcConfirmations: number, - swapPublicationDeadline: number, + swapPublicationDeadline: string, label: string, initiator: string, } } export class LoopInRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; - getMaxSwapFee(): number; - setMaxSwapFee(value: number): void; + getMaxSwapFee(): string; + setMaxSwapFee(value: string): void; - getMaxMinerFee(): number; - setMaxMinerFee(value: number): void; + getMaxMinerFee(): string; + setMaxMinerFee(value: string): void; getLastHop(): Uint8Array | string; getLastHop_asU8(): Uint8Array; @@ -117,9 +117,9 @@ export class LoopInRequest extends jspb.Message { export namespace LoopInRequest { export type AsObject = { - amt: number, - maxSwapFee: number, - maxMinerFee: number, + amt: string, + maxSwapFee: string, + maxMinerFee: string, lastHop: Uint8Array | string, externalHtlc: boolean, htlcConfTarget: number, @@ -187,8 +187,8 @@ export namespace MonitorRequest { } export class SwapStatus extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; getId(): string; setId(value: string): void; @@ -207,11 +207,11 @@ export class SwapStatus extends jspb.Message { getFailureReason(): FailureReasonMap[keyof FailureReasonMap]; setFailureReason(value: FailureReasonMap[keyof FailureReasonMap]): void; - getInitiationTime(): number; - setInitiationTime(value: number): void; + getInitiationTime(): string; + setInitiationTime(value: string): void; - getLastUpdateTime(): number; - setLastUpdateTime(value: number): void; + getLastUpdateTime(): string; + setLastUpdateTime(value: string): void; getHtlcAddress(): string; setHtlcAddress(value: string): void; @@ -222,14 +222,14 @@ export class SwapStatus extends jspb.Message { getHtlcAddressNp2wsh(): string; setHtlcAddressNp2wsh(value: string): void; - getCostServer(): number; - setCostServer(value: number): void; + getCostServer(): string; + setCostServer(value: string): void; - getCostOnchain(): number; - setCostOnchain(value: number): void; + getCostOnchain(): string; + setCostOnchain(value: string): void; - getCostOffchain(): number; - setCostOffchain(value: number): void; + getCostOffchain(): string; + setCostOffchain(value: string): void; getLabel(): string; setLabel(value: string): void; @@ -246,20 +246,20 @@ export class SwapStatus extends jspb.Message { export namespace SwapStatus { export type AsObject = { - amt: number, + amt: string, id: string, idBytes: Uint8Array | string, type: SwapTypeMap[keyof SwapTypeMap], state: SwapStateMap[keyof SwapStateMap], failureReason: FailureReasonMap[keyof FailureReasonMap], - initiationTime: number, - lastUpdateTime: number, + initiationTime: string, + lastUpdateTime: string, htlcAddress: string, htlcAddressP2wsh: string, htlcAddressNp2wsh: string, - costServer: number, - costOnchain: number, - costOffchain: number, + costServer: string, + costOnchain: string, + costOffchain: string, label: string, } } @@ -341,11 +341,11 @@ export namespace TermsRequest { } export class InTermsResponse extends jspb.Message { - getMinSwapAmount(): number; - setMinSwapAmount(value: number): void; + getMinSwapAmount(): string; + setMinSwapAmount(value: string): void; - getMaxSwapAmount(): number; - setMaxSwapAmount(value: number): void; + getMaxSwapAmount(): string; + setMaxSwapAmount(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InTermsResponse.AsObject; @@ -359,17 +359,17 @@ export class InTermsResponse extends jspb.Message { export namespace InTermsResponse { export type AsObject = { - minSwapAmount: number, - maxSwapAmount: number, + minSwapAmount: string, + maxSwapAmount: string, } } export class OutTermsResponse extends jspb.Message { - getMinSwapAmount(): number; - setMinSwapAmount(value: number): void; + getMinSwapAmount(): string; + setMinSwapAmount(value: string): void; - getMaxSwapAmount(): number; - setMaxSwapAmount(value: number): void; + getMaxSwapAmount(): string; + setMaxSwapAmount(value: string): void; getMinCltvDelta(): number; setMinCltvDelta(value: number): void; @@ -389,16 +389,16 @@ export class OutTermsResponse extends jspb.Message { export namespace OutTermsResponse { export type AsObject = { - minSwapAmount: number, - maxSwapAmount: number, + minSwapAmount: string, + maxSwapAmount: string, minCltvDelta: number, maxCltvDelta: number, } } export class QuoteRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; getConfTarget(): number; setConfTarget(value: number): void; @@ -406,8 +406,8 @@ export class QuoteRequest extends jspb.Message { getExternalHtlc(): boolean; setExternalHtlc(value: boolean): void; - getSwapPublicationDeadline(): number; - setSwapPublicationDeadline(value: number): void; + getSwapPublicationDeadline(): string; + setSwapPublicationDeadline(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QuoteRequest.AsObject; @@ -421,19 +421,19 @@ export class QuoteRequest extends jspb.Message { export namespace QuoteRequest { export type AsObject = { - amt: number, + amt: string, confTarget: number, externalHtlc: boolean, - swapPublicationDeadline: number, + swapPublicationDeadline: string, } } export class InQuoteResponse extends jspb.Message { - getSwapFeeSat(): number; - setSwapFeeSat(value: number): void; + getSwapFeeSat(): string; + setSwapFeeSat(value: string): void; - getHtlcPublishFeeSat(): number; - setHtlcPublishFeeSat(value: number): void; + getHtlcPublishFeeSat(): string; + setHtlcPublishFeeSat(value: string): void; getCltvDelta(): number; setCltvDelta(value: number): void; @@ -453,22 +453,22 @@ export class InQuoteResponse extends jspb.Message { export namespace InQuoteResponse { export type AsObject = { - swapFeeSat: number, - htlcPublishFeeSat: number, + swapFeeSat: string, + htlcPublishFeeSat: string, cltvDelta: number, confTarget: number, } } export class OutQuoteResponse extends jspb.Message { - getSwapFeeSat(): number; - setSwapFeeSat(value: number): void; + getSwapFeeSat(): string; + setSwapFeeSat(value: string): void; - getPrepayAmtSat(): number; - setPrepayAmtSat(value: number): void; + getPrepayAmtSat(): string; + setPrepayAmtSat(value: string): void; - getHtlcSweepFeeSat(): number; - setHtlcSweepFeeSat(value: number): void; + getHtlcSweepFeeSat(): string; + setHtlcSweepFeeSat(value: string): void; getSwapPaymentDest(): Uint8Array | string; getSwapPaymentDest_asU8(): Uint8Array; @@ -493,9 +493,9 @@ export class OutQuoteResponse extends jspb.Message { export namespace OutQuoteResponse { export type AsObject = { - swapFeeSat: number, - prepayAmtSat: number, - htlcSweepFeeSat: number, + swapFeeSat: string, + prepayAmtSat: string, + htlcSweepFeeSat: string, swapPaymentDest: Uint8Array | string, cltvDelta: number, confTarget: number, @@ -556,14 +556,14 @@ export class LsatToken extends jspb.Message { getPaymentPreimage_asB64(): string; setPaymentPreimage(value: Uint8Array | string): void; - getAmountPaidMsat(): number; - setAmountPaidMsat(value: number): void; + getAmountPaidMsat(): string; + setAmountPaidMsat(value: string): void; - getRoutingFeePaidMsat(): number; - setRoutingFeePaidMsat(value: number): void; + getRoutingFeePaidMsat(): string; + setRoutingFeePaidMsat(value: string): void; - getTimeCreated(): number; - setTimeCreated(value: number): void; + getTimeCreated(): string; + setTimeCreated(value: string): void; getExpired(): boolean; setExpired(value: boolean): void; @@ -586,9 +586,9 @@ export namespace LsatToken { baseMacaroon: Uint8Array | string, paymentHash: Uint8Array | string, paymentPreimage: Uint8Array | string, - amountPaidMsat: number, - routingFeePaidMsat: number, - timeCreated: number, + amountPaidMsat: string, + routingFeePaidMsat: string, + timeCreated: string, expired: boolean, storageName: string, } @@ -616,50 +616,50 @@ export class LiquidityParameters extends jspb.Message { setRulesList(value: Array): void; addRules(value?: LiquidityRule, index?: number): LiquidityRule; - getFeePpm(): number; - setFeePpm(value: number): void; + getFeePpm(): string; + setFeePpm(value: string): void; - getSweepFeeRateSatPerVbyte(): number; - setSweepFeeRateSatPerVbyte(value: number): void; + getSweepFeeRateSatPerVbyte(): string; + setSweepFeeRateSatPerVbyte(value: string): void; - getMaxSwapFeePpm(): number; - setMaxSwapFeePpm(value: number): void; + getMaxSwapFeePpm(): string; + setMaxSwapFeePpm(value: string): void; - getMaxRoutingFeePpm(): number; - setMaxRoutingFeePpm(value: number): void; + getMaxRoutingFeePpm(): string; + setMaxRoutingFeePpm(value: string): void; - getMaxPrepayRoutingFeePpm(): number; - setMaxPrepayRoutingFeePpm(value: number): void; + getMaxPrepayRoutingFeePpm(): string; + setMaxPrepayRoutingFeePpm(value: string): void; - getMaxPrepaySat(): number; - setMaxPrepaySat(value: number): void; + getMaxPrepaySat(): string; + setMaxPrepaySat(value: string): void; - getMaxMinerFeeSat(): number; - setMaxMinerFeeSat(value: number): void; + getMaxMinerFeeSat(): string; + setMaxMinerFeeSat(value: string): void; getSweepConfTarget(): number; setSweepConfTarget(value: number): void; - getFailureBackoffSec(): number; - setFailureBackoffSec(value: number): void; + getFailureBackoffSec(): string; + setFailureBackoffSec(value: string): void; getAutoloop(): boolean; setAutoloop(value: boolean): void; - getAutoloopBudgetSat(): number; - setAutoloopBudgetSat(value: number): void; + getAutoloopBudgetSat(): string; + setAutoloopBudgetSat(value: string): void; - getAutoloopBudgetStartSec(): number; - setAutoloopBudgetStartSec(value: number): void; + getAutoloopBudgetStartSec(): string; + setAutoloopBudgetStartSec(value: string): void; - getAutoMaxInFlight(): number; - setAutoMaxInFlight(value: number): void; + getAutoMaxInFlight(): string; + setAutoMaxInFlight(value: string): void; - getMinSwapAmount(): number; - setMinSwapAmount(value: number): void; + getMinSwapAmount(): string; + setMinSwapAmount(value: string): void; - getMaxSwapAmount(): number; - setMaxSwapAmount(value: number): void; + getMaxSwapAmount(): string; + setMaxSwapAmount(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LiquidityParameters.AsObject; @@ -674,27 +674,27 @@ export class LiquidityParameters extends jspb.Message { export namespace LiquidityParameters { export type AsObject = { rulesList: Array, - feePpm: number, - sweepFeeRateSatPerVbyte: number, - maxSwapFeePpm: number, - maxRoutingFeePpm: number, - maxPrepayRoutingFeePpm: number, - maxPrepaySat: number, - maxMinerFeeSat: number, + feePpm: string, + sweepFeeRateSatPerVbyte: string, + maxSwapFeePpm: string, + maxRoutingFeePpm: string, + maxPrepayRoutingFeePpm: string, + maxPrepaySat: string, + maxMinerFeeSat: string, sweepConfTarget: number, - failureBackoffSec: number, + failureBackoffSec: string, autoloop: boolean, - autoloopBudgetSat: number, - autoloopBudgetStartSec: number, - autoMaxInFlight: number, - minSwapAmount: number, - maxSwapAmount: number, + autoloopBudgetSat: string, + autoloopBudgetStartSec: string, + autoMaxInFlight: string, + minSwapAmount: string, + maxSwapAmount: string, } } export class LiquidityRule extends jspb.Message { - getChannelId(): number; - setChannelId(value: number): void; + getChannelId(): string; + setChannelId(value: string): void; getPubkey(): Uint8Array | string; getPubkey_asU8(): Uint8Array; @@ -722,7 +722,7 @@ export class LiquidityRule extends jspb.Message { export namespace LiquidityRule { export type AsObject = { - channelId: number, + channelId: string, pubkey: Uint8Array | string, type: LiquidityRuleTypeMap[keyof LiquidityRuleTypeMap], incomingThreshold: number, diff --git a/app/src/types/generated/loop_pb.js b/app/src/types/generated/loop_pb.js index 55378965..735003f3 100644 --- a/app/src/types/generated/loop_pb.js +++ b/app/src/types/generated/loop_pb.js @@ -99,18 +99,18 @@ proto.looprpc.LoopOutRequest.prototype.toObject = function(opt_includeInstance) */ proto.looprpc.LoopOutRequest.toObject = function(includeInstance, msg) { var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), dest: jspb.Message.getFieldWithDefault(msg, 2, ""), - maxSwapRoutingFee: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxPrepayRoutingFee: jspb.Message.getFieldWithDefault(msg, 4, 0), - maxSwapFee: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxPrepayAmt: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxMinerFee: jspb.Message.getFieldWithDefault(msg, 7, 0), - loopOutChannel: jspb.Message.getFieldWithDefault(msg, 8, 0), + maxSwapRoutingFee: jspb.Message.getFieldWithDefault(msg, 3, "0"), + maxPrepayRoutingFee: jspb.Message.getFieldWithDefault(msg, 4, "0"), + maxSwapFee: jspb.Message.getFieldWithDefault(msg, 5, "0"), + maxPrepayAmt: jspb.Message.getFieldWithDefault(msg, 6, "0"), + maxMinerFee: jspb.Message.getFieldWithDefault(msg, 7, "0"), + loopOutChannel: jspb.Message.getFieldWithDefault(msg, 8, "0"), outgoingChanSetList: jspb.Message.getRepeatedField(msg, 11), sweepConfTarget: jspb.Message.getFieldWithDefault(msg, 9, 0), htlcConfirmations: jspb.Message.getFieldWithDefault(msg, 13, 0), - swapPublicationDeadline: jspb.Message.getFieldWithDefault(msg, 10, 0), + swapPublicationDeadline: jspb.Message.getFieldWithDefault(msg, 10, "0"), label: jspb.Message.getFieldWithDefault(msg, 12, ""), initiator: jspb.Message.getFieldWithDefault(msg, 14, "") }; @@ -150,7 +150,7 @@ proto.looprpc.LoopOutRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 2: @@ -158,31 +158,31 @@ proto.looprpc.LoopOutRequest.deserializeBinaryFromReader = function(msg, reader) msg.setDest(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxSwapRoutingFee(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxPrepayRoutingFee(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxSwapFee(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxPrepayAmt(value); break; case 7: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxMinerFee(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setLoopOutChannel(value); break; case 11: - var value = /** @type {!Array} */ (reader.readPackedUint64()); + var value = /** @type {!Array} */ (reader.readPackedUint64String()); msg.setOutgoingChanSetList(value); break; case 9: @@ -194,7 +194,7 @@ proto.looprpc.LoopOutRequest.deserializeBinaryFromReader = function(msg, reader) msg.setHtlcConfirmations(value); break; case 10: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSwapPublicationDeadline(value); break; case 12: @@ -235,8 +235,8 @@ proto.looprpc.LoopOutRequest.prototype.serializeBinary = function() { proto.looprpc.LoopOutRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); @@ -249,50 +249,50 @@ proto.looprpc.LoopOutRequest.serializeBinaryToWriter = function(message, writer) ); } f = message.getMaxSwapRoutingFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); } f = message.getMaxPrepayRoutingFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getMaxSwapFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getMaxPrepayAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); } f = message.getMaxMinerFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 7, f ); } f = message.getLoopOutChannel(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 8, f ); } f = message.getOutgoingChanSetList(); if (f.length > 0) { - writer.writePackedUint64( + writer.writePackedUint64String( 11, f ); @@ -312,8 +312,8 @@ proto.looprpc.LoopOutRequest.serializeBinaryToWriter = function(message, writer) ); } f = message.getSwapPublicationDeadline(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 10, f ); @@ -337,16 +337,16 @@ proto.looprpc.LoopOutRequest.serializeBinaryToWriter = function(message, writer) /** * optional int64 amt = 1; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -367,111 +367,111 @@ proto.looprpc.LoopOutRequest.prototype.setDest = function(value) { /** * optional int64 max_swap_routing_fee = 3; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getMaxSwapRoutingFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setMaxSwapRoutingFee = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional int64 max_prepay_routing_fee = 4; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getMaxPrepayRoutingFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setMaxPrepayRoutingFee = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 max_swap_fee = 5; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getMaxSwapFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setMaxSwapFee = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 max_prepay_amt = 6; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getMaxPrepayAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setMaxPrepayAmt = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional int64 max_miner_fee = 7; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getMaxMinerFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setMaxMinerFee = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional uint64 loop_out_channel = 8; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getLoopOutChannel = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setLoopOutChannel = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * repeated uint64 outgoing_chan_set = 11; - * @return {!Array} + * @return {!Array} */ proto.looprpc.LoopOutRequest.prototype.getOutgoingChanSetList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); }; -/** @param {!Array} value */ +/** @param {!Array} value */ proto.looprpc.LoopOutRequest.prototype.setOutgoingChanSetList = function(value) { jspb.Message.setField(this, 11, value || []); }; /** - * @param {!number} value + * @param {!string} value * @param {number=} opt_index */ proto.looprpc.LoopOutRequest.prototype.addOutgoingChanSet = function(value, opt_index) { @@ -516,16 +516,16 @@ proto.looprpc.LoopOutRequest.prototype.setHtlcConfirmations = function(value) { /** * optional uint64 swap_publication_deadline = 10; - * @return {number} + * @return {string} */ proto.looprpc.LoopOutRequest.prototype.getSwapPublicationDeadline = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopOutRequest.prototype.setSwapPublicationDeadline = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; @@ -606,9 +606,9 @@ proto.looprpc.LoopInRequest.prototype.toObject = function(opt_includeInstance) { */ proto.looprpc.LoopInRequest.toObject = function(includeInstance, msg) { var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), - maxSwapFee: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxMinerFee: jspb.Message.getFieldWithDefault(msg, 3, 0), + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), + maxSwapFee: jspb.Message.getFieldWithDefault(msg, 2, "0"), + maxMinerFee: jspb.Message.getFieldWithDefault(msg, 3, "0"), lastHop: msg.getLastHop_asB64(), externalHtlc: jspb.Message.getFieldWithDefault(msg, 5, false), htlcConfTarget: jspb.Message.getFieldWithDefault(msg, 6, 0), @@ -651,15 +651,15 @@ proto.looprpc.LoopInRequest.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxSwapFee(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxMinerFee(value); break; case 4: @@ -712,22 +712,22 @@ proto.looprpc.LoopInRequest.prototype.serializeBinary = function() { proto.looprpc.LoopInRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getMaxSwapFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getMaxMinerFee(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -772,46 +772,46 @@ proto.looprpc.LoopInRequest.serializeBinaryToWriter = function(message, writer) /** * optional int64 amt = 1; - * @return {number} + * @return {string} */ proto.looprpc.LoopInRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopInRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 max_swap_fee = 2; - * @return {number} + * @return {string} */ proto.looprpc.LoopInRequest.prototype.getMaxSwapFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopInRequest.prototype.setMaxSwapFee = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 max_miner_fee = 3; - * @return {number} + * @return {string} */ proto.looprpc.LoopInRequest.prototype.getMaxMinerFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LoopInRequest.prototype.setMaxMinerFee = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -1380,20 +1380,20 @@ proto.looprpc.SwapStatus.prototype.toObject = function(opt_includeInstance) { */ proto.looprpc.SwapStatus.toObject = function(includeInstance, msg) { var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), id: jspb.Message.getFieldWithDefault(msg, 2, ""), idBytes: msg.getIdBytes_asB64(), type: jspb.Message.getFieldWithDefault(msg, 3, 0), state: jspb.Message.getFieldWithDefault(msg, 4, 0), failureReason: jspb.Message.getFieldWithDefault(msg, 14, 0), - initiationTime: jspb.Message.getFieldWithDefault(msg, 5, 0), - lastUpdateTime: jspb.Message.getFieldWithDefault(msg, 6, 0), + initiationTime: jspb.Message.getFieldWithDefault(msg, 5, "0"), + lastUpdateTime: jspb.Message.getFieldWithDefault(msg, 6, "0"), htlcAddress: jspb.Message.getFieldWithDefault(msg, 7, ""), htlcAddressP2wsh: jspb.Message.getFieldWithDefault(msg, 12, ""), htlcAddressNp2wsh: jspb.Message.getFieldWithDefault(msg, 13, ""), - costServer: jspb.Message.getFieldWithDefault(msg, 8, 0), - costOnchain: jspb.Message.getFieldWithDefault(msg, 9, 0), - costOffchain: jspb.Message.getFieldWithDefault(msg, 10, 0), + costServer: jspb.Message.getFieldWithDefault(msg, 8, "0"), + costOnchain: jspb.Message.getFieldWithDefault(msg, 9, "0"), + costOffchain: jspb.Message.getFieldWithDefault(msg, 10, "0"), label: jspb.Message.getFieldWithDefault(msg, 15, "") }; @@ -1432,7 +1432,7 @@ proto.looprpc.SwapStatus.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 2: @@ -1456,11 +1456,11 @@ proto.looprpc.SwapStatus.deserializeBinaryFromReader = function(msg, reader) { msg.setFailureReason(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setInitiationTime(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setLastUpdateTime(value); break; case 7: @@ -1476,15 +1476,15 @@ proto.looprpc.SwapStatus.deserializeBinaryFromReader = function(msg, reader) { msg.setHtlcAddressNp2wsh(value); break; case 8: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCostServer(value); break; case 9: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCostOnchain(value); break; case 10: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setCostOffchain(value); break; case 15: @@ -1521,8 +1521,8 @@ proto.looprpc.SwapStatus.prototype.serializeBinary = function() { proto.looprpc.SwapStatus.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); @@ -1563,15 +1563,15 @@ proto.looprpc.SwapStatus.serializeBinaryToWriter = function(message, writer) { ); } f = message.getInitiationTime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getLastUpdateTime(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -1598,22 +1598,22 @@ proto.looprpc.SwapStatus.serializeBinaryToWriter = function(message, writer) { ); } f = message.getCostServer(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 8, f ); } f = message.getCostOnchain(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 9, f ); } f = message.getCostOffchain(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 10, f ); @@ -1630,16 +1630,16 @@ proto.looprpc.SwapStatus.serializeBinaryToWriter = function(message, writer) { /** * optional int64 amt = 1; - * @return {number} + * @return {string} */ proto.looprpc.SwapStatus.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.SwapStatus.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -1744,31 +1744,31 @@ proto.looprpc.SwapStatus.prototype.setFailureReason = function(value) { /** * optional int64 initiation_time = 5; - * @return {number} + * @return {string} */ proto.looprpc.SwapStatus.prototype.getInitiationTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.SwapStatus.prototype.setInitiationTime = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 last_update_time = 6; - * @return {number} + * @return {string} */ proto.looprpc.SwapStatus.prototype.getLastUpdateTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.SwapStatus.prototype.setLastUpdateTime = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -1819,46 +1819,46 @@ proto.looprpc.SwapStatus.prototype.setHtlcAddressNp2wsh = function(value) { /** * optional int64 cost_server = 8; - * @return {number} + * @return {string} */ proto.looprpc.SwapStatus.prototype.getCostServer = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.SwapStatus.prototype.setCostServer = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional int64 cost_onchain = 9; - * @return {number} + * @return {string} */ proto.looprpc.SwapStatus.prototype.getCostOnchain = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.SwapStatus.prototype.setCostOnchain = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; /** * optional int64 cost_offchain = 10; - * @return {number} + * @return {string} */ proto.looprpc.SwapStatus.prototype.getCostOffchain = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.SwapStatus.prototype.setCostOffchain = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; @@ -2490,8 +2490,8 @@ proto.looprpc.InTermsResponse.prototype.toObject = function(opt_includeInstance) */ proto.looprpc.InTermsResponse.toObject = function(includeInstance, msg) { var f, obj = { - minSwapAmount: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 6, 0) + minSwapAmount: jspb.Message.getFieldWithDefault(msg, 5, "0"), + maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 6, "0") }; if (includeInstance) { @@ -2529,11 +2529,11 @@ proto.looprpc.InTermsResponse.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMinSwapAmount(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxSwapAmount(value); break; default: @@ -2566,15 +2566,15 @@ proto.looprpc.InTermsResponse.prototype.serializeBinary = function() { proto.looprpc.InTermsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMinSwapAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getMaxSwapAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -2584,31 +2584,31 @@ proto.looprpc.InTermsResponse.serializeBinaryToWriter = function(message, writer /** * optional int64 min_swap_amount = 5; - * @return {number} + * @return {string} */ proto.looprpc.InTermsResponse.prototype.getMinSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.InTermsResponse.prototype.setMinSwapAmount = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 max_swap_amount = 6; - * @return {number} + * @return {string} */ proto.looprpc.InTermsResponse.prototype.getMaxSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.InTermsResponse.prototype.setMaxSwapAmount = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -2659,8 +2659,8 @@ proto.looprpc.OutTermsResponse.prototype.toObject = function(opt_includeInstance */ proto.looprpc.OutTermsResponse.toObject = function(includeInstance, msg) { var f, obj = { - minSwapAmount: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 6, 0), + minSwapAmount: jspb.Message.getFieldWithDefault(msg, 5, "0"), + maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 6, "0"), minCltvDelta: jspb.Message.getFieldWithDefault(msg, 8, 0), maxCltvDelta: jspb.Message.getFieldWithDefault(msg, 9, 0) }; @@ -2700,11 +2700,11 @@ proto.looprpc.OutTermsResponse.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMinSwapAmount(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setMaxSwapAmount(value); break; case 8: @@ -2745,15 +2745,15 @@ proto.looprpc.OutTermsResponse.prototype.serializeBinary = function() { proto.looprpc.OutTermsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMinSwapAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getMaxSwapAmount(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -2777,31 +2777,31 @@ proto.looprpc.OutTermsResponse.serializeBinaryToWriter = function(message, write /** * optional int64 min_swap_amount = 5; - * @return {number} + * @return {string} */ proto.looprpc.OutTermsResponse.prototype.getMinSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.OutTermsResponse.prototype.setMinSwapAmount = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 max_swap_amount = 6; - * @return {number} + * @return {string} */ proto.looprpc.OutTermsResponse.prototype.getMaxSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.OutTermsResponse.prototype.setMaxSwapAmount = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -2882,10 +2882,10 @@ proto.looprpc.QuoteRequest.prototype.toObject = function(opt_includeInstance) { */ proto.looprpc.QuoteRequest.toObject = function(includeInstance, msg) { var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), confTarget: jspb.Message.getFieldWithDefault(msg, 2, 0), externalHtlc: jspb.Message.getFieldWithDefault(msg, 3, false), - swapPublicationDeadline: jspb.Message.getFieldWithDefault(msg, 4, 0) + swapPublicationDeadline: jspb.Message.getFieldWithDefault(msg, 4, "0") }; if (includeInstance) { @@ -2923,7 +2923,7 @@ proto.looprpc.QuoteRequest.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmt(value); break; case 2: @@ -2935,7 +2935,7 @@ proto.looprpc.QuoteRequest.deserializeBinaryFromReader = function(msg, reader) { msg.setExternalHtlc(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSwapPublicationDeadline(value); break; default: @@ -2968,8 +2968,8 @@ proto.looprpc.QuoteRequest.prototype.serializeBinary = function() { proto.looprpc.QuoteRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAmt(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); @@ -2989,8 +2989,8 @@ proto.looprpc.QuoteRequest.serializeBinaryToWriter = function(message, writer) { ); } f = message.getSwapPublicationDeadline(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -3000,16 +3000,16 @@ proto.looprpc.QuoteRequest.serializeBinaryToWriter = function(message, writer) { /** * optional int64 amt = 1; - * @return {number} + * @return {string} */ proto.looprpc.QuoteRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.QuoteRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -3047,16 +3047,16 @@ proto.looprpc.QuoteRequest.prototype.setExternalHtlc = function(value) { /** * optional uint64 swap_publication_deadline = 4; - * @return {number} + * @return {string} */ proto.looprpc.QuoteRequest.prototype.getSwapPublicationDeadline = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.QuoteRequest.prototype.setSwapPublicationDeadline = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -3107,8 +3107,8 @@ proto.looprpc.InQuoteResponse.prototype.toObject = function(opt_includeInstance) */ proto.looprpc.InQuoteResponse.toObject = function(includeInstance, msg) { var f, obj = { - swapFeeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - htlcPublishFeeSat: jspb.Message.getFieldWithDefault(msg, 3, 0), + swapFeeSat: jspb.Message.getFieldWithDefault(msg, 1, "0"), + htlcPublishFeeSat: jspb.Message.getFieldWithDefault(msg, 3, "0"), cltvDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), confTarget: jspb.Message.getFieldWithDefault(msg, 6, 0) }; @@ -3148,11 +3148,11 @@ proto.looprpc.InQuoteResponse.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSwapFeeSat(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setHtlcPublishFeeSat(value); break; case 5: @@ -3193,15 +3193,15 @@ proto.looprpc.InQuoteResponse.prototype.serializeBinary = function() { proto.looprpc.InQuoteResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSwapFeeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getHtlcPublishFeeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -3225,31 +3225,31 @@ proto.looprpc.InQuoteResponse.serializeBinaryToWriter = function(message, writer /** * optional int64 swap_fee_sat = 1; - * @return {number} + * @return {string} */ proto.looprpc.InQuoteResponse.prototype.getSwapFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.InQuoteResponse.prototype.setSwapFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 htlc_publish_fee_sat = 3; - * @return {number} + * @return {string} */ proto.looprpc.InQuoteResponse.prototype.getHtlcPublishFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.InQuoteResponse.prototype.setHtlcPublishFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -3330,9 +3330,9 @@ proto.looprpc.OutQuoteResponse.prototype.toObject = function(opt_includeInstance */ proto.looprpc.OutQuoteResponse.toObject = function(includeInstance, msg) { var f, obj = { - swapFeeSat: jspb.Message.getFieldWithDefault(msg, 1, 0), - prepayAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - htlcSweepFeeSat: jspb.Message.getFieldWithDefault(msg, 3, 0), + swapFeeSat: jspb.Message.getFieldWithDefault(msg, 1, "0"), + prepayAmtSat: jspb.Message.getFieldWithDefault(msg, 2, "0"), + htlcSweepFeeSat: jspb.Message.getFieldWithDefault(msg, 3, "0"), swapPaymentDest: msg.getSwapPaymentDest_asB64(), cltvDelta: jspb.Message.getFieldWithDefault(msg, 5, 0), confTarget: jspb.Message.getFieldWithDefault(msg, 6, 0) @@ -3373,15 +3373,15 @@ proto.looprpc.OutQuoteResponse.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setSwapFeeSat(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setPrepayAmtSat(value); break; case 3: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setHtlcSweepFeeSat(value); break; case 4: @@ -3426,22 +3426,22 @@ proto.looprpc.OutQuoteResponse.prototype.serializeBinary = function() { proto.looprpc.OutQuoteResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSwapFeeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); } f = message.getPrepayAmtSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 2, f ); } f = message.getHtlcSweepFeeSat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 3, f ); @@ -3472,46 +3472,46 @@ proto.looprpc.OutQuoteResponse.serializeBinaryToWriter = function(message, write /** * optional int64 swap_fee_sat = 1; - * @return {number} + * @return {string} */ proto.looprpc.OutQuoteResponse.prototype.getSwapFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.OutQuoteResponse.prototype.setSwapFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 prepay_amt_sat = 2; - * @return {number} + * @return {string} */ proto.looprpc.OutQuoteResponse.prototype.getPrepayAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.OutQuoteResponse.prototype.setPrepayAmtSat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional int64 htlc_sweep_fee_sat = 3; - * @return {number} + * @return {string} */ proto.looprpc.OutQuoteResponse.prototype.getHtlcSweepFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.OutQuoteResponse.prototype.setHtlcSweepFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -3918,9 +3918,9 @@ proto.looprpc.LsatToken.toObject = function(includeInstance, msg) { baseMacaroon: msg.getBaseMacaroon_asB64(), paymentHash: msg.getPaymentHash_asB64(), paymentPreimage: msg.getPaymentPreimage_asB64(), - amountPaidMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - routingFeePaidMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeCreated: jspb.Message.getFieldWithDefault(msg, 6, 0), + amountPaidMsat: jspb.Message.getFieldWithDefault(msg, 4, "0"), + routingFeePaidMsat: jspb.Message.getFieldWithDefault(msg, 5, "0"), + timeCreated: jspb.Message.getFieldWithDefault(msg, 6, "0"), expired: jspb.Message.getFieldWithDefault(msg, 7, false), storageName: jspb.Message.getFieldWithDefault(msg, 8, "") }; @@ -3972,15 +3972,15 @@ proto.looprpc.LsatToken.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentPreimage(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmountPaidMsat(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRoutingFeePaidMsat(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTimeCreated(value); break; case 7: @@ -4042,22 +4042,22 @@ proto.looprpc.LsatToken.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmountPaidMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getRoutingFeePaidMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getTimeCreated(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -4198,46 +4198,46 @@ proto.looprpc.LsatToken.prototype.setPaymentPreimage = function(value) { /** * optional int64 amount_paid_msat = 4; - * @return {number} + * @return {string} */ proto.looprpc.LsatToken.prototype.getAmountPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LsatToken.prototype.setAmountPaidMsat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 routing_fee_paid_msat = 5; - * @return {number} + * @return {string} */ proto.looprpc.LsatToken.prototype.getRoutingFeePaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LsatToken.prototype.setRoutingFeePaidMsat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 time_created = 6; - * @return {number} + * @return {string} */ proto.looprpc.LsatToken.prototype.getTimeCreated = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LsatToken.prototype.setTimeCreated = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -4445,21 +4445,21 @@ proto.looprpc.LiquidityParameters.toObject = function(includeInstance, msg) { var f, obj = { rulesList: jspb.Message.toObjectList(msg.getRulesList(), proto.looprpc.LiquidityRule.toObject, includeInstance), - feePpm: jspb.Message.getFieldWithDefault(msg, 16, 0), - sweepFeeRateSatPerVbyte: jspb.Message.getFieldWithDefault(msg, 2, 0), - maxSwapFeePpm: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxRoutingFeePpm: jspb.Message.getFieldWithDefault(msg, 4, 0), - maxPrepayRoutingFeePpm: jspb.Message.getFieldWithDefault(msg, 5, 0), - maxPrepaySat: jspb.Message.getFieldWithDefault(msg, 6, 0), - maxMinerFeeSat: jspb.Message.getFieldWithDefault(msg, 7, 0), + feePpm: jspb.Message.getFieldWithDefault(msg, 16, "0"), + sweepFeeRateSatPerVbyte: jspb.Message.getFieldWithDefault(msg, 2, "0"), + maxSwapFeePpm: jspb.Message.getFieldWithDefault(msg, 3, "0"), + maxRoutingFeePpm: jspb.Message.getFieldWithDefault(msg, 4, "0"), + maxPrepayRoutingFeePpm: jspb.Message.getFieldWithDefault(msg, 5, "0"), + maxPrepaySat: jspb.Message.getFieldWithDefault(msg, 6, "0"), + maxMinerFeeSat: jspb.Message.getFieldWithDefault(msg, 7, "0"), sweepConfTarget: jspb.Message.getFieldWithDefault(msg, 8, 0), - failureBackoffSec: jspb.Message.getFieldWithDefault(msg, 9, 0), + failureBackoffSec: jspb.Message.getFieldWithDefault(msg, 9, "0"), autoloop: jspb.Message.getFieldWithDefault(msg, 10, false), - autoloopBudgetSat: jspb.Message.getFieldWithDefault(msg, 11, 0), - autoloopBudgetStartSec: jspb.Message.getFieldWithDefault(msg, 12, 0), - autoMaxInFlight: jspb.Message.getFieldWithDefault(msg, 13, 0), - minSwapAmount: jspb.Message.getFieldWithDefault(msg, 14, 0), - maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 15, 0) + autoloopBudgetSat: jspb.Message.getFieldWithDefault(msg, 11, "0"), + autoloopBudgetStartSec: jspb.Message.getFieldWithDefault(msg, 12, "0"), + autoMaxInFlight: jspb.Message.getFieldWithDefault(msg, 13, "0"), + minSwapAmount: jspb.Message.getFieldWithDefault(msg, 14, "0"), + maxSwapAmount: jspb.Message.getFieldWithDefault(msg, 15, "0") }; if (includeInstance) { @@ -4502,31 +4502,31 @@ proto.looprpc.LiquidityParameters.deserializeBinaryFromReader = function(msg, re msg.addRules(value); break; case 16: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeePpm(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSweepFeeRateSatPerVbyte(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxSwapFeePpm(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxRoutingFeePpm(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxPrepayRoutingFeePpm(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxPrepaySat(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxMinerFeeSat(value); break; case 8: @@ -4534,7 +4534,7 @@ proto.looprpc.LiquidityParameters.deserializeBinaryFromReader = function(msg, re msg.setSweepConfTarget(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFailureBackoffSec(value); break; case 10: @@ -4542,23 +4542,23 @@ proto.looprpc.LiquidityParameters.deserializeBinaryFromReader = function(msg, re msg.setAutoloop(value); break; case 11: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAutoloopBudgetSat(value); break; case 12: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAutoloopBudgetStartSec(value); break; case 13: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAutoMaxInFlight(value); break; case 14: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinSwapAmount(value); break; case 15: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxSwapAmount(value); break; default: @@ -4599,50 +4599,50 @@ proto.looprpc.LiquidityParameters.serializeBinaryToWriter = function(message, wr ); } f = message.getFeePpm(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 16, f ); } f = message.getSweepFeeRateSatPerVbyte(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getMaxSwapFeePpm(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); } f = message.getMaxRoutingFeePpm(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getMaxPrepayRoutingFeePpm(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getMaxPrepaySat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getMaxMinerFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -4655,8 +4655,8 @@ proto.looprpc.LiquidityParameters.serializeBinaryToWriter = function(message, wr ); } f = message.getFailureBackoffSec(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); @@ -4669,36 +4669,36 @@ proto.looprpc.LiquidityParameters.serializeBinaryToWriter = function(message, wr ); } f = message.getAutoloopBudgetSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 11, f ); } f = message.getAutoloopBudgetStartSec(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 12, f ); } f = message.getAutoMaxInFlight(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 13, f ); } f = message.getMinSwapAmount(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 14, f ); } f = message.getMaxSwapAmount(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 15, f ); @@ -4739,106 +4739,106 @@ proto.looprpc.LiquidityParameters.prototype.clearRulesList = function() { /** * optional uint64 fee_ppm = 16; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setFeePpm = function(value) { - jspb.Message.setProto3IntField(this, 16, value); + jspb.Message.setProto3StringIntField(this, 16, value); }; /** * optional uint64 sweep_fee_rate_sat_per_vbyte = 2; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getSweepFeeRateSatPerVbyte = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setSweepFeeRateSatPerVbyte = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 max_swap_fee_ppm = 3; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMaxSwapFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMaxSwapFeePpm = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional uint64 max_routing_fee_ppm = 4; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMaxRoutingFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMaxRoutingFeePpm = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 max_prepay_routing_fee_ppm = 5; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMaxPrepayRoutingFeePpm = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMaxPrepayRoutingFeePpm = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional uint64 max_prepay_sat = 6; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMaxPrepaySat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMaxPrepaySat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 max_miner_fee_sat = 7; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMaxMinerFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMaxMinerFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; @@ -4859,16 +4859,16 @@ proto.looprpc.LiquidityParameters.prototype.setSweepConfTarget = function(value) /** * optional uint64 failure_backoff_sec = 9; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getFailureBackoffSec = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setFailureBackoffSec = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -4891,76 +4891,76 @@ proto.looprpc.LiquidityParameters.prototype.setAutoloop = function(value) { /** * optional uint64 autoloop_budget_sat = 11; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getAutoloopBudgetSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setAutoloopBudgetSat = function(value) { - jspb.Message.setProto3IntField(this, 11, value); + jspb.Message.setProto3StringIntField(this, 11, value); }; /** * optional uint64 autoloop_budget_start_sec = 12; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getAutoloopBudgetStartSec = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setAutoloopBudgetStartSec = function(value) { - jspb.Message.setProto3IntField(this, 12, value); + jspb.Message.setProto3StringIntField(this, 12, value); }; /** * optional uint64 auto_max_in_flight = 13; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getAutoMaxInFlight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setAutoMaxInFlight = function(value) { - jspb.Message.setProto3IntField(this, 13, value); + jspb.Message.setProto3StringIntField(this, 13, value); }; /** * optional uint64 min_swap_amount = 14; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMinSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMinSwapAmount = function(value) { - jspb.Message.setProto3IntField(this, 14, value); + jspb.Message.setProto3StringIntField(this, 14, value); }; /** * optional uint64 max_swap_amount = 15; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityParameters.prototype.getMaxSwapAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityParameters.prototype.setMaxSwapAmount = function(value) { - jspb.Message.setProto3IntField(this, 15, value); + jspb.Message.setProto3StringIntField(this, 15, value); }; @@ -5011,7 +5011,7 @@ proto.looprpc.LiquidityRule.prototype.toObject = function(opt_includeInstance) { */ proto.looprpc.LiquidityRule.toObject = function(includeInstance, msg) { var f, obj = { - channelId: jspb.Message.getFieldWithDefault(msg, 1, 0), + channelId: jspb.Message.getFieldWithDefault(msg, 1, "0"), pubkey: msg.getPubkey_asB64(), type: jspb.Message.getFieldWithDefault(msg, 2, 0), incomingThreshold: jspb.Message.getFieldWithDefault(msg, 3, 0), @@ -5053,7 +5053,7 @@ proto.looprpc.LiquidityRule.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setChannelId(value); break; case 5: @@ -5102,8 +5102,8 @@ proto.looprpc.LiquidityRule.prototype.serializeBinary = function() { proto.looprpc.LiquidityRule.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getChannelId(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -5141,16 +5141,16 @@ proto.looprpc.LiquidityRule.serializeBinaryToWriter = function(message, writer) /** * optional uint64 channel_id = 1; - * @return {number} + * @return {string} */ proto.looprpc.LiquidityRule.prototype.getChannelId = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.looprpc.LiquidityRule.prototype.setChannelId = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; diff --git a/app/src/types/generated/trader_pb.d.ts b/app/src/types/generated/trader_pb.d.ts index 77ba2854..8a9e6181 100644 --- a/app/src/types/generated/trader_pb.d.ts +++ b/app/src/types/generated/trader_pb.d.ts @@ -5,8 +5,8 @@ import * as jspb from "google-protobuf"; import * as auctioneerrpc_auctioneer_pb from "./auctioneerrpc/auctioneer_pb"; export class InitAccountRequest extends jspb.Message { - getAccountValue(): number; - setAccountValue(value: number): void; + getAccountValue(): string; + setAccountValue(value: string): void; hasAbsoluteHeight(): boolean; clearAbsoluteHeight(): void; @@ -40,7 +40,7 @@ export class InitAccountRequest extends jspb.Message { export namespace InitAccountRequest { export type AsObject = { - accountValue: number, + accountValue: string, absoluteHeight: number, relativeHeight: number, confTarget: number, @@ -60,8 +60,8 @@ export namespace InitAccountRequest { } export class QuoteAccountRequest extends jspb.Message { - getAccountValue(): number; - setAccountValue(value: number): void; + getAccountValue(): string; + setAccountValue(value: string): void; hasConfTarget(): boolean; clearConfTarget(): void; @@ -81,7 +81,7 @@ export class QuoteAccountRequest extends jspb.Message { export namespace QuoteAccountRequest { export type AsObject = { - accountValue: number, + accountValue: string, confTarget: number, } @@ -92,11 +92,11 @@ export namespace QuoteAccountRequest { } export class QuoteAccountResponse extends jspb.Message { - getMinerFeeRateSatPerKw(): number; - setMinerFeeRateSatPerKw(value: number): void; + getMinerFeeRateSatPerKw(): string; + setMinerFeeRateSatPerKw(value: string): void; - getMinerFeeTotal(): number; - setMinerFeeTotal(value: number): void; + getMinerFeeTotal(): string; + setMinerFeeTotal(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QuoteAccountResponse.AsObject; @@ -110,8 +110,8 @@ export class QuoteAccountResponse extends jspb.Message { export namespace QuoteAccountResponse { export type AsObject = { - minerFeeRateSatPerKw: number, - minerFeeTotal: number, + minerFeeRateSatPerKw: string, + minerFeeTotal: string, } } @@ -158,8 +158,8 @@ export namespace ListAccountsResponse { } export class Output extends jspb.Message { - getValueSat(): number; - setValueSat(value: number): void; + getValueSat(): string; + setValueSat(value: string): void; getAddress(): string; setAddress(value: string): void; @@ -176,7 +176,7 @@ export class Output extends jspb.Message { export namespace Output { export type AsObject = { - valueSat: number, + valueSat: string, address: string, } } @@ -192,8 +192,8 @@ export class OutputWithFee extends jspb.Message { hasFeeRateSatPerKw(): boolean; clearFeeRateSatPerKw(): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; getFeesCase(): OutputWithFee.FeesCase; serializeBinary(): Uint8Array; @@ -210,7 +210,7 @@ export namespace OutputWithFee { export type AsObject = { address: string, confTarget: number, - feeRateSatPerKw: number, + feeRateSatPerKw: string, } export enum FeesCase { @@ -316,8 +316,8 @@ export class WithdrawAccountRequest extends jspb.Message { setOutputsList(value: Array): void; addOutputs(value?: Output, index?: number): Output; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WithdrawAccountRequest.AsObject; @@ -333,7 +333,7 @@ export namespace WithdrawAccountRequest { export type AsObject = { traderKey: Uint8Array | string, outputsList: Array, - feeRateSatPerKw: number, + feeRateSatPerKw: string, } } @@ -371,11 +371,11 @@ export class DepositAccountRequest extends jspb.Message { getTraderKey_asB64(): string; setTraderKey(value: Uint8Array | string): void; - getAmountSat(): number; - setAmountSat(value: number): void; + getAmountSat(): string; + setAmountSat(value: string): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DepositAccountRequest.AsObject; @@ -390,8 +390,8 @@ export class DepositAccountRequest extends jspb.Message { export namespace DepositAccountRequest { export type AsObject = { traderKey: Uint8Array | string, - amountSat: number, - feeRateSatPerKw: number, + amountSat: string, + feeRateSatPerKw: string, } } @@ -439,8 +439,8 @@ export class RenewAccountRequest extends jspb.Message { getRelativeExpiry(): number; setRelativeExpiry(value: number): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; getAccountExpiryCase(): RenewAccountRequest.AccountExpiryCase; serializeBinary(): Uint8Array; @@ -458,7 +458,7 @@ export namespace RenewAccountRequest { accountKey: Uint8Array | string, absoluteExpiry: number, relativeExpiry: number, - feeRateSatPerKw: number, + feeRateSatPerKw: string, } export enum AccountExpiryCase { @@ -502,8 +502,8 @@ export class BumpAccountFeeRequest extends jspb.Message { getTraderKey_asB64(): string; setTraderKey(value: Uint8Array | string): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BumpAccountFeeRequest.AsObject; @@ -518,7 +518,7 @@ export class BumpAccountFeeRequest extends jspb.Message { export namespace BumpAccountFeeRequest { export type AsObject = { traderKey: Uint8Array | string, - feeRateSatPerKw: number, + feeRateSatPerKw: string, } } @@ -549,11 +549,11 @@ export class Account extends jspb.Message { getOutpoint(): auctioneerrpc_auctioneer_pb.OutPoint | undefined; setOutpoint(value?: auctioneerrpc_auctioneer_pb.OutPoint): void; - getValue(): number; - setValue(value: number): void; + getValue(): string; + setValue(value: string): void; - getAvailableBalance(): number; - setAvailableBalance(value: number): void; + getAvailableBalance(): string; + setAvailableBalance(value: string): void; getExpirationHeight(): number; setExpirationHeight(value: number): void; @@ -580,8 +580,8 @@ export namespace Account { export type AsObject = { traderKey: Uint8Array | string, outpoint?: auctioneerrpc_auctioneer_pb.OutPoint.AsObject, - value: number, - availableBalance: number, + value: string, + availableBalance: string, expirationHeight: number, state: AccountStateMap[keyof AccountStateMap], latestTxid: Uint8Array | string, @@ -763,11 +763,11 @@ export class Order extends jspb.Message { getRateFixed(): number; setRateFixed(value: number): void; - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; - getMaxBatchFeeRateSatPerKw(): number; - setMaxBatchFeeRateSatPerKw(value: number): void; + getMaxBatchFeeRateSatPerKw(): string; + setMaxBatchFeeRateSatPerKw(value: string): void; getOrderNonce(): Uint8Array | string; getOrderNonce_asU8(): Uint8Array; @@ -783,11 +783,11 @@ export class Order extends jspb.Message { getUnitsUnfulfilled(): number; setUnitsUnfulfilled(value: number): void; - getReservedValueSat(): number; - setReservedValueSat(value: number): void; + getReservedValueSat(): string; + setReservedValueSat(value: string): void; - getCreationTimestampNs(): number; - setCreationTimestampNs(value: number): void; + getCreationTimestampNs(): string; + setCreationTimestampNs(value: string): void; clearEventsList(): void; getEventsList(): Array; @@ -811,14 +811,14 @@ export namespace Order { export type AsObject = { traderKey: Uint8Array | string, rateFixed: number, - amt: number, - maxBatchFeeRateSatPerKw: number, + amt: string, + maxBatchFeeRateSatPerKw: string, orderNonce: Uint8Array | string, state: auctioneerrpc_auctioneer_pb.OrderStateMap[keyof auctioneerrpc_auctioneer_pb.OrderStateMap], units: number, unitsUnfulfilled: number, - reservedValueSat: number, - creationTimestampNs: number, + reservedValueSat: string, + creationTimestampNs: string, eventsList: Array, minUnitsMatch: number, } @@ -839,8 +839,8 @@ export class Bid extends jspb.Message { getMinNodeTier(): auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]; setMinNodeTier(value: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]): void; - getSelfChanBalance(): number; - setSelfChanBalance(value: number): void; + getSelfChanBalance(): string; + setSelfChanBalance(value: string): void; getSidecarTicket(): string; setSidecarTicket(value: string): void; @@ -861,7 +861,7 @@ export namespace Bid { leaseDurationBlocks: number, version: number, minNodeTier: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap], - selfChanBalance: number, + selfChanBalance: string, sidecarTicket: string, } } @@ -897,8 +897,8 @@ export namespace Ask { } export class QuoteOrderRequest extends jspb.Message { - getAmt(): number; - setAmt(value: number): void; + getAmt(): string; + setAmt(value: string): void; getRateFixed(): number; setRateFixed(value: number): void; @@ -906,8 +906,8 @@ export class QuoteOrderRequest extends jspb.Message { getLeaseDurationBlocks(): number; setLeaseDurationBlocks(value: number): void; - getMaxBatchFeeRateSatPerKw(): number; - setMaxBatchFeeRateSatPerKw(value: number): void; + getMaxBatchFeeRateSatPerKw(): string; + setMaxBatchFeeRateSatPerKw(value: string): void; getMinUnitsMatch(): number; setMinUnitsMatch(value: number): void; @@ -924,17 +924,17 @@ export class QuoteOrderRequest extends jspb.Message { export namespace QuoteOrderRequest { export type AsObject = { - amt: number, + amt: string, rateFixed: number, leaseDurationBlocks: number, - maxBatchFeeRateSatPerKw: number, + maxBatchFeeRateSatPerKw: string, minUnitsMatch: number, } } export class QuoteOrderResponse extends jspb.Message { - getTotalPremiumSat(): number; - setTotalPremiumSat(value: number): void; + getTotalPremiumSat(): string; + setTotalPremiumSat(value: string): void; getRatePerBlock(): number; setRatePerBlock(value: number): void; @@ -942,11 +942,11 @@ export class QuoteOrderResponse extends jspb.Message { getRatePercent(): number; setRatePercent(value: number): void; - getTotalExecutionFeeSat(): number; - setTotalExecutionFeeSat(value: number): void; + getTotalExecutionFeeSat(): string; + setTotalExecutionFeeSat(value: string): void; - getWorstCaseChainFeeSat(): number; - setWorstCaseChainFeeSat(value: number): void; + getWorstCaseChainFeeSat(): string; + setWorstCaseChainFeeSat(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): QuoteOrderResponse.AsObject; @@ -960,17 +960,17 @@ export class QuoteOrderResponse extends jspb.Message { export namespace QuoteOrderResponse { export type AsObject = { - totalPremiumSat: number, + totalPremiumSat: string, ratePerBlock: number, ratePercent: number, - totalExecutionFeeSat: number, - worstCaseChainFeeSat: number, + totalExecutionFeeSat: string, + worstCaseChainFeeSat: string, } } export class OrderEvent extends jspb.Message { - getTimestampNs(): number; - setTimestampNs(value: number): void; + getTimestampNs(): string; + setTimestampNs(value: string): void; getEventStr(): string; setEventStr(value: string): void; @@ -998,7 +998,7 @@ export class OrderEvent extends jspb.Message { export namespace OrderEvent { export type AsObject = { - timestampNs: number, + timestampNs: string, eventStr: string, stateChange?: UpdatedEvent.AsObject, matched?: MatchEvent.AsObject, @@ -1153,8 +1153,8 @@ export class Lease extends jspb.Message { getChannelPoint(): auctioneerrpc_auctioneer_pb.OutPoint | undefined; setChannelPoint(value?: auctioneerrpc_auctioneer_pb.OutPoint): void; - getChannelAmtSat(): number; - setChannelAmtSat(value: number): void; + getChannelAmtSat(): string; + setChannelAmtSat(value: string): void; getChannelDurationBlocks(): number; setChannelDurationBlocks(value: number): void; @@ -1162,20 +1162,20 @@ export class Lease extends jspb.Message { getChannelLeaseExpiry(): number; setChannelLeaseExpiry(value: number): void; - getPremiumSat(): number; - setPremiumSat(value: number): void; + getPremiumSat(): string; + setPremiumSat(value: string): void; - getExecutionFeeSat(): number; - setExecutionFeeSat(value: number): void; + getExecutionFeeSat(): string; + setExecutionFeeSat(value: string): void; - getChainFeeSat(): number; - setChainFeeSat(value: number): void; + getChainFeeSat(): string; + setChainFeeSat(value: string): void; - getClearingRatePrice(): number; - setClearingRatePrice(value: number): void; + getClearingRatePrice(): string; + setClearingRatePrice(value: string): void; - getOrderFixedRate(): number; - setOrderFixedRate(value: number): void; + getOrderFixedRate(): string; + setOrderFixedRate(value: string): void; getOrderNonce(): Uint8Array | string; getOrderNonce_asU8(): Uint8Array; @@ -1193,8 +1193,8 @@ export class Lease extends jspb.Message { getChannelNodeTier(): auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]; setChannelNodeTier(value: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap]): void; - getSelfChanBalance(): number; - setSelfChanBalance(value: number): void; + getSelfChanBalance(): string; + setSelfChanBalance(value: string): void; getSidecarChannel(): boolean; setSidecarChannel(value: boolean): void; @@ -1212,19 +1212,19 @@ export class Lease extends jspb.Message { export namespace Lease { export type AsObject = { channelPoint?: auctioneerrpc_auctioneer_pb.OutPoint.AsObject, - channelAmtSat: number, + channelAmtSat: string, channelDurationBlocks: number, channelLeaseExpiry: number, - premiumSat: number, - executionFeeSat: number, - chainFeeSat: number, - clearingRatePrice: number, - orderFixedRate: number, + premiumSat: string, + executionFeeSat: string, + chainFeeSat: string, + clearingRatePrice: string, + orderFixedRate: string, orderNonce: Uint8Array | string, purchased: boolean, channelRemoteNodeKey: Uint8Array | string, channelNodeTier: auctioneerrpc_auctioneer_pb.NodeTierMap[keyof auctioneerrpc_auctioneer_pb.NodeTierMap], - selfChanBalance: number, + selfChanBalance: string, sidecarChannel: boolean, } } @@ -1267,11 +1267,11 @@ export class LeasesResponse extends jspb.Message { setLeasesList(value: Array): void; addLeases(value?: Lease, index?: number): Lease; - getTotalAmtEarnedSat(): number; - setTotalAmtEarnedSat(value: number): void; + getTotalAmtEarnedSat(): string; + setTotalAmtEarnedSat(value: string): void; - getTotalAmtPaidSat(): number; - setTotalAmtPaidSat(value: number): void; + getTotalAmtPaidSat(): string; + setTotalAmtPaidSat(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): LeasesResponse.AsObject; @@ -1286,8 +1286,8 @@ export class LeasesResponse extends jspb.Message { export namespace LeasesResponse { export type AsObject = { leasesList: Array, - totalAmtEarnedSat: number, - totalAmtPaidSat: number, + totalAmtEarnedSat: string, + totalAmtPaidSat: string, } } @@ -1345,14 +1345,14 @@ export class LsatToken extends jspb.Message { getPaymentPreimage_asB64(): string; setPaymentPreimage(value: Uint8Array | string): void; - getAmountPaidMsat(): number; - setAmountPaidMsat(value: number): void; + getAmountPaidMsat(): string; + setAmountPaidMsat(value: string): void; - getRoutingFeePaidMsat(): number; - setRoutingFeePaidMsat(value: number): void; + getRoutingFeePaidMsat(): string; + setRoutingFeePaidMsat(value: string): void; - getTimeCreated(): number; - setTimeCreated(value: number): void; + getTimeCreated(): string; + setTimeCreated(value: string): void; getExpired(): boolean; setExpired(value: boolean): void; @@ -1375,9 +1375,9 @@ export namespace LsatToken { baseMacaroon: Uint8Array | string, paymentHash: Uint8Array | string, paymentPreimage: Uint8Array | string, - amountPaidMsat: number, - routingFeePaidMsat: number, - timeCreated: number, + amountPaidMsat: string, + routingFeePaidMsat: string, + timeCreated: string, expired: boolean, storageName: string, } @@ -1441,11 +1441,11 @@ export class NextBatchInfoResponse extends jspb.Message { getConfTarget(): number; setConfTarget(value: number): void; - getFeeRateSatPerKw(): number; - setFeeRateSatPerKw(value: number): void; + getFeeRateSatPerKw(): string; + setFeeRateSatPerKw(value: string): void; - getClearTimestamp(): number; - setClearTimestamp(value: number): void; + getClearTimestamp(): string; + setClearTimestamp(value: string): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): NextBatchInfoResponse.AsObject; @@ -1460,8 +1460,8 @@ export class NextBatchInfoResponse extends jspb.Message { export namespace NextBatchInfoResponse { export type AsObject = { confTarget: number, - feeRateSatPerKw: number, - clearTimestamp: number, + feeRateSatPerKw: string, + clearTimestamp: string, } } diff --git a/app/src/types/generated/trader_pb.js b/app/src/types/generated/trader_pb.js index ec7de250..1a79aa1c 100644 --- a/app/src/types/generated/trader_pb.js +++ b/app/src/types/generated/trader_pb.js @@ -164,7 +164,7 @@ proto.poolrpc.InitAccountRequest.prototype.toObject = function(opt_includeInstan */ proto.poolrpc.InitAccountRequest.toObject = function(includeInstance, msg) { var f, obj = { - accountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + accountValue: jspb.Message.getFieldWithDefault(msg, 1, "0"), absoluteHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), relativeHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), confTarget: jspb.Message.getFieldWithDefault(msg, 4, 0), @@ -206,7 +206,7 @@ proto.poolrpc.InitAccountRequest.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAccountValue(value); break; case 2: @@ -255,8 +255,8 @@ proto.poolrpc.InitAccountRequest.prototype.serializeBinary = function() { proto.poolrpc.InitAccountRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -294,16 +294,16 @@ proto.poolrpc.InitAccountRequest.serializeBinaryToWriter = function(message, wri /** * optional uint64 account_value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.InitAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.InitAccountRequest.prototype.setAccountValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -481,7 +481,7 @@ proto.poolrpc.QuoteAccountRequest.prototype.toObject = function(opt_includeInsta */ proto.poolrpc.QuoteAccountRequest.toObject = function(includeInstance, msg) { var f, obj = { - accountValue: jspb.Message.getFieldWithDefault(msg, 1, 0), + accountValue: jspb.Message.getFieldWithDefault(msg, 1, "0"), confTarget: jspb.Message.getFieldWithDefault(msg, 2, 0) }; @@ -520,7 +520,7 @@ proto.poolrpc.QuoteAccountRequest.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAccountValue(value); break; case 2: @@ -557,8 +557,8 @@ proto.poolrpc.QuoteAccountRequest.prototype.serializeBinary = function() { proto.poolrpc.QuoteAccountRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAccountValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -575,16 +575,16 @@ proto.poolrpc.QuoteAccountRequest.serializeBinaryToWriter = function(message, wr /** * optional uint64 account_value = 1; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteAccountRequest.prototype.getAccountValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteAccountRequest.prototype.setAccountValue = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -664,8 +664,8 @@ proto.poolrpc.QuoteAccountResponse.prototype.toObject = function(opt_includeInst */ proto.poolrpc.QuoteAccountResponse.toObject = function(includeInstance, msg) { var f, obj = { - minerFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 1, 0), - minerFeeTotal: jspb.Message.getFieldWithDefault(msg, 2, 0) + minerFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 1, "0"), + minerFeeTotal: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -703,11 +703,11 @@ proto.poolrpc.QuoteAccountResponse.deserializeBinaryFromReader = function(msg, r var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinerFeeRateSatPerKw(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMinerFeeTotal(value); break; default: @@ -740,15 +740,15 @@ proto.poolrpc.QuoteAccountResponse.prototype.serializeBinary = function() { proto.poolrpc.QuoteAccountResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMinerFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } f = message.getMinerFeeTotal(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -758,31 +758,31 @@ proto.poolrpc.QuoteAccountResponse.serializeBinaryToWriter = function(message, w /** * optional uint64 miner_fee_rate_sat_per_kw = 1; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteAccountResponse.prototype.getMinerFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteAccountResponse.prototype.setMinerFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional uint64 miner_fee_total = 2; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteAccountResponse.prototype.getMinerFeeTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteAccountResponse.prototype.setMinerFeeTotal = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -1145,7 +1145,7 @@ proto.poolrpc.Output.prototype.toObject = function(opt_includeInstance) { */ proto.poolrpc.Output.toObject = function(includeInstance, msg) { var f, obj = { - valueSat: jspb.Message.getFieldWithDefault(msg, 1, 0), + valueSat: jspb.Message.getFieldWithDefault(msg, 1, "0"), address: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -1184,7 +1184,7 @@ proto.poolrpc.Output.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setValueSat(value); break; case 2: @@ -1221,8 +1221,8 @@ proto.poolrpc.Output.prototype.serializeBinary = function() { proto.poolrpc.Output.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValueSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -1239,16 +1239,16 @@ proto.poolrpc.Output.serializeBinaryToWriter = function(message, writer) { /** * optional uint64 value_sat = 1; - * @return {number} + * @return {string} */ proto.poolrpc.Output.prototype.getValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Output.prototype.setValueSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -1342,7 +1342,7 @@ proto.poolrpc.OutputWithFee.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), confTarget: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, 0) + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -1388,7 +1388,7 @@ proto.poolrpc.OutputWithFee.deserializeBinaryFromReader = function(msg, reader) msg.setConfTarget(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; default: @@ -1434,9 +1434,9 @@ proto.poolrpc.OutputWithFee.serializeBinaryToWriter = function(message, writer) f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); + f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { - writer.writeUint64( + writer.writeUint64String( 3, f ); @@ -1490,14 +1490,14 @@ proto.poolrpc.OutputWithFee.prototype.hasConfTarget = function() { /** * optional uint64 fee_rate_sat_per_kw = 3; - * @return {number} + * @return {string} */ proto.poolrpc.OutputWithFee.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.OutputWithFee.prototype.setFeeRateSatPerKw = function(value) { jspb.Message.setOneofField(this, 3, proto.poolrpc.OutputWithFee.oneofGroups_[0], value); }; @@ -2188,7 +2188,7 @@ proto.poolrpc.WithdrawAccountRequest.toObject = function(includeInstance, msg) { traderKey: msg.getTraderKey_asB64(), outputsList: jspb.Message.toObjectList(msg.getOutputsList(), proto.poolrpc.Output.toObject, includeInstance), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, 0) + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -2235,7 +2235,7 @@ proto.poolrpc.WithdrawAccountRequest.deserializeBinaryFromReader = function(msg, msg.addOutputs(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; default: @@ -2283,8 +2283,8 @@ proto.poolrpc.WithdrawAccountRequest.serializeBinaryToWriter = function(message, ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -2364,16 +2364,16 @@ proto.poolrpc.WithdrawAccountRequest.prototype.clearOutputsList = function() { /** * optional uint64 fee_rate_sat_per_kw = 3; - * @return {number} + * @return {string} */ proto.poolrpc.WithdrawAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.WithdrawAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -2635,8 +2635,8 @@ proto.poolrpc.DepositAccountRequest.prototype.toObject = function(opt_includeIns proto.poolrpc.DepositAccountRequest.toObject = function(includeInstance, msg) { var f, obj = { traderKey: msg.getTraderKey_asB64(), - amountSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, 0) + amountSat: jspb.Message.getFieldWithDefault(msg, 2, "0"), + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -2678,11 +2678,11 @@ proto.poolrpc.DepositAccountRequest.deserializeBinaryFromReader = function(msg, msg.setTraderKey(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmountSat(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; default: @@ -2722,15 +2722,15 @@ proto.poolrpc.DepositAccountRequest.serializeBinaryToWriter = function(message, ); } f = message.getAmountSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -2779,31 +2779,31 @@ proto.poolrpc.DepositAccountRequest.prototype.setTraderKey = function(value) { /** * optional uint64 amount_sat = 2; - * @return {number} + * @return {string} */ proto.poolrpc.DepositAccountRequest.prototype.getAmountSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.DepositAccountRequest.prototype.setAmountSat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 fee_rate_sat_per_kw = 3; - * @return {number} + * @return {string} */ proto.poolrpc.DepositAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.DepositAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -3093,7 +3093,7 @@ proto.poolrpc.RenewAccountRequest.toObject = function(includeInstance, msg) { accountKey: msg.getAccountKey_asB64(), absoluteExpiry: jspb.Message.getFieldWithDefault(msg, 2, 0), relativeExpiry: jspb.Message.getFieldWithDefault(msg, 3, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, 0) + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, "0") }; if (includeInstance) { @@ -3143,7 +3143,7 @@ proto.poolrpc.RenewAccountRequest.deserializeBinaryFromReader = function(msg, re msg.setRelativeExpiry(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; default: @@ -3197,8 +3197,8 @@ proto.poolrpc.RenewAccountRequest.serializeBinaryToWriter = function(message, wr ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -3305,16 +3305,16 @@ proto.poolrpc.RenewAccountRequest.prototype.hasRelativeExpiry = function() { /** * optional uint64 fee_rate_sat_per_kw = 4; - * @return {number} + * @return {string} */ proto.poolrpc.RenewAccountRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.RenewAccountRequest.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -3576,7 +3576,7 @@ proto.poolrpc.BumpAccountFeeRequest.prototype.toObject = function(opt_includeIns proto.poolrpc.BumpAccountFeeRequest.toObject = function(includeInstance, msg) { var f, obj = { traderKey: msg.getTraderKey_asB64(), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 2, 0) + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 2, "0") }; if (includeInstance) { @@ -3618,7 +3618,7 @@ proto.poolrpc.BumpAccountFeeRequest.deserializeBinaryFromReader = function(msg, msg.setTraderKey(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; default: @@ -3658,8 +3658,8 @@ proto.poolrpc.BumpAccountFeeRequest.serializeBinaryToWriter = function(message, ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -3708,16 +3708,16 @@ proto.poolrpc.BumpAccountFeeRequest.prototype.setTraderKey = function(value) { /** * optional uint64 fee_rate_sat_per_kw = 2; - * @return {number} + * @return {string} */ proto.poolrpc.BumpAccountFeeRequest.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.BumpAccountFeeRequest.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -3886,8 +3886,8 @@ proto.poolrpc.Account.toObject = function(includeInstance, msg) { var f, obj = { traderKey: msg.getTraderKey_asB64(), outpoint: (f = msg.getOutpoint()) && auctioneerrpc_auctioneer_pb.OutPoint.toObject(includeInstance, f), - value: jspb.Message.getFieldWithDefault(msg, 3, 0), - availableBalance: jspb.Message.getFieldWithDefault(msg, 4, 0), + value: jspb.Message.getFieldWithDefault(msg, 3, "0"), + availableBalance: jspb.Message.getFieldWithDefault(msg, 4, "0"), expirationHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), state: jspb.Message.getFieldWithDefault(msg, 6, 0), latestTxid: msg.getLatestTxid_asB64() @@ -3937,11 +3937,11 @@ proto.poolrpc.Account.deserializeBinaryFromReader = function(msg, reader) { msg.setOutpoint(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setValue(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAvailableBalance(value); break; case 5: @@ -4001,15 +4001,15 @@ proto.poolrpc.Account.serializeBinaryToWriter = function(message, writer) { ); } f = message.getValue(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); } f = message.getAvailableBalance(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -4109,31 +4109,31 @@ proto.poolrpc.Account.prototype.hasOutpoint = function() { /** * optional uint64 value = 3; - * @return {number} + * @return {string} */ proto.poolrpc.Account.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Account.prototype.setValue = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional uint64 available_balance = 4; - * @return {number} + * @return {string} */ proto.poolrpc.Account.prototype.getAvailableBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Account.prototype.setAvailableBalance = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -5437,14 +5437,14 @@ proto.poolrpc.Order.toObject = function(includeInstance, msg) { var f, obj = { traderKey: msg.getTraderKey_asB64(), rateFixed: jspb.Message.getFieldWithDefault(msg, 2, 0), - amt: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, 0), + amt: jspb.Message.getFieldWithDefault(msg, 3, "0"), + maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, "0"), orderNonce: msg.getOrderNonce_asB64(), state: jspb.Message.getFieldWithDefault(msg, 6, 0), units: jspb.Message.getFieldWithDefault(msg, 7, 0), unitsUnfulfilled: jspb.Message.getFieldWithDefault(msg, 8, 0), - reservedValueSat: jspb.Message.getFieldWithDefault(msg, 9, 0), - creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 10, 0), + reservedValueSat: jspb.Message.getFieldWithDefault(msg, 9, "0"), + creationTimestampNs: jspb.Message.getFieldWithDefault(msg, 10, "0"), eventsList: jspb.Message.toObjectList(msg.getEventsList(), proto.poolrpc.OrderEvent.toObject, includeInstance), minUnitsMatch: jspb.Message.getFieldWithDefault(msg, 12, 0) @@ -5493,11 +5493,11 @@ proto.poolrpc.Order.deserializeBinaryFromReader = function(msg, reader) { msg.setRateFixed(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmt(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxBatchFeeRateSatPerKw(value); break; case 5: @@ -5517,11 +5517,11 @@ proto.poolrpc.Order.deserializeBinaryFromReader = function(msg, reader) { msg.setUnitsUnfulfilled(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setReservedValueSat(value); break; case 10: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setCreationTimestampNs(value); break; case 11: @@ -5577,15 +5577,15 @@ proto.poolrpc.Order.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmt(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); } f = message.getMaxBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -5619,15 +5619,15 @@ proto.poolrpc.Order.serializeBinaryToWriter = function(message, writer) { ); } f = message.getReservedValueSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); } f = message.getCreationTimestampNs(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 10, f ); @@ -5706,31 +5706,31 @@ proto.poolrpc.Order.prototype.setRateFixed = function(value) { /** * optional uint64 amt = 3; - * @return {number} + * @return {string} */ proto.poolrpc.Order.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Order.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; /** * optional uint64 max_batch_fee_rate_sat_per_kw = 4; - * @return {number} + * @return {string} */ proto.poolrpc.Order.prototype.getMaxBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Order.prototype.setMaxBatchFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -5820,31 +5820,31 @@ proto.poolrpc.Order.prototype.setUnitsUnfulfilled = function(value) { /** * optional uint64 reserved_value_sat = 9; - * @return {number} + * @return {string} */ proto.poolrpc.Order.prototype.getReservedValueSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Order.prototype.setReservedValueSat = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; /** * optional uint64 creation_timestamp_ns = 10; - * @return {number} + * @return {string} */ proto.poolrpc.Order.prototype.getCreationTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Order.prototype.setCreationTimestampNs = function(value) { - jspb.Message.setProto3IntField(this, 10, value); + jspb.Message.setProto3StringIntField(this, 10, value); }; @@ -5945,7 +5945,7 @@ proto.poolrpc.Bid.toObject = function(includeInstance, msg) { leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 2, 0), version: jspb.Message.getFieldWithDefault(msg, 3, 0), minNodeTier: jspb.Message.getFieldWithDefault(msg, 4, 0), - selfChanBalance: jspb.Message.getFieldWithDefault(msg, 5, 0), + selfChanBalance: jspb.Message.getFieldWithDefault(msg, 5, "0"), sidecarTicket: jspb.Message.getFieldWithDefault(msg, 6, "") }; @@ -6001,7 +6001,7 @@ proto.poolrpc.Bid.deserializeBinaryFromReader = function(msg, reader) { msg.setMinNodeTier(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSelfChanBalance(value); break; case 6: @@ -6067,8 +6067,8 @@ proto.poolrpc.Bid.serializeBinaryToWriter = function(message, writer) { ); } f = message.getSelfChanBalance(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); @@ -6160,16 +6160,16 @@ proto.poolrpc.Bid.prototype.setMinNodeTier = function(value) { /** * optional uint64 self_chan_balance = 5; - * @return {number} + * @return {string} */ proto.poolrpc.Bid.prototype.getSelfChanBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Bid.prototype.setSelfChanBalance = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -6448,10 +6448,10 @@ proto.poolrpc.QuoteOrderRequest.prototype.toObject = function(opt_includeInstanc */ proto.poolrpc.QuoteOrderRequest.toObject = function(includeInstance, msg) { var f, obj = { - amt: jspb.Message.getFieldWithDefault(msg, 1, 0), + amt: jspb.Message.getFieldWithDefault(msg, 1, "0"), rateFixed: jspb.Message.getFieldWithDefault(msg, 2, 0), leaseDurationBlocks: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, 0), + maxBatchFeeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 4, "0"), minUnitsMatch: jspb.Message.getFieldWithDefault(msg, 5, 0) }; @@ -6490,7 +6490,7 @@ proto.poolrpc.QuoteOrderRequest.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setAmt(value); break; case 2: @@ -6502,7 +6502,7 @@ proto.poolrpc.QuoteOrderRequest.deserializeBinaryFromReader = function(msg, read msg.setLeaseDurationBlocks(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setMaxBatchFeeRateSatPerKw(value); break; case 5: @@ -6539,8 +6539,8 @@ proto.poolrpc.QuoteOrderRequest.prototype.serializeBinary = function() { proto.poolrpc.QuoteOrderRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAmt(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -6560,8 +6560,8 @@ proto.poolrpc.QuoteOrderRequest.serializeBinaryToWriter = function(message, writ ); } f = message.getMaxBatchFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); @@ -6578,16 +6578,16 @@ proto.poolrpc.QuoteOrderRequest.serializeBinaryToWriter = function(message, writ /** * optional uint64 amt = 1; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteOrderRequest.prototype.getAmt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteOrderRequest.prototype.setAmt = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -6623,16 +6623,16 @@ proto.poolrpc.QuoteOrderRequest.prototype.setLeaseDurationBlocks = function(valu /** * optional uint64 max_batch_fee_rate_sat_per_kw = 4; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteOrderRequest.prototype.getMaxBatchFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteOrderRequest.prototype.setMaxBatchFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; @@ -6698,11 +6698,11 @@ proto.poolrpc.QuoteOrderResponse.prototype.toObject = function(opt_includeInstan */ proto.poolrpc.QuoteOrderResponse.toObject = function(includeInstance, msg) { var f, obj = { - totalPremiumSat: jspb.Message.getFieldWithDefault(msg, 1, 0), + totalPremiumSat: jspb.Message.getFieldWithDefault(msg, 1, "0"), ratePerBlock: +jspb.Message.getFieldWithDefault(msg, 2, 0.0), ratePercent: +jspb.Message.getFieldWithDefault(msg, 3, 0.0), - totalExecutionFeeSat: jspb.Message.getFieldWithDefault(msg, 4, 0), - worstCaseChainFeeSat: jspb.Message.getFieldWithDefault(msg, 5, 0) + totalExecutionFeeSat: jspb.Message.getFieldWithDefault(msg, 4, "0"), + worstCaseChainFeeSat: jspb.Message.getFieldWithDefault(msg, 5, "0") }; if (includeInstance) { @@ -6740,7 +6740,7 @@ proto.poolrpc.QuoteOrderResponse.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTotalPremiumSat(value); break; case 2: @@ -6752,11 +6752,11 @@ proto.poolrpc.QuoteOrderResponse.deserializeBinaryFromReader = function(msg, rea msg.setRatePercent(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTotalExecutionFeeSat(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setWorstCaseChainFeeSat(value); break; default: @@ -6789,8 +6789,8 @@ proto.poolrpc.QuoteOrderResponse.prototype.serializeBinary = function() { proto.poolrpc.QuoteOrderResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTotalPremiumSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); @@ -6810,15 +6810,15 @@ proto.poolrpc.QuoteOrderResponse.serializeBinaryToWriter = function(message, wri ); } f = message.getTotalExecutionFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 4, f ); } f = message.getWorstCaseChainFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); @@ -6828,16 +6828,16 @@ proto.poolrpc.QuoteOrderResponse.serializeBinaryToWriter = function(message, wri /** * optional uint64 total_premium_sat = 1; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteOrderResponse.prototype.getTotalPremiumSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteOrderResponse.prototype.setTotalPremiumSat = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -6873,31 +6873,31 @@ proto.poolrpc.QuoteOrderResponse.prototype.setRatePercent = function(value) { /** * optional uint64 total_execution_fee_sat = 4; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteOrderResponse.prototype.getTotalExecutionFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteOrderResponse.prototype.setTotalExecutionFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional uint64 worst_case_chain_fee_sat = 5; - * @return {number} + * @return {string} */ proto.poolrpc.QuoteOrderResponse.prototype.getWorstCaseChainFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.QuoteOrderResponse.prototype.setWorstCaseChainFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; @@ -6974,7 +6974,7 @@ proto.poolrpc.OrderEvent.prototype.toObject = function(opt_includeInstance) { */ proto.poolrpc.OrderEvent.toObject = function(includeInstance, msg) { var f, obj = { - timestampNs: jspb.Message.getFieldWithDefault(msg, 1, 0), + timestampNs: jspb.Message.getFieldWithDefault(msg, 1, "0"), eventStr: jspb.Message.getFieldWithDefault(msg, 2, ""), stateChange: (f = msg.getStateChange()) && proto.poolrpc.UpdatedEvent.toObject(includeInstance, f), matched: (f = msg.getMatched()) && proto.poolrpc.MatchEvent.toObject(includeInstance, f) @@ -7015,7 +7015,7 @@ proto.poolrpc.OrderEvent.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTimestampNs(value); break; case 2: @@ -7062,8 +7062,8 @@ proto.poolrpc.OrderEvent.prototype.serializeBinary = function() { proto.poolrpc.OrderEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTimestampNs(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 1, f ); @@ -7096,16 +7096,16 @@ proto.poolrpc.OrderEvent.serializeBinaryToWriter = function(message, writer) { /** * optional int64 timestamp_ns = 1; - * @return {number} + * @return {string} */ proto.poolrpc.OrderEvent.prototype.getTimestampNs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.OrderEvent.prototype.setTimestampNs = function(value) { - jspb.Message.setProto3IntField(this, 1, value); + jspb.Message.setProto3StringIntField(this, 1, value); }; @@ -8208,19 +8208,19 @@ proto.poolrpc.Lease.prototype.toObject = function(opt_includeInstance) { proto.poolrpc.Lease.toObject = function(includeInstance, msg) { var f, obj = { channelPoint: (f = msg.getChannelPoint()) && auctioneerrpc_auctioneer_pb.OutPoint.toObject(includeInstance, f), - channelAmtSat: jspb.Message.getFieldWithDefault(msg, 2, 0), + channelAmtSat: jspb.Message.getFieldWithDefault(msg, 2, "0"), channelDurationBlocks: jspb.Message.getFieldWithDefault(msg, 3, 0), channelLeaseExpiry: jspb.Message.getFieldWithDefault(msg, 4, 0), - premiumSat: jspb.Message.getFieldWithDefault(msg, 5, 0), - executionFeeSat: jspb.Message.getFieldWithDefault(msg, 6, 0), - chainFeeSat: jspb.Message.getFieldWithDefault(msg, 7, 0), - clearingRatePrice: jspb.Message.getFieldWithDefault(msg, 8, 0), - orderFixedRate: jspb.Message.getFieldWithDefault(msg, 9, 0), + premiumSat: jspb.Message.getFieldWithDefault(msg, 5, "0"), + executionFeeSat: jspb.Message.getFieldWithDefault(msg, 6, "0"), + chainFeeSat: jspb.Message.getFieldWithDefault(msg, 7, "0"), + clearingRatePrice: jspb.Message.getFieldWithDefault(msg, 8, "0"), + orderFixedRate: jspb.Message.getFieldWithDefault(msg, 9, "0"), orderNonce: msg.getOrderNonce_asB64(), purchased: jspb.Message.getFieldWithDefault(msg, 11, false), channelRemoteNodeKey: msg.getChannelRemoteNodeKey_asB64(), channelNodeTier: jspb.Message.getFieldWithDefault(msg, 13, 0), - selfChanBalance: jspb.Message.getFieldWithDefault(msg, 14, 0), + selfChanBalance: jspb.Message.getFieldWithDefault(msg, 14, "0"), sidecarChannel: jspb.Message.getFieldWithDefault(msg, 15, false) }; @@ -8264,7 +8264,7 @@ proto.poolrpc.Lease.deserializeBinaryFromReader = function(msg, reader) { msg.setChannelPoint(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setChannelAmtSat(value); break; case 3: @@ -8276,23 +8276,23 @@ proto.poolrpc.Lease.deserializeBinaryFromReader = function(msg, reader) { msg.setChannelLeaseExpiry(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setPremiumSat(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setExecutionFeeSat(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setChainFeeSat(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setClearingRatePrice(value); break; case 9: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setOrderFixedRate(value); break; case 10: @@ -8312,7 +8312,7 @@ proto.poolrpc.Lease.deserializeBinaryFromReader = function(msg, reader) { msg.setChannelNodeTier(value); break; case 14: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setSelfChanBalance(value); break; case 15: @@ -8357,8 +8357,8 @@ proto.poolrpc.Lease.serializeBinaryToWriter = function(message, writer) { ); } f = message.getChannelAmtSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); @@ -8378,36 +8378,36 @@ proto.poolrpc.Lease.serializeBinaryToWriter = function(message, writer) { ); } f = message.getPremiumSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 5, f ); } f = message.getExecutionFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getChainFeeSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); } f = message.getClearingRatePrice(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 8, f ); } f = message.getOrderFixedRate(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 9, f ); @@ -8441,8 +8441,8 @@ proto.poolrpc.Lease.serializeBinaryToWriter = function(message, writer) { ); } f = message.getSelfChanBalance(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 14, f ); @@ -8489,16 +8489,16 @@ proto.poolrpc.Lease.prototype.hasChannelPoint = function() { /** * optional uint64 channel_amt_sat = 2; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getChannelAmtSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setChannelAmtSat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; @@ -8534,76 +8534,76 @@ proto.poolrpc.Lease.prototype.setChannelLeaseExpiry = function(value) { /** * optional uint64 premium_sat = 5; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getPremiumSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setPremiumSat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional uint64 execution_fee_sat = 6; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getExecutionFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setExecutionFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 chain_fee_sat = 7; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getChainFeeSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setChainFeeSat = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; /** * optional uint64 clearing_rate_price = 8; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getClearingRatePrice = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setClearingRatePrice = function(value) { - jspb.Message.setProto3IntField(this, 8, value); + jspb.Message.setProto3StringIntField(this, 8, value); }; /** * optional uint64 order_fixed_rate = 9; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getOrderFixedRate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setOrderFixedRate = function(value) { - jspb.Message.setProto3IntField(this, 9, value); + jspb.Message.setProto3StringIntField(this, 9, value); }; @@ -8719,16 +8719,16 @@ proto.poolrpc.Lease.prototype.setChannelNodeTier = function(value) { /** * optional uint64 self_chan_balance = 14; - * @return {number} + * @return {string} */ proto.poolrpc.Lease.prototype.getSelfChanBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.Lease.prototype.setSelfChanBalance = function(value) { - jspb.Message.setProto3IntField(this, 14, value); + jspb.Message.setProto3StringIntField(this, 14, value); }; @@ -9057,8 +9057,8 @@ proto.poolrpc.LeasesResponse.toObject = function(includeInstance, msg) { var f, obj = { leasesList: jspb.Message.toObjectList(msg.getLeasesList(), proto.poolrpc.Lease.toObject, includeInstance), - totalAmtEarnedSat: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalAmtPaidSat: jspb.Message.getFieldWithDefault(msg, 3, 0) + totalAmtEarnedSat: jspb.Message.getFieldWithDefault(msg, 2, "0"), + totalAmtPaidSat: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -9101,11 +9101,11 @@ proto.poolrpc.LeasesResponse.deserializeBinaryFromReader = function(msg, reader) msg.addLeases(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTotalAmtEarnedSat(value); break; case 3: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setTotalAmtPaidSat(value); break; default: @@ -9146,15 +9146,15 @@ proto.poolrpc.LeasesResponse.serializeBinaryToWriter = function(message, writer) ); } f = message.getTotalAmtEarnedSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } f = message.getTotalAmtPaidSat(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 3, f ); @@ -9195,31 +9195,31 @@ proto.poolrpc.LeasesResponse.prototype.clearLeasesList = function() { /** * optional uint64 total_amt_earned_sat = 2; - * @return {number} + * @return {string} */ proto.poolrpc.LeasesResponse.prototype.getTotalAmtEarnedSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.LeasesResponse.prototype.setTotalAmtEarnedSat = function(value) { - jspb.Message.setProto3IntField(this, 2, value); + jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional uint64 total_amt_paid_sat = 3; - * @return {number} + * @return {string} */ proto.poolrpc.LeasesResponse.prototype.getTotalAmtPaidSat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.LeasesResponse.prototype.setTotalAmtPaidSat = function(value) { - jspb.Message.setProto3IntField(this, 3, value); + jspb.Message.setProto3StringIntField(this, 3, value); }; @@ -9557,9 +9557,9 @@ proto.poolrpc.LsatToken.toObject = function(includeInstance, msg) { baseMacaroon: msg.getBaseMacaroon_asB64(), paymentHash: msg.getPaymentHash_asB64(), paymentPreimage: msg.getPaymentPreimage_asB64(), - amountPaidMsat: jspb.Message.getFieldWithDefault(msg, 4, 0), - routingFeePaidMsat: jspb.Message.getFieldWithDefault(msg, 5, 0), - timeCreated: jspb.Message.getFieldWithDefault(msg, 6, 0), + amountPaidMsat: jspb.Message.getFieldWithDefault(msg, 4, "0"), + routingFeePaidMsat: jspb.Message.getFieldWithDefault(msg, 5, "0"), + timeCreated: jspb.Message.getFieldWithDefault(msg, 6, "0"), expired: jspb.Message.getFieldWithDefault(msg, 7, false), storageName: jspb.Message.getFieldWithDefault(msg, 8, "") }; @@ -9611,15 +9611,15 @@ proto.poolrpc.LsatToken.deserializeBinaryFromReader = function(msg, reader) { msg.setPaymentPreimage(value); break; case 4: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setAmountPaidMsat(value); break; case 5: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setRoutingFeePaidMsat(value); break; case 6: - var value = /** @type {number} */ (reader.readInt64()); + var value = /** @type {string} */ (reader.readInt64String()); msg.setTimeCreated(value); break; case 7: @@ -9681,22 +9681,22 @@ proto.poolrpc.LsatToken.serializeBinaryToWriter = function(message, writer) { ); } f = message.getAmountPaidMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 4, f ); } f = message.getRoutingFeePaidMsat(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 5, f ); } f = message.getTimeCreated(); - if (f !== 0) { - writer.writeInt64( + if (parseInt(f, 10) !== 0) { + writer.writeInt64String( 6, f ); @@ -9837,46 +9837,46 @@ proto.poolrpc.LsatToken.prototype.setPaymentPreimage = function(value) { /** * optional int64 amount_paid_msat = 4; - * @return {number} + * @return {string} */ proto.poolrpc.LsatToken.prototype.getAmountPaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.LsatToken.prototype.setAmountPaidMsat = function(value) { - jspb.Message.setProto3IntField(this, 4, value); + jspb.Message.setProto3StringIntField(this, 4, value); }; /** * optional int64 routing_fee_paid_msat = 5; - * @return {number} + * @return {string} */ proto.poolrpc.LsatToken.prototype.getRoutingFeePaidMsat = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.LsatToken.prototype.setRoutingFeePaidMsat = function(value) { - jspb.Message.setProto3IntField(this, 5, value); + jspb.Message.setProto3StringIntField(this, 5, value); }; /** * optional int64 time_created = 6; - * @return {number} + * @return {string} */ proto.poolrpc.LsatToken.prototype.getTimeCreated = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.LsatToken.prototype.setTimeCreated = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; @@ -10365,8 +10365,8 @@ proto.poolrpc.NextBatchInfoResponse.prototype.toObject = function(opt_includeIns proto.poolrpc.NextBatchInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { confTarget: jspb.Message.getFieldWithDefault(msg, 5, 0), - feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), - clearTimestamp: jspb.Message.getFieldWithDefault(msg, 7, 0) + feeRateSatPerKw: jspb.Message.getFieldWithDefault(msg, 6, "0"), + clearTimestamp: jspb.Message.getFieldWithDefault(msg, 7, "0") }; if (includeInstance) { @@ -10408,11 +10408,11 @@ proto.poolrpc.NextBatchInfoResponse.deserializeBinaryFromReader = function(msg, msg.setConfTarget(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setFeeRateSatPerKw(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); + var value = /** @type {string} */ (reader.readUint64String()); msg.setClearTimestamp(value); break; default: @@ -10452,15 +10452,15 @@ proto.poolrpc.NextBatchInfoResponse.serializeBinaryToWriter = function(message, ); } f = message.getFeeRateSatPerKw(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 6, f ); } f = message.getClearTimestamp(); - if (f !== 0) { - writer.writeUint64( + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 7, f ); @@ -10485,31 +10485,31 @@ proto.poolrpc.NextBatchInfoResponse.prototype.setConfTarget = function(value) { /** * optional uint64 fee_rate_sat_per_kw = 6; - * @return {number} + * @return {string} */ proto.poolrpc.NextBatchInfoResponse.prototype.getFeeRateSatPerKw = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.NextBatchInfoResponse.prototype.setFeeRateSatPerKw = function(value) { - jspb.Message.setProto3IntField(this, 6, value); + jspb.Message.setProto3StringIntField(this, 6, value); }; /** * optional uint64 clear_timestamp = 7; - * @return {number} + * @return {string} */ proto.poolrpc.NextBatchInfoResponse.prototype.getClearTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "0")); }; -/** @param {number} value */ +/** @param {string} value */ proto.poolrpc.NextBatchInfoResponse.prototype.setClearTimestamp = function(value) { - jspb.Message.setProto3IntField(this, 7, value); + jspb.Message.setProto3StringIntField(this, 7, value); }; diff --git a/proto/auctioneerrpc/auctioneer.proto b/proto/auctioneerrpc/auctioneer.proto index 3ca3a843..ff73d266 100644 --- a/proto/auctioneerrpc/auctioneer.proto +++ b/proto/auctioneerrpc/auctioneer.proto @@ -48,7 +48,7 @@ message ReserveAccountRequest { /* The desired value of the account in satoshis. */ - uint64 account_value = 1; + uint64 account_value = 1 [jstype = JS_STRING]; /* The block height at which the account should expire. @@ -94,7 +94,7 @@ message ServerInitAccountRequest { The value of the account in satoshis. Must match the amount of the account_point output. */ - uint64 account_value = 3; + uint64 account_value = 3 [jstype = JS_STRING]; /* The block height at which the account should expire. @@ -519,13 +519,13 @@ message OrderMatchPrepare { Fee rate of the batch transaction, expressed in satoshis per 1000 weight units (sat/kW). */ - uint64 fee_rate_sat_per_kw = 6; + uint64 fee_rate_sat_per_kw = 6 [jstype = JS_STRING]; /* Fee rebate in satoshis, offered if another batch participant wants to pay more fees for a faster confirmation. */ - uint64 fee_rebate_sat = 7; + uint64 fee_rebate_sat = 7 [jstype = JS_STRING]; /* The 32 byte unique identifier of this batch. @@ -666,7 +666,7 @@ message AuctionAccount { The value of the account in satoshis. Must match the amount of the account_point output. */ - uint64 value = 1; + uint64 value = 1 [jstype = JS_STRING]; /* The block height at which the account should expire. @@ -760,7 +760,7 @@ message AccountDiff { /* The final balance of the account after the executed batch. */ - uint64 ending_balance = 1; + uint64 ending_balance = 1 [jstype = JS_STRING]; /* Depending on the amount of the final balance of the account, the remainder @@ -797,9 +797,9 @@ message ServerOrder { /* Order amount in satoshis. */ - uint64 amt = 3; + uint64 amt = 3 [jstype = JS_STRING]; - uint64 min_chan_amt = 4; + uint64 min_chan_amt = 4 [jstype = JS_STRING]; // TODO(guggero): implement // repeated bytes must_fill_pub = 5; @@ -836,7 +836,7 @@ message ServerOrder { /* // TODO(guggero): implement - int64 min_node_score = 11; + int64 min_node_score = 11 [jstype = JS_STRING]; */ reserved 11; @@ -849,7 +849,7 @@ message ServerOrder { Maximum fee rate the trader is willing to pay for the batch transaction, expressed in satoshis per 1000 weight units (sat/kW). */ - uint64 max_batch_fee_rate_sat_per_kw = 13; + uint64 max_batch_fee_rate_sat_per_kw = 13 [jstype = JS_STRING]; } enum NodeTier { @@ -905,7 +905,7 @@ message ServerBid { as the order amount and the min_chan_amt must be set to the full order amount. */ - uint64 self_chan_balance = 6; + uint64 self_chan_balance = 6 [jstype = JS_STRING]; /* If this bid order is meant to lease a channel for another node (which is @@ -960,7 +960,7 @@ message ServerInput { message ServerOutput { // The value, in satoshis, of the output. - uint64 value = 1; + uint64 value = 1 [jstype = JS_STRING]; // The script of the output to send the value to. bytes script = 2; @@ -988,7 +988,7 @@ message ServerModifyAccountRequest { message NewAccountParameters { // The new value of the account. - uint64 value = 1; + uint64 value = 1 [jstype = JS_STRING]; // The new expiry of the account as an absolute height. uint32 expiry = 2; @@ -1067,7 +1067,7 @@ message TermsResponse { /* The maximum account size in satoshis currently allowed by the auctioneer. */ - uint64 max_account_value = 1; + uint64 max_account_value = 1 [jstype = JS_STRING]; /* Deprecated, use explicit order duration from lease_duration_buckets. @@ -1091,13 +1091,13 @@ message TermsResponse { The fee rate, in satoshis per kiloweight, estimated to use for the next batch. */ - uint64 next_batch_fee_rate_sat_per_kw = 6; + uint64 next_batch_fee_rate_sat_per_kw = 6 [jstype = JS_STRING]; /* The absolute unix timestamp at which the auctioneer will attempt to clear the next batch. */ - uint64 next_batch_clear_timestamp = 7; + uint64 next_batch_clear_timestamp = 7 [jstype = JS_STRING]; /* The set of lease durations the market is currently accepting and the state @@ -1150,10 +1150,10 @@ message RelevantBatch { Fee rate of the batch transaction, expressed in satoshis per 1000 weight units (sat/kW). */ - uint64 fee_rate_sat_per_kw = 8; + uint64 fee_rate_sat_per_kw = 8 [jstype = JS_STRING]; // The unix timestamp in nanoseconds the batch was made. - uint64 creation_timestamp_ns = 9; + uint64 creation_timestamp_ns = 9 [jstype = JS_STRING]; /* Maps the distinct lease duration markets to the orders that were matched @@ -1166,12 +1166,12 @@ message ExecutionFee { /* The base fee in satoshis charged per order, regardless of the matched size. */ - uint64 base_fee = 1; + uint64 base_fee = 1 [jstype = JS_STRING]; /* The fee rate in parts per million. */ - uint64 fee_rate = 2; + uint64 fee_rate = 2 [jstype = JS_STRING]; } message NodeAddress { @@ -1228,7 +1228,7 @@ message MatchedOrderSnapshot { uint32 matching_rate = 3; // The total number of satoshis that were bought. - uint64 total_sats_cleared = 4; + uint64 total_sats_cleared = 4 [jstype = JS_STRING]; // The total number of units that were matched. uint32 units_matched = 5; @@ -1279,10 +1279,10 @@ message BatchSnapshotResponse { bytes batch_tx = 6; // The fee rate, in satoshis per kiloweight, of the batch transaction. - uint64 batch_tx_fee_rate_sat_per_kw = 8; + uint64 batch_tx_fee_rate_sat_per_kw = 8 [jstype = JS_STRING]; // The unix timestamp in nanoseconds the batch was made. - uint64 creation_timestamp_ns = 9; + uint64 creation_timestamp_ns = 9 [jstype = JS_STRING]; /* Maps the distinct lease duration markets to the orders that were matched diff --git a/proto/lnd.proto b/proto/lnd.proto index 95afe2f9..03f24f21 100644 --- a/proto/lnd.proto +++ b/proto/lnd.proto @@ -524,7 +524,7 @@ message Utxo { string address = 2; // The value of the unspent coin in satoshis - int64 amount_sat = 3; + int64 amount_sat = 3 [jstype = JS_STRING]; // The pkscript in hex string pk_script = 4; @@ -533,7 +533,7 @@ message Utxo { OutPoint outpoint = 5; // The number of confirmations for the Utxo - int64 confirmations = 6; + int64 confirmations = 6 [jstype = JS_STRING]; } message Transaction { @@ -541,7 +541,7 @@ message Transaction { string tx_hash = 1; // The transaction amount, denominated in satoshis - int64 amount = 2; + int64 amount = 2 [jstype = JS_STRING]; // The number of confirmations int32 num_confirmations = 3; @@ -553,10 +553,10 @@ message Transaction { int32 block_height = 5; // Timestamp of this transaction - int64 time_stamp = 6; + int64 time_stamp = 6 [jstype = JS_STRING]; // Fees paid for this transaction - int64 total_fees = 7; + int64 total_fees = 7 [jstype = JS_STRING]; // Addresses that received funds for this transaction repeated string dest_addresses = 8; @@ -599,17 +599,17 @@ message FeeLimit { The fields fixed and fixed_msat are mutually exclusive. */ - int64 fixed = 1; + int64 fixed = 1 [jstype = JS_STRING]; /* The fee limit expressed as a fixed amount of millisatoshis. The fields fixed and fixed_msat are mutually exclusive. */ - int64 fixed_msat = 3; + int64 fixed_msat = 3 [jstype = JS_STRING]; // The fee limit expressed as a percentage of the payment amount. - int64 percent = 2; + int64 percent = 2 [jstype = JS_STRING]; } } @@ -631,14 +631,14 @@ message SendRequest { The fields amt and amt_msat are mutually exclusive. */ - int64 amt = 3; + int64 amt = 3 [jstype = JS_STRING]; /* The amount to send expressed in millisatoshis. The fields amt and amt_msat are mutually exclusive. */ - int64 amt_msat = 12; + int64 amt_msat = 12 [jstype = JS_STRING]; /* The hash to use within the payment's HTLC. When using REST, this field @@ -756,28 +756,28 @@ message ChannelAcceptRequest { // The funding amount in satoshis that initiator wishes to use in the // channel. - uint64 funding_amt = 4; + uint64 funding_amt = 4 [jstype = JS_STRING]; // The push amount of the proposed channel in millisatoshis. - uint64 push_amt = 5; + uint64 push_amt = 5 [jstype = JS_STRING]; // The dust limit of the initiator's commitment tx. - uint64 dust_limit = 6; + uint64 dust_limit = 6 [jstype = JS_STRING]; // The maximum amount of coins in millisatoshis that can be pending in this // channel. - uint64 max_value_in_flight = 7; + uint64 max_value_in_flight = 7 [jstype = JS_STRING]; // The minimum amount of satoshis the initiator requires us to have at all // times. - uint64 channel_reserve = 8; + uint64 channel_reserve = 8 [jstype = JS_STRING]; // The smallest HTLC in millisatoshis that the initiator will accept. - uint64 min_htlc = 9; + uint64 min_htlc = 9 [jstype = JS_STRING]; // The initial fee rate that the initiator suggests for both commitment // transactions. - uint64 fee_per_kw = 10; + uint64 fee_per_kw = 10 [jstype = JS_STRING]; /* The number of blocks to use for the relative time lock in the pay-to-self @@ -829,13 +829,13 @@ message ChannelAcceptResponse { them so that there is always a disincentive to broadcast old state (if they hold 0 sats on their side of the channel, there is nothing to lose). */ - uint64 reserve_sat = 6; + uint64 reserve_sat = 6 [jstype = JS_STRING]; /* The maximum amount of funds in millisatoshis that we allow the remote peer to have in outstanding htlcs. */ - uint64 in_flight_max_msat = 7; + uint64 in_flight_max_msat = 7 [jstype = JS_STRING]; /* The maximum number of htlcs that the remote peer can offer us. @@ -845,7 +845,7 @@ message ChannelAcceptResponse { /* The minimum value in millisatoshis for incoming htlcs on the channel. */ - uint64 min_htlc_in = 9; + uint64 min_htlc_in = 9 [jstype = JS_STRING]; /* The number of confirmations we require before we consider the channel open. @@ -910,14 +910,14 @@ message EstimateFeeRequest { message EstimateFeeResponse { // The total fee in satoshis. - int64 fee_sat = 1; + int64 fee_sat = 1 [jstype = JS_STRING]; // Deprecated, use sat_per_vbyte. // The fee rate in satoshi/vbyte. - int64 feerate_sat_per_byte = 2 [deprecated = true]; + int64 feerate_sat_per_byte = 2 [deprecated = true, jstype = JS_STRING]; // The fee rate in satoshi/vbyte. - uint64 sat_per_vbyte = 3; + uint64 sat_per_vbyte = 3 [jstype = JS_STRING]; } message SendManyRequest { @@ -930,12 +930,12 @@ message SendManyRequest { // A manual fee rate set in sat/vbyte that should be used when crafting the // transaction. - uint64 sat_per_vbyte = 4; + uint64 sat_per_vbyte = 4 [jstype = JS_STRING]; // Deprecated, use sat_per_vbyte. // A manual fee rate set in sat/vbyte that should be used when crafting the // transaction. - int64 sat_per_byte = 5 [deprecated = true]; + int64 sat_per_byte = 5 [deprecated = true, jstype = JS_STRING]; // An optional label for the transaction, limited to 500 characters. string label = 6; @@ -957,7 +957,7 @@ message SendCoinsRequest { string addr = 1; // The amount in satoshis to send - int64 amount = 2; + int64 amount = 2 [jstype = JS_STRING]; // The target number of blocks that this transaction should be confirmed // by. @@ -965,12 +965,12 @@ message SendCoinsRequest { // A manual fee rate set in sat/vbyte that should be used when crafting the // transaction. - uint64 sat_per_vbyte = 4; + uint64 sat_per_vbyte = 4 [jstype = JS_STRING]; // Deprecated, use sat_per_vbyte. // A manual fee rate set in sat/vbyte that should be used when crafting the // transaction. - int64 sat_per_byte = 5 [deprecated = true]; + int64 sat_per_byte = 5 [deprecated = true, jstype = JS_STRING]; /* If set, then the amount field will be ignored, and lnd will attempt to @@ -1079,7 +1079,7 @@ message ConnectPeerRequest { The connection timeout value (in seconds) for this request. It won't affect other requests. */ - uint64 timeout = 3; + uint64 timeout = 3 [jstype = JS_STRING]; } message ConnectPeerResponse { } @@ -1093,12 +1093,12 @@ message DisconnectPeerResponse { message HTLC { bool incoming = 1; - int64 amount = 2; + int64 amount = 2 [jstype = JS_STRING]; bytes hash_lock = 3; uint32 expiration_height = 4; // Index identifying the htlc on the channel. - uint64 htlc_index = 5; + uint64 htlc_index = 5 [jstype = JS_STRING]; // If this HTLC is involved in a forwarding operation, this field indicates // the forwarding channel. For an outgoing htlc, it is the incoming channel. @@ -1107,10 +1107,10 @@ message HTLC { // forwarding_channel will be zero. The forwarding channel will also be zero // for htlcs that need to be forwarded but don't have a forwarding decision // persisted yet. - uint64 forwarding_channel = 6; + uint64 forwarding_channel = 6 [jstype = JS_STRING]; // Index identifying the htlc on the forwarding channel. - uint64 forwarding_htlc_index = 7; + uint64 forwarding_htlc_index = 7 [jstype = JS_STRING]; } enum CommitmentType { @@ -1149,17 +1149,17 @@ message ChannelConstraints { uint32 csv_delay = 1; // The minimum satoshis this node is required to reserve in its balance. - uint64 chan_reserve_sat = 2; + uint64 chan_reserve_sat = 2 [jstype = JS_STRING]; // The dust limit (in satoshis) of the initiator's commitment tx. - uint64 dust_limit_sat = 3; + uint64 dust_limit_sat = 3 [jstype = JS_STRING]; // The maximum amount of coins in millisatoshis that can be pending in this // channel. - uint64 max_pending_amt_msat = 4; + uint64 max_pending_amt_msat = 4 [jstype = JS_STRING]; // The smallest HTLC in millisatoshis that the initiator will accept. - uint64 min_htlc_msat = 5; + uint64 min_htlc_msat = 5 [jstype = JS_STRING]; // The total number of incoming HTLC's that the initiator will accept. uint32 max_accepted_htlcs = 6; @@ -1187,13 +1187,13 @@ message Channel { uint64 chan_id = 4 [jstype = JS_STRING]; // The total amount of funds held in this channel - int64 capacity = 5; + int64 capacity = 5 [jstype = JS_STRING]; // This node's current balance in this channel - int64 local_balance = 6; + int64 local_balance = 6 [jstype = JS_STRING]; // The counterparty's current balance in this channel - int64 remote_balance = 7; + int64 remote_balance = 7 [jstype = JS_STRING]; /* The amount calculated to be paid in fees for the current set of commitment @@ -1201,35 +1201,35 @@ message Channel { allow the fee amount to be removed and recalculated with each channel state update, including updates that happen after a system restart. */ - int64 commit_fee = 8; + int64 commit_fee = 8 [jstype = JS_STRING]; // The weight of the commitment transaction - int64 commit_weight = 9; + int64 commit_weight = 9 [jstype = JS_STRING]; /* The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open. */ - int64 fee_per_kw = 10; + int64 fee_per_kw = 10 [jstype = JS_STRING]; // The unsettled balance in this channel - int64 unsettled_balance = 11; + int64 unsettled_balance = 11 [jstype = JS_STRING]; /* The total number of satoshis we've sent within this channel. */ - int64 total_satoshis_sent = 12; + int64 total_satoshis_sent = 12 [jstype = JS_STRING]; /* The total number of satoshis we've received within this channel. */ - int64 total_satoshis_received = 13; + int64 total_satoshis_received = 13 [jstype = JS_STRING]; /* The total number of updates conducted within this channel. */ - uint64 num_updates = 14; + uint64 num_updates = 14 [jstype = JS_STRING]; /* The list of active, uncleared HTLCs currently pending within the channel. @@ -1254,13 +1254,13 @@ message Channel { // Deprecated. The minimum satoshis this node is required to reserve in its // balance. - int64 local_chan_reserve_sat = 20 [deprecated = true]; + int64 local_chan_reserve_sat = 20 [deprecated = true, jstype = JS_STRING]; /* Deprecated. The minimum satoshis the other node is required to reserve in its balance. */ - int64 remote_chan_reserve_sat = 21 [deprecated = true]; + int64 remote_chan_reserve_sat = 21 [deprecated = true, jstype = JS_STRING]; // Deprecated. Use commitment_type. bool static_remote_key = 22 [deprecated = true]; @@ -1273,14 +1273,14 @@ message Channel { scoring system. Scores are currently not persisted, so this value may be less than the lifetime of the channel [EXPERIMENTAL]. */ - int64 lifetime = 23; + int64 lifetime = 23 [jstype = JS_STRING]; /* The number of seconds that the remote peer has been observed as being online by the channel scoring system over the lifetime of the channel [EXPERIMENTAL]. */ - int64 uptime = 24; + int64 uptime = 24 [jstype = JS_STRING]; /* Close address is the address that we will enforce payout to on cooperative @@ -1298,7 +1298,7 @@ message Channel { pushed this amount to our peer, if it is false, the remote peer pushed this amount to us. */ - uint64 push_amount_sat = 27; + uint64 push_amount_sat = 27 [jstype = JS_STRING]; /* This uint32 indicates if this channel is to be considered 'frozen'. A @@ -1359,16 +1359,16 @@ message ChannelCloseSummary { string remote_pubkey = 5; // Total capacity of the channel. - int64 capacity = 6; + int64 capacity = 6 [jstype = JS_STRING]; // Height at which the funding transaction was spent. uint32 close_height = 7; // Settled balance at the time of channel closure - int64 settled_balance = 8; + int64 settled_balance = 8 [jstype = JS_STRING]; // The sum of all the time-locked outputs at the time of channel closure - int64 time_locked_balance = 9; + int64 time_locked_balance = 9 [jstype = JS_STRING]; enum ClosureType { COOPERATIVE_CLOSE = 0; @@ -1465,7 +1465,7 @@ message Resolution { OutPoint outpoint = 3; // The amount that was claimed by the resolution. - uint64 amount_sat = 4; + uint64 amount_sat = 4 [jstype = JS_STRING]; // The hex-encoded transaction ID of the sweep transaction that spent the // output. @@ -1493,22 +1493,22 @@ message Peer { string address = 3; // Bytes of data transmitted to this peer - uint64 bytes_sent = 4; + uint64 bytes_sent = 4 [jstype = JS_STRING]; // Bytes of data transmitted from this peer - uint64 bytes_recv = 5; + uint64 bytes_recv = 5 [jstype = JS_STRING]; // Satoshis sent to this peer - int64 sat_sent = 6; + int64 sat_sent = 6 [jstype = JS_STRING]; // Satoshis received from this peer - int64 sat_recv = 7; + int64 sat_recv = 7 [jstype = JS_STRING]; // A channel is inbound if the counterparty initiated the channel bool inbound = 8; // Ping time to this peer - int64 ping_time = 9; + int64 ping_time = 9 [jstype = JS_STRING]; enum SyncType { /* @@ -1559,12 +1559,12 @@ message Peer { The timestamp of the last flap we observed for this peer. If this value is zero, we have not observed any flaps for this peer. */ - int64 last_flap_ns = 14; + int64 last_flap_ns = 14 [jstype = JS_STRING]; } message TimestampedError { // The unix timestamp in seconds when the error occurred. - uint64 timestamp = 1; + uint64 timestamp = 1 [jstype = JS_STRING]; // The string representation of the error sent by our peer. string error = 2; @@ -1635,7 +1635,7 @@ message GetInfoResponse { string block_hash = 8; // Timestamp of the block best known to the wallet - int64 best_header_timestamp = 13; + int64 best_header_timestamp = 13 [jstype = JS_STRING]; // Whether the wallet's view is synced to the main chain bool synced_to_chain = 9; @@ -1721,7 +1721,7 @@ message CloseChannelRequest { // Deprecated, use sat_per_vbyte. // A manual fee rate set in sat/vbyte that should be used when crafting the // closure transaction. - int64 sat_per_byte = 4 [deprecated = true]; + int64 sat_per_byte = 4 [deprecated = true, jstype = JS_STRING]; /* An optional address to send funds to in the case of a cooperative close. @@ -1733,7 +1733,7 @@ message CloseChannelRequest { // A manual fee rate set in sat/vbyte that should be used when crafting the // closure transaction. - uint64 sat_per_vbyte = 6; + uint64 sat_per_vbyte = 6 [jstype = JS_STRING]; } message CloseStatusUpdate { @@ -1759,7 +1759,7 @@ message ReadyForPsbtFunding { The exact amount in satoshis that needs to be sent to the above address to fund the pending channel. */ - int64 funding_amount = 2; + int64 funding_amount = 2 [jstype = JS_STRING]; /* A raw PSBT that contains the pending channel output. If a base PSBT was @@ -1773,7 +1773,7 @@ message ReadyForPsbtFunding { message OpenChannelRequest { // A manual fee rate set in sat/vbyte that should be used when crafting the // funding transaction. - uint64 sat_per_vbyte = 1; + uint64 sat_per_vbyte = 1 [jstype = JS_STRING]; /* The pubkey of the node to open a channel with. When using REST, this field @@ -1788,11 +1788,11 @@ message OpenChannelRequest { string node_pubkey_string = 3 [deprecated = true]; // The number of satoshis the wallet should commit to the channel - int64 local_funding_amount = 4; + int64 local_funding_amount = 4 [jstype = JS_STRING]; // The number of satoshis to push to the remote side as part of the initial // commitment state - int64 push_sat = 5; + int64 push_sat = 5 [jstype = JS_STRING]; // The target number of blocks that the funding transaction should be // confirmed by. @@ -1801,7 +1801,7 @@ message OpenChannelRequest { // Deprecated, use sat_per_vbyte. // A manual fee rate set in sat/vbyte that should be used when crafting the // funding transaction. - int64 sat_per_byte = 7 [deprecated = true]; + int64 sat_per_byte = 7 [deprecated = true, jstype = JS_STRING]; // Whether this channel should be private, not announced to the greater // network. @@ -1809,7 +1809,7 @@ message OpenChannelRequest { // The minimum value in millisatoshi we will require for incoming HTLCs on // the channel. - int64 min_htlc_msat = 9; + int64 min_htlc_msat = 9 [jstype = JS_STRING]; // The delay we require on the remote's commitment transaction. If this is // not set, it will be scaled automatically with the channel size. @@ -1848,7 +1848,7 @@ message OpenChannelRequest { The maximum amount of coins in millisatoshi that can be pending within the channel. It only applies to the remote party. */ - uint64 remote_max_value_in_flight_msat = 15; + uint64 remote_max_value_in_flight_msat = 15 [jstype = JS_STRING]; /* The maximum number of concurrent HTLCs we will allow the remote party to add @@ -1915,7 +1915,7 @@ message ChanPointShim { The size of the pre-crafted output to be used as the channel point for this channel funding. */ - int64 amt = 1; + int64 amt = 1 [jstype = JS_STRING]; // The target channel point to refrence in created commitment transactions. ChannelPoint chan_point = 2; @@ -2058,7 +2058,7 @@ message PendingHTLC { bool incoming = 1; // The total value of the htlc - int64 amount = 2; + int64 amount = 2 [jstype = JS_STRING]; // The final output to be swept back to the user's wallet string outpoint = 3; @@ -2084,20 +2084,20 @@ message PendingChannelsResponse { string remote_node_pub = 1; string channel_point = 2; - int64 capacity = 3; + int64 capacity = 3 [jstype = JS_STRING]; - int64 local_balance = 4; - int64 remote_balance = 5; + int64 local_balance = 4 [jstype = JS_STRING]; + int64 remote_balance = 5 [jstype = JS_STRING]; // The minimum satoshis this node is required to reserve in its // balance. - int64 local_chan_reserve_sat = 6; + int64 local_chan_reserve_sat = 6 [jstype = JS_STRING]; /* The minimum satoshis the other node is required to reserve in its balance. */ - int64 remote_chan_reserve_sat = 7; + int64 remote_chan_reserve_sat = 7 [jstype = JS_STRING]; // The party that initiated opening the channel. Initiator initiator = 8; @@ -2120,17 +2120,17 @@ message PendingChannelsResponse { each channel state update, including updates that happen after a system restart. */ - int64 commit_fee = 4; + int64 commit_fee = 4 [jstype = JS_STRING]; // The weight of the commitment transaction - int64 commit_weight = 5; + int64 commit_weight = 5 [jstype = JS_STRING]; /* The required number of satoshis per kilo-weight that the requester will pay at all times, for both the funding transaction and commitment transaction. This value can later be updated once the channel is open. */ - int64 fee_per_kw = 6; + int64 fee_per_kw = 6 [jstype = JS_STRING]; } message WaitingCloseChannel { @@ -2138,7 +2138,7 @@ message PendingChannelsResponse { PendingChannel channel = 1; // The balance in satoshis encumbered in this channel - int64 limbo_balance = 2; + int64 limbo_balance = 2 [jstype = JS_STRING]; /* A list of valid commitment transactions. Any of these can confirm at @@ -2161,19 +2161,19 @@ message PendingChannelsResponse { The amount in satoshis calculated to be paid in fees for the local commitment. */ - uint64 local_commit_fee_sat = 4; + uint64 local_commit_fee_sat = 4 [jstype = JS_STRING]; /* The amount in satoshis calculated to be paid in fees for the remote commitment. */ - uint64 remote_commit_fee_sat = 5; + uint64 remote_commit_fee_sat = 5 [jstype = JS_STRING]; /* The amount in satoshis calculated to be paid in fees for the remote pending commitment. */ - uint64 remote_pending_commit_fee_sat = 6; + uint64 remote_pending_commit_fee_sat = 6 [jstype = JS_STRING]; } message ClosedChannel { @@ -2192,7 +2192,7 @@ message PendingChannelsResponse { string closing_txid = 2; // The balance in satoshis encumbered in this pending channel - int64 limbo_balance = 3; + int64 limbo_balance = 3 [jstype = JS_STRING]; // The height at which funds can be swept into the wallet uint32 maturity_height = 4; @@ -2205,7 +2205,7 @@ message PendingChannelsResponse { int32 blocks_til_maturity = 5; // The total value of funds successfully recovered from this channel - int64 recovered_balance = 6; + int64 recovered_balance = 6 [jstype = JS_STRING]; repeated PendingHTLC pending_htlcs = 8; @@ -2219,7 +2219,7 @@ message PendingChannelsResponse { } // The balance in satoshis encumbered in pending channels - int64 total_limbo_balance = 1; + int64 total_limbo_balance = 1 [jstype = JS_STRING]; // Channels pending opening repeated PendingOpenChannel pending_open_channels = 2; @@ -2263,10 +2263,10 @@ message ChannelEventUpdate { message WalletAccountBalance { // The confirmed balance of the account (with >= 1 confirmations). - int64 confirmed_balance = 1; + int64 confirmed_balance = 1 [jstype = JS_STRING]; // The unconfirmed balance of the account (with 0 confirmations). - int64 unconfirmed_balance = 2; + int64 unconfirmed_balance = 2 [jstype = JS_STRING]; } message WalletBalanceRequest { @@ -2274,13 +2274,13 @@ message WalletBalanceRequest { message WalletBalanceResponse { // The balance of the wallet - int64 total_balance = 1; + int64 total_balance = 1 [jstype = JS_STRING]; // The confirmed balance of a wallet(with >= 1 confirmations) - int64 confirmed_balance = 2; + int64 confirmed_balance = 2 [jstype = JS_STRING]; // The unconfirmed balance of a wallet(with 0 confirmations) - int64 unconfirmed_balance = 3; + int64 unconfirmed_balance = 3 [jstype = JS_STRING]; // A mapping of each wallet account's name to its balance. map account_balance = 4; @@ -2288,20 +2288,20 @@ message WalletBalanceResponse { message Amount { // Value denominated in satoshis. - uint64 sat = 1; + uint64 sat = 1 [jstype = JS_STRING]; // Value denominated in milli-satoshis. - uint64 msat = 2; + uint64 msat = 2 [jstype = JS_STRING]; } message ChannelBalanceRequest { } message ChannelBalanceResponse { // Deprecated. Sum of channels balances denominated in satoshis - int64 balance = 1 [deprecated = true]; + int64 balance = 1 [deprecated = true, jstype = JS_STRING]; // Deprecated. Sum of channels pending balances denominated in satoshis - int64 pending_open_balance = 2 [deprecated = true]; + int64 pending_open_balance = 2 [deprecated = true, jstype = JS_STRING]; // Sum of channels local balances. Amount local_balance = 3; @@ -2331,14 +2331,14 @@ message QueryRoutesRequest { The fields amt and amt_msat are mutually exclusive. */ - int64 amt = 2; + int64 amt = 2 [jstype = JS_STRING]; /* The amount to send expressed in millisatoshis. The fields amt and amt_msat are mutually exclusive. */ - int64 amt_msat = 12; + int64 amt_msat = 12 [jstype = JS_STRING]; reserved 3; @@ -2478,12 +2478,12 @@ message Hop { output index for the channel. */ uint64 chan_id = 1 [jstype = JS_STRING]; - int64 chan_capacity = 2 [deprecated = true]; - int64 amt_to_forward = 3 [deprecated = true]; - int64 fee = 4 [deprecated = true]; + int64 chan_capacity = 2 [deprecated = true, jstype = JS_STRING]; + int64 amt_to_forward = 3 [deprecated = true, jstype = JS_STRING]; + int64 fee = 4 [deprecated = true, jstype = JS_STRING]; uint32 expiry = 5; - int64 amt_to_forward_msat = 6; - int64 fee_msat = 7; + int64 amt_to_forward_msat = 6 [jstype = JS_STRING]; + int64 fee_msat = 7 [jstype = JS_STRING]; /* An optional public key of the hop. If the public key is given, the payment @@ -2539,7 +2539,7 @@ message MPPRecord { and payment_hash sum exactly to total_amt_msat. The same total_amt_msat must be used on all subpayments. */ - int64 total_amt_msat = 10; + int64 total_amt_msat = 10 [jstype = JS_STRING]; } message AMPRecord { @@ -2571,7 +2571,7 @@ message Route { of a one-hop payment, this value will be zero as we don't need to pay a fee to ourselves. */ - int64 total_fees = 2 [deprecated = true]; + int64 total_fees = 2 [deprecated = true, jstype = JS_STRING]; /* The total amount of funds required to complete a payment over this route. @@ -2580,7 +2580,7 @@ message Route { satoshis, otherwise the route will fail at an intermediate node due to an insufficient amount of fees. */ - int64 total_amt = 3 [deprecated = true]; + int64 total_amt = 3 [deprecated = true, jstype = JS_STRING]; /* Contains details concerning the specific forwarding details at each hop. @@ -2590,12 +2590,12 @@ message Route { /* The total fees in millisatoshis. */ - int64 total_fees_msat = 5; + int64 total_fees_msat = 5 [jstype = JS_STRING]; /* The total amount in millisatoshis. */ - int64 total_amt_msat = 6; + int64 total_amt_msat = 6 [jstype = JS_STRING]; } message NodeInfoRequest { @@ -2619,7 +2619,7 @@ message NodeInfo { uint32 num_channels = 2; // The sum of all channels capacity for the node, denominated in satoshis. - int64 total_capacity = 3; + int64 total_capacity = 3 [jstype = JS_STRING]; // A list of all public channels for the node. repeated ChannelEdge channels = 4; @@ -2647,11 +2647,11 @@ message NodeAddress { message RoutingPolicy { uint32 time_lock_delta = 1; - int64 min_htlc = 2; - int64 fee_base_msat = 3; - int64 fee_rate_milli_msat = 4; + int64 min_htlc = 2 [jstype = JS_STRING]; + int64 fee_base_msat = 3 [jstype = JS_STRING]; + int64 fee_rate_milli_msat = 4 [jstype = JS_STRING]; bool disabled = 5; - uint64 max_htlc_msat = 6; + uint64 max_htlc_msat = 6 [jstype = JS_STRING]; uint32 last_update = 7; } @@ -2676,7 +2676,7 @@ message ChannelEdge { string node1_pub = 4; string node2_pub = 5; - int64 capacity = 6; + int64 capacity = 6 [jstype = JS_STRING]; RoutingPolicy node1_policy = 7; RoutingPolicy node2_policy = 8; @@ -2748,15 +2748,15 @@ message NetworkInfo { uint32 num_nodes = 4; uint32 num_channels = 5; - int64 total_network_capacity = 6; + int64 total_network_capacity = 6 [jstype = JS_STRING]; double avg_channel_size = 7; - int64 min_channel_size = 8; - int64 max_channel_size = 9; - int64 median_channel_size_sat = 10; + int64 min_channel_size = 8 [jstype = JS_STRING]; + int64 max_channel_size = 9 [jstype = JS_STRING]; + int64 median_channel_size_sat = 10 [jstype = JS_STRING]; // The number of edges marked as zombies. - uint64 num_zombie_chans = 11; + uint64 num_zombie_chans = 11 [jstype = JS_STRING]; // TODO(roasbeef): fee rate info, expiry // * also additional RPC for tracking fee info once in @@ -2807,7 +2807,7 @@ message ChannelEdgeUpdate { ChannelPoint chan_point = 2; - int64 capacity = 3; + int64 capacity = 3 [jstype = JS_STRING]; RoutingPolicy routing_policy = 4; @@ -2821,7 +2821,7 @@ message ClosedChannelUpdate { output index for the channel. */ uint64 chan_id = 1 [jstype = JS_STRING]; - int64 capacity = 2; + int64 capacity = 2 [jstype = JS_STRING]; uint32 closed_height = 3; ChannelPoint chan_point = 4; } @@ -2883,23 +2883,23 @@ message Invoice { The fields value and value_msat are mutually exclusive. */ - int64 value = 5; + int64 value = 5 [jstype = JS_STRING]; /* The value of this invoice in millisatoshis The fields value and value_msat are mutually exclusive. */ - int64 value_msat = 23; + int64 value_msat = 23 [jstype = JS_STRING]; // Whether this invoice has been fulfilled bool settled = 6 [deprecated = true]; // When this invoice was created - int64 creation_date = 7; + int64 creation_date = 7 [jstype = JS_STRING]; // When this invoice was settled - int64 settle_date = 8; + int64 settle_date = 8 [jstype = JS_STRING]; /* A bare-bones invoice for a payment within the Lightning Network. With the @@ -2917,13 +2917,13 @@ message Invoice { bytes description_hash = 10; // Payment request expiry time in seconds. Default is 3600 (1 hour). - int64 expiry = 11; + int64 expiry = 11 [jstype = JS_STRING]; // Fallback on-chain address. string fallback_addr = 12; // Delta to use for the time-lock of the CLTV extended to the final hop. - uint64 cltv_expiry = 13; + uint64 cltv_expiry = 13 [jstype = JS_STRING]; /* Route hints that can each be individually used to assist in reaching the @@ -2940,7 +2940,7 @@ message Invoice { SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one. */ - uint64 add_index = 16; + uint64 add_index = 16 [jstype = JS_STRING]; /* The "settle" index of this invoice. Each newly settled invoice will @@ -2948,10 +2948,10 @@ message Invoice { SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one. */ - uint64 settle_index = 17; + uint64 settle_index = 17 [jstype = JS_STRING]; // Deprecated, use amt_paid_sat or amt_paid_msat. - int64 amt_paid = 18 [deprecated = true]; + int64 amt_paid = 18 [deprecated = true, jstype = JS_STRING]; /* The amount that was accepted for this invoice, in satoshis. This will ONLY @@ -2961,7 +2961,7 @@ message Invoice { MORE that was specified in the original invoice. So we'll record that here as well. */ - int64 amt_paid_sat = 19; + int64 amt_paid_sat = 19 [jstype = JS_STRING]; /* The amount that was accepted for this invoice, in millisatoshis. This will @@ -2971,7 +2971,7 @@ message Invoice { paid MORE that was specified in the original invoice. So we'll record that here as well. */ - int64 amt_paid_msat = 20; + int64 amt_paid_msat = 20 [jstype = JS_STRING]; enum InvoiceState { OPEN = 0; @@ -3022,19 +3022,19 @@ message InvoiceHTLC { uint64 chan_id = 1 [jstype = JS_STRING]; // Index identifying the htlc on the channel. - uint64 htlc_index = 2; + uint64 htlc_index = 2 [jstype = JS_STRING]; // The amount of the htlc in msat. - uint64 amt_msat = 3; + uint64 amt_msat = 3 [jstype = JS_STRING]; // Block height at which this htlc was accepted. int32 accept_height = 4; // Time at which this htlc was accepted. - int64 accept_time = 5; + int64 accept_time = 5 [jstype = JS_STRING]; // Time at which this htlc was settled or canceled. - int64 resolve_time = 6; + int64 resolve_time = 6 [jstype = JS_STRING]; // Block height at which this htlc expires. int32 expiry_height = 7; @@ -3046,7 +3046,7 @@ message InvoiceHTLC { map custom_records = 9; // The total amount of the mpp payment in msat. - uint64 mpp_total_amt_msat = 10; + uint64 mpp_total_amt_msat = 10 [jstype = JS_STRING]; // Details relevant to AMP HTLCs, only populated if this is an AMP HTLC. AMP amp = 11; @@ -3090,7 +3090,7 @@ message AddInvoiceResponse { SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one. */ - uint64 add_index = 16; + uint64 add_index = 16 [jstype = JS_STRING]; /* The payment address of the generated invoice. This value should be used @@ -3126,10 +3126,10 @@ message ListInvoiceRequest { The index of an invoice that will be used as either the start or end of a query to determine which invoices should be returned in the response. */ - uint64 index_offset = 4; + uint64 index_offset = 4 [jstype = JS_STRING]; // The max number of invoices to return in the response to this query. - uint64 num_max_invoices = 5; + uint64 num_max_invoices = 5 [jstype = JS_STRING]; /* If set, the invoices returned will result from seeking backwards from the @@ -3148,13 +3148,13 @@ message ListInvoiceResponse { The index of the last item in the set of returned invoices. This can be used to seek further, pagination style. */ - uint64 last_index_offset = 2; + uint64 last_index_offset = 2 [jstype = JS_STRING]; /* The index of the last item in the set of returned invoices. This can be used to seek backwards, pagination style. */ - uint64 first_index_offset = 3; + uint64 first_index_offset = 3 [jstype = JS_STRING]; } message InvoiceSubscription { @@ -3164,7 +3164,7 @@ message InvoiceSubscription { value. This allows callers to catch up on any events they missed while they weren't connected to the streaming RPC. */ - uint64 add_index = 1; + uint64 add_index = 1 [jstype = JS_STRING]; /* If specified (non-zero), then we'll first start by sending out @@ -3172,7 +3172,7 @@ message InvoiceSubscription { this value. This allows callers to catch up on any events they missed while they weren't connected to the streaming RPC. */ - uint64 settle_index = 2; + uint64 settle_index = 2 [jstype = JS_STRING]; } enum PaymentFailureReason { @@ -3214,24 +3214,24 @@ message Payment { string payment_hash = 1; // Deprecated, use value_sat or value_msat. - int64 value = 2 [deprecated = true]; + int64 value = 2 [deprecated = true, jstype = JS_STRING]; // Deprecated, use creation_time_ns - int64 creation_date = 3 [deprecated = true]; + int64 creation_date = 3 [deprecated = true, jstype = JS_STRING]; reserved 4; // Deprecated, use fee_sat or fee_msat. - int64 fee = 5 [deprecated = true]; + int64 fee = 5 [deprecated = true, jstype = JS_STRING]; // The payment preimage string payment_preimage = 6; // The value of the payment in satoshis - int64 value_sat = 7; + int64 value_sat = 7 [jstype = JS_STRING]; // The value of the payment in milli-satoshis - int64 value_msat = 8; + int64 value_msat = 8 [jstype = JS_STRING]; // The optional payment request being fulfilled. string payment_request = 9; @@ -3247,13 +3247,13 @@ message Payment { PaymentStatus status = 10; // The fee paid for this payment in satoshis - int64 fee_sat = 11; + int64 fee_sat = 11 [jstype = JS_STRING]; // The fee paid for this payment in milli-satoshis - int64 fee_msat = 12; + int64 fee_msat = 12 [jstype = JS_STRING]; // The time in UNIX nanoseconds at which the payment was created. - int64 creation_time_ns = 13; + int64 creation_time_ns = 13 [jstype = JS_STRING]; // The HTLCs made in attempt to settle the payment. repeated HTLCAttempt htlcs = 14; @@ -3263,14 +3263,14 @@ message Payment { by this index, which may not strictly increment by 1 for payments made in older versions of lnd. */ - uint64 payment_index = 15; + uint64 payment_index = 15 [jstype = JS_STRING]; PaymentFailureReason failure_reason = 16; } message HTLCAttempt { // The unique ID that is used for this attempt. - uint64 attempt_id = 7; + uint64 attempt_id = 7 [jstype = JS_STRING]; enum HTLCStatus { IN_FLIGHT = 0; @@ -3285,13 +3285,13 @@ message HTLCAttempt { Route route = 2; // The time in UNIX nanoseconds at which this HTLC was sent. - int64 attempt_time_ns = 3; + int64 attempt_time_ns = 3 [jstype = JS_STRING]; /* The time in UNIX nanoseconds at which this HTLC was settled or failed. This value will not be set if the HTLC is still IN_FLIGHT. */ - int64 resolve_time_ns = 4; + int64 resolve_time_ns = 4 [jstype = JS_STRING]; // Detailed htlc failure info. Failure failure = 5; @@ -3316,10 +3316,10 @@ message ListPaymentsRequest { will start with the oldest payment when paginating forwards, or will end with the most recent payment when paginating backwards. */ - uint64 index_offset = 2; + uint64 index_offset = 2 [jstype = JS_STRING]; // The maximal number of payments returned in the response to this query. - uint64 max_payments = 3; + uint64 max_payments = 3 [jstype = JS_STRING]; /* If set, the payments returned will result from seeking backwards from the @@ -3337,13 +3337,13 @@ message ListPaymentsResponse { The index of the first item in the set of returned payments. This can be used as the index_offset to continue seeking backwards in the next request. */ - uint64 first_index_offset = 2; + uint64 first_index_offset = 2 [jstype = JS_STRING]; /* The index of the last item in the set of returned payments. This can be used as the index_offset to continue seeking forwards in the next request. */ - uint64 last_index_offset = 3; + uint64 last_index_offset = 3 [jstype = JS_STRING]; } message DeleteAllPaymentsRequest { @@ -3383,16 +3383,16 @@ message PayReqString { message PayReq { string destination = 1; string payment_hash = 2; - int64 num_satoshis = 3; - int64 timestamp = 4; - int64 expiry = 5; + int64 num_satoshis = 3 [jstype = JS_STRING]; + int64 timestamp = 4 [jstype = JS_STRING]; + int64 expiry = 5 [jstype = JS_STRING]; string description = 6; string description_hash = 7; string fallback_addr = 8; - int64 cltv_expiry = 9; + int64 cltv_expiry = 9 [jstype = JS_STRING]; repeated RouteHint route_hints = 10; bytes payment_addr = 11; - int64 num_msat = 12; + int64 num_msat = 12 [jstype = JS_STRING]; map features = 13; } @@ -3440,11 +3440,11 @@ message ChannelFeeReport { string channel_point = 1; // The base fee charged regardless of the number of milli-satoshis sent. - int64 base_fee_msat = 2; + int64 base_fee_msat = 2 [jstype = JS_STRING]; // The amount charged per milli-satoshis transferred expressed in // millionths of a satoshi. - int64 fee_per_mil = 3; + int64 fee_per_mil = 3 [jstype = JS_STRING]; // The effective fee rate in milli-satoshis. Computed by dividing the // fee_per_mil value by 1 million. @@ -3457,15 +3457,15 @@ message FeeReportResponse { // The total amount of fee revenue (in satoshis) the switch has collected // over the past 24 hrs. - uint64 day_fee_sum = 2; + uint64 day_fee_sum = 2 [jstype = JS_STRING]; // The total amount of fee revenue (in satoshis) the switch has collected // over the past 1 week. - uint64 week_fee_sum = 3; + uint64 week_fee_sum = 3 [jstype = JS_STRING]; // The total amount of fee revenue (in satoshis) the switch has collected // over the past 1 month. - uint64 month_fee_sum = 4; + uint64 month_fee_sum = 4 [jstype = JS_STRING]; } message PolicyUpdateRequest { @@ -3478,7 +3478,7 @@ message PolicyUpdateRequest { } // The base fee charged regardless of the number of milli-satoshis sent. - int64 base_fee_msat = 3; + int64 base_fee_msat = 3 [jstype = JS_STRING]; // The effective fee rate in milli-satoshis. The precision of this value // goes up to 6 decimal places, so 1e-6. @@ -3489,11 +3489,11 @@ message PolicyUpdateRequest { // If set, the maximum HTLC size in milli-satoshis. If unset, the maximum // HTLC will be unchanged. - uint64 max_htlc_msat = 6; + uint64 max_htlc_msat = 6 [jstype = JS_STRING]; // The minimum HTLC size in milli-satoshis. Only applied if // min_htlc_msat_specified is true. - uint64 min_htlc_msat = 7; + uint64 min_htlc_msat = 7 [jstype = JS_STRING]; // If true, min_htlc_msat is applied. bool min_htlc_msat_specified = 8; @@ -3505,12 +3505,12 @@ message ForwardingHistoryRequest { // Start time is the starting point of the forwarding history request. All // records beyond this point will be included, respecting the end time, and // the index offset. - uint64 start_time = 1; + uint64 start_time = 1 [jstype = JS_STRING]; // End time is the end point of the forwarding history request. The // response will carry at most 50k records between the start time and the // end time. The index offset can be used to implement pagination. - uint64 end_time = 2; + uint64 end_time = 2 [jstype = JS_STRING]; // Index offset is the offset in the time series to start at. As each // response can only contain 50k records, callers can use this to skip @@ -3523,7 +3523,7 @@ message ForwardingHistoryRequest { message ForwardingEvent { // Timestamp is the time (unix epoch offset) that this circuit was // completed. Deprecated by timestamp_ns. - uint64 timestamp = 1 [deprecated = true]; + uint64 timestamp = 1 [deprecated = true, jstype = JS_STRING]; // The incoming channel ID that carried the HTLC that created the circuit. uint64 chan_id_in = 2 [jstype = JS_STRING]; @@ -3534,29 +3534,29 @@ message ForwardingEvent { // The total amount (in satoshis) of the incoming HTLC that created half // the circuit. - uint64 amt_in = 5; + uint64 amt_in = 5 [jstype = JS_STRING]; // The total amount (in satoshis) of the outgoing HTLC that created the // second half of the circuit. - uint64 amt_out = 6; + uint64 amt_out = 6 [jstype = JS_STRING]; // The total fee (in satoshis) that this payment circuit carried. - uint64 fee = 7; + uint64 fee = 7 [jstype = JS_STRING]; // The total fee (in milli-satoshis) that this payment circuit carried. - uint64 fee_msat = 8; + uint64 fee_msat = 8 [jstype = JS_STRING]; // The total amount (in milli-satoshis) of the incoming HTLC that created // half the circuit. - uint64 amt_in_msat = 9; + uint64 amt_in_msat = 9 [jstype = JS_STRING]; // The total amount (in milli-satoshis) of the outgoing HTLC that created // the second half of the circuit. - uint64 amt_out_msat = 10; + uint64 amt_out_msat = 10 [jstype = JS_STRING]; // The number of nanoseconds elapsed since January 1, 1970 UTC when this // circuit was completed. - uint64 timestamp_ns = 11; + uint64 timestamp_ns = 11 [jstype = JS_STRING]; // TODO(roasbeef): add settlement latency? // * use FPE on the chan id? @@ -3665,7 +3665,7 @@ message BakeMacaroonRequest { repeated MacaroonPermission permissions = 1; // The root key ID used to create the macaroon, must be a positive integer. - uint64 root_key_id = 2; + uint64 root_key_id = 2 [jstype = JS_STRING]; } message BakeMacaroonResponse { // The hex encoded macaroon, serialized in binary format. @@ -3676,12 +3676,12 @@ message ListMacaroonIDsRequest { } message ListMacaroonIDsResponse { // The list of root key IDs that are in use. - repeated uint64 root_key_ids = 1; + repeated uint64 root_key_ids = 1 [jstype = JS_STRING]; } message DeleteMacaroonIDRequest { // The root key ID to be removed. - uint64 root_key_id = 1; + uint64 root_key_id = 1 [jstype = JS_STRING]; } message DeleteMacaroonIDResponse { // A boolean indicates that the deletion is successful. @@ -3763,7 +3763,7 @@ message Failure { ChannelUpdate channel_update = 3; // A failure type-dependent htlc value. - uint64 htlc_msat = 4; + uint64 htlc_msat = 4 [jstype = JS_STRING]; // The sha256 sum of the onion payload. bytes onion_sha_256 = 5; @@ -3838,7 +3838,7 @@ message ChannelUpdate { /* The minimum HTLC value which will be accepted. */ - uint64 htlc_minimum_msat = 7; + uint64 htlc_minimum_msat = 7 [jstype = JS_STRING]; /* The base fee that must be used for incoming HTLC's to this particular @@ -3855,7 +3855,7 @@ message ChannelUpdate { /* The maximum HTLC value which will be accepted. */ - uint64 htlc_maximum_msat = 11; + uint64 htlc_maximum_msat = 11 [jstype = JS_STRING]; /* The set of data that was appended to this message, some of which we may diff --git a/proto/loop.proto b/proto/loop.proto index 1c2f63bf..077112f0 100644 --- a/proto/loop.proto +++ b/proto/loop.proto @@ -146,7 +146,7 @@ message LoopOutRequest { /* Requested swap amount in sat. This does not include the swap and miner fee. */ - int64 amt = 1; + int64 amt = 1 [jstype = JS_STRING]; /* Base58 encoded destination address for the swap. @@ -158,14 +158,14 @@ message LoopOutRequest { This limit is applied during path finding. Typically this value is taken from the response of the GetQuote call. */ - int64 max_swap_routing_fee = 3; + int64 max_swap_routing_fee = 3 [jstype = JS_STRING]; /* Maximum off-chain fee in sat that may be paid for the prepay to the server. This limit is applied during path finding. Typically this value is taken from the response of the GetQuote call. */ - int64 max_prepay_routing_fee = 4; + int64 max_prepay_routing_fee = 4 [jstype = JS_STRING]; /* Maximum we are willing to pay the server for the swap. This value is not @@ -173,12 +173,12 @@ message LoopOutRequest { higher fee, we abort the swap. Typically this value is taken from the response of the GetQuote call. It includes the prepay amount. */ - int64 max_swap_fee = 5; + int64 max_swap_fee = 5 [jstype = JS_STRING]; /* Maximum amount of the swap fee that may be charged as a prepayment. */ - int64 max_prepay_amt = 6; + int64 max_prepay_amt = 6 [jstype = JS_STRING]; /* Maximum in on-chain fees that we are willing to spend. If we want to @@ -196,21 +196,21 @@ message LoopOutRequest { max_miner_fee is typically taken from the response of the GetQuote call. */ - int64 max_miner_fee = 7; + int64 max_miner_fee = 7 [jstype = JS_STRING]; /* Deprecated, use outgoing_chan_set. The channel to loop out, the channel to loop out is selected based on the lowest routing fee for the swap payment to the server. */ - uint64 loop_out_channel = 8 [deprecated = true]; + uint64 loop_out_channel = 8 [deprecated = true, jstype = JS_STRING]; /* A restriction on the channel set that may be used to loop out. The actual channel(s) that will be used are selected based on the lowest routing fee for the swap payment to the server. */ - repeated uint64 outgoing_chan_set = 11; + repeated uint64 outgoing_chan_set = 11 [jstype = JS_STRING]; /* The number of blocks from the on-chain HTLC's confirmation height that it @@ -231,7 +231,7 @@ message LoopOutRequest { low-fee periods before publishing the HTLC, potentially resulting in a lower total swap fee. */ - uint64 swap_publication_deadline = 10; + uint64 swap_publication_deadline = 10 [jstype = JS_STRING]; /* An optional label for this swap. This field is limited to 500 characters @@ -255,7 +255,7 @@ message LoopInRequest { Requested swap amount in sat. This does not include the swap and miner fee. */ - int64 amt = 1; + int64 amt = 1 [jstype = JS_STRING]; /* Maximum we are willing to pay the server for the swap. This value is not @@ -263,7 +263,7 @@ message LoopInRequest { higher fee, we abort the swap. Typically this value is taken from the response of the GetQuote call. */ - int64 max_swap_fee = 2; + int64 max_swap_fee = 2 [jstype = JS_STRING]; /* Maximum in on-chain fees that we are willing to spend. If we want to @@ -272,7 +272,7 @@ message LoopInRequest { max_miner_fee is typically taken from the response of the GetQuote call. */ - int64 max_miner_fee = 3; + int64 max_miner_fee = 3 [jstype = JS_STRING]; /* The last hop to use for the loop in swap. If empty, the last hop is selected @@ -358,7 +358,7 @@ message SwapStatus { Requested swap amount in sat. This does not include the swap and miner fee. */ - int64 amt = 1; + int64 amt = 1 [jstype = JS_STRING]; /* Swap identifier to track status in the update stream that is returned from @@ -392,12 +392,12 @@ message SwapStatus { /* Initiation time of the swap. */ - int64 initiation_time = 5; + int64 initiation_time = 5 [jstype = JS_STRING]; /* Initiation time of the swap. */ - int64 last_update_time = 6; + int64 last_update_time = 6 [jstype = JS_STRING]; /* DEPRECATED: This field stores the address of the onchain htlc. @@ -417,13 +417,13 @@ message SwapStatus { string htlc_address_np2wsh = 13; // Swap server cost - int64 cost_server = 8; + int64 cost_server = 8 [jstype = JS_STRING]; // On-chain transaction cost - int64 cost_onchain = 9; + int64 cost_onchain = 9 [jstype = JS_STRING]; // Off-chain routing fees - int64 cost_offchain = 10; + int64 cost_offchain = 10 [jstype = JS_STRING]; // An optional label given to the swap on creation. string label = 15; @@ -554,12 +554,12 @@ message InTermsResponse { /* Minimum swap amount (sat) */ - int64 min_swap_amount = 5; + int64 min_swap_amount = 5 [jstype = JS_STRING]; /* Maximum swap amount (sat) */ - int64 max_swap_amount = 6; + int64 max_swap_amount = 6 [jstype = JS_STRING]; } message OutTermsResponse { @@ -569,12 +569,12 @@ message OutTermsResponse { /* Minimum swap amount (sat) */ - int64 min_swap_amount = 5; + int64 min_swap_amount = 5 [jstype = JS_STRING]; /* Maximum swap amount (sat) */ - int64 max_swap_amount = 6; + int64 max_swap_amount = 6 [jstype = JS_STRING]; // The minimally accepted cltv delta of the on-chain htlc. int32 min_cltv_delta = 8; @@ -587,7 +587,7 @@ message QuoteRequest { /* The amount to swap in satoshis. */ - int64 amt = 1; + int64 amt = 1 [jstype = JS_STRING]; /* The confirmation target that should be used either for the sweep of the @@ -610,7 +610,7 @@ message QuoteRequest { low-fee periods before publishing the HTLC, potentially resulting in a lower total swap fee. This only has an effect on loop out quotes. */ - uint64 swap_publication_deadline = 4; + uint64 swap_publication_deadline = 4 [jstype = JS_STRING]; } message InQuoteResponse { @@ -619,7 +619,7 @@ message InQuoteResponse { /* The fee that the swap server is charging for the swap. */ - int64 swap_fee_sat = 1; + int64 swap_fee_sat = 1 [jstype = JS_STRING]; /* An estimate of the on-chain fee that needs to be paid to publish the HTLC @@ -629,7 +629,7 @@ message InQuoteResponse { create a sample estimation transaction because not enough funds are available. An information message should be shown to the user in this case. */ - int64 htlc_publish_fee_sat = 3; + int64 htlc_publish_fee_sat = 3 [jstype = JS_STRING]; /* On-chain cltv expiry delta @@ -646,18 +646,18 @@ message OutQuoteResponse { /* The fee that the swap server is charging for the swap. */ - int64 swap_fee_sat = 1; + int64 swap_fee_sat = 1 [jstype = JS_STRING]; /* The part of the swap fee that is requested as a prepayment. */ - int64 prepay_amt_sat = 2; + int64 prepay_amt_sat = 2 [jstype = JS_STRING]; /* An estimate of the on-chain fee that needs to be paid to sweep the HTLC for a loop out. */ - int64 htlc_sweep_fee_sat = 3; + int64 htlc_sweep_fee_sat = 3 [jstype = JS_STRING]; /* The node pubkey where the swap payment needs to be paid @@ -707,17 +707,17 @@ message LsatToken { /* The amount of millisatoshis that was paid to get the token. */ - int64 amount_paid_msat = 4; + int64 amount_paid_msat = 4 [jstype = JS_STRING]; /* The amount of millisatoshis paid in routing fee to pay for the token. */ - int64 routing_fee_paid_msat = 5; + int64 routing_fee_paid_msat = 5 [jstype = JS_STRING]; /* The creation time of the token as UNIX timestamp in seconds. */ - int64 time_created = 6; + int64 time_created = 6 [jstype = JS_STRING]; /* Indicates whether the token is expired or still valid. @@ -746,37 +746,37 @@ message LiquidityParameters { conjunction with sweep fee rate, swap fee ppm, routing fee ppm, prepay routing, max prepay and max miner fee. */ - uint64 fee_ppm = 16; + uint64 fee_ppm = 16 [jstype = JS_STRING]; /* The limit we place on our estimated sweep cost for a swap in sat/vByte. If the estimated fee for our sweep transaction within the specified confirmation target is above this value, we will not suggest any swaps. */ - uint64 sweep_fee_rate_sat_per_vbyte = 2; + uint64 sweep_fee_rate_sat_per_vbyte = 2 [jstype = JS_STRING]; /* The maximum fee paid to the server for facilitating the swap, expressed as parts per million of the swap volume. */ - uint64 max_swap_fee_ppm = 3; + uint64 max_swap_fee_ppm = 3 [jstype = JS_STRING]; /* The maximum fee paid to route the swap invoice off chain, expressed as parts per million of the volume being routed. */ - uint64 max_routing_fee_ppm = 4; + uint64 max_routing_fee_ppm = 4 [jstype = JS_STRING]; /* The maximum fee paid to route the prepay invoice off chain, expressed as parts per million of the volume being routed. */ - uint64 max_prepay_routing_fee_ppm = 5; + uint64 max_prepay_routing_fee_ppm = 5 [jstype = JS_STRING]; /* The maximum no-show penalty in satoshis paid for a swap. */ - uint64 max_prepay_sat = 6; + uint64 max_prepay_sat = 6 [jstype = JS_STRING]; /* The maximum miner fee we will pay to sweep the swap on chain. Note that we @@ -785,7 +785,7 @@ message LiquidityParameters { this value is only a cap placed on the amount we spend on fees in the case where the swap needs to be claimed on chain, but fees have suddenly spiked. */ - uint64 max_miner_fee_sat = 7; + uint64 max_miner_fee_sat = 7 [jstype = JS_STRING]; /* The number of blocks from the on-chain HTLC's confirmation height that it @@ -798,7 +798,7 @@ message LiquidityParameters { swap due to off chain payment failure until it will be considered for swap suggestions again, expressed in seconds. */ - uint64 failure_backoff_sec = 9; + uint64 failure_backoff_sec = 9 [jstype = JS_STRING]; /* Set to true to enable automatic dispatch of swaps. All swaps will be limited @@ -811,7 +811,7 @@ message LiquidityParameters { The total budget for automatically dispatched swaps since the budget start time, expressed in satoshis. */ - uint64 autoloop_budget_sat = 11; + uint64 autoloop_budget_sat = 11 [jstype = JS_STRING]; /* The start time for autoloop budget, expressed as a unix timestamp in @@ -819,27 +819,27 @@ message LiquidityParameters { automatically dispatched swaps. Swaps that were completed before this date will not be included in budget calculations. */ - uint64 autoloop_budget_start_sec = 12; + uint64 autoloop_budget_start_sec = 12 [jstype = JS_STRING]; /* The maximum number of automatically dispatched swaps that we allow to be in flight at any point in time. */ - uint64 auto_max_in_flight = 13; + uint64 auto_max_in_flight = 13 [jstype = JS_STRING]; /* The minimum amount, expressed in satoshis, that the autoloop client will dispatch a swap for. This value is subject to the server-side limits specified by the LoopOutTerms endpoint. */ - uint64 min_swap_amount = 14; + uint64 min_swap_amount = 14 [jstype = JS_STRING]; /* The maximum amount, expressed in satoshis, that the autoloop client will dispatch a swap for. This value is subject to the server-side limits specified by the LoopOutTerms endpoint. */ - uint64 max_swap_amount = 15; + uint64 max_swap_amount = 15 [jstype = JS_STRING]; } enum LiquidityRuleType { @@ -852,7 +852,7 @@ message LiquidityRule { The short channel ID of the channel that this rule should be applied to. This field may not be set when the pubkey field is set. */ - uint64 channel_id = 1; + uint64 channel_id = 1 [jstype = JS_STRING]; /* The public key of the peer that this rule should be applied to. This field diff --git a/proto/trader.proto b/proto/trader.proto index eb670df4..a8b7d235 100644 --- a/proto/trader.proto +++ b/proto/trader.proto @@ -188,7 +188,7 @@ service Trader { } message InitAccountRequest { - uint64 account_value = 1; + uint64 account_value = 1 [jstype = JS_STRING]; oneof account_expiry { uint32 absolute_height = 2; @@ -216,7 +216,7 @@ message InitAccountRequest { } message QuoteAccountRequest { - uint64 account_value = 1; + uint64 account_value = 1 [jstype = JS_STRING]; oneof fees { /* @@ -230,9 +230,9 @@ message QuoteAccountRequest { } message QuoteAccountResponse { - uint64 miner_fee_rate_sat_per_kw = 1; + uint64 miner_fee_rate_sat_per_kw = 1 [jstype = JS_STRING]; - uint64 miner_fee_total = 2; + uint64 miner_fee_total = 2 [jstype = JS_STRING]; } message ListAccountsRequest { @@ -247,7 +247,7 @@ message ListAccountsResponse { message Output { // The value, in satoshis, of the output. - uint64 value_sat = 1; + uint64 value_sat = 1 [jstype = JS_STRING]; // The address corresponding to the output. string address = 2; @@ -266,7 +266,7 @@ message OutputWithFee { /* The fee rate, in satoshis per kw, to use for the withdrawal transaction. */ - uint64 fee_rate_sat_per_kw = 3; + uint64 fee_rate_sat_per_kw = 3 [jstype = JS_STRING]; } } @@ -314,7 +314,7 @@ message WithdrawAccountRequest { /* The fee rate, in satoshis per kw, to use for the withdrawal transaction. */ - uint64 fee_rate_sat_per_kw = 3; + uint64 fee_rate_sat_per_kw = 3 [jstype = JS_STRING]; } message WithdrawAccountResponse { // The state of the account after processing the withdrawal. @@ -332,12 +332,12 @@ message DepositAccountRequest { bytes trader_key = 1; // The amount in satoshis to deposit into the account. - uint64 amount_sat = 2; + uint64 amount_sat = 2 [jstype = JS_STRING]; /* The fee rate, in satoshis per kw, to use for the deposit transaction. */ - uint64 fee_rate_sat_per_kw = 3; + uint64 fee_rate_sat_per_kw = 3 [jstype = JS_STRING]; } message DepositAccountResponse { // The state of the account after processing the deposit. @@ -360,7 +360,7 @@ message RenewAccountRequest { } // The fee rate, in satoshis per kw, to use for the renewal transaction. - uint64 fee_rate_sat_per_kw = 4; + uint64 fee_rate_sat_per_kw = 4 [jstype = JS_STRING]; } message RenewAccountResponse { // The state of the account after processing the renewal. @@ -380,7 +380,7 @@ message BumpAccountFeeRequest { The new fee rate, in satoshis per kw, to use for the child of the account transaction. */ - uint64 fee_rate_sat_per_kw = 2; + uint64 fee_rate_sat_per_kw = 2 [jstype = JS_STRING]; } message BumpAccountFeeResponse { } @@ -443,13 +443,13 @@ message Account { OutPoint outpoint = 2; // The current total amount of satoshis in the account. - uint64 value = 3; + uint64 value = 3 [jstype = JS_STRING]; /* The amount of satoshis in the account that is available, meaning not allocated to any oustanding orders. */ - uint64 available_balance = 4; + uint64 available_balance = 4 [jstype = JS_STRING]; // The height at which the account will expire. uint32 expiration_height = 5; @@ -527,13 +527,13 @@ message Order { /* Order amount in satoshis. */ - uint64 amt = 3; + uint64 amt = 3 [jstype = JS_STRING]; /* Maximum fee rate the trader is willing to pay for the batch transaction, expressed in satoshis per 1000 weight units (sat/KW). */ - uint64 max_batch_fee_rate_sat_per_kw = 4; + uint64 max_batch_fee_rate_sat_per_kw = 4 [jstype = JS_STRING]; /* Order nonce, acts as unique order identifier. @@ -559,10 +559,10 @@ message Order { // The value reserved from the account by this order to ensure the account // can pay execution and chain fees in case it gets matched. - uint64 reserved_value_sat = 9; + uint64 reserved_value_sat = 9 [jstype = JS_STRING]; // The unix timestamp in nanoseconds the order was first created/submitted. - uint64 creation_timestamp_ns = 10; + uint64 creation_timestamp_ns = 10 [jstype = JS_STRING]; /* A list of events that were emitted for this order. This field is only set @@ -606,7 +606,7 @@ message Bid { as the order amount and the min_chan_amt must be set to the full order amount. */ - uint64 self_chan_balance = 5; + uint64 self_chan_balance = 5 [jstype = JS_STRING]; /* If this bid order is meant to lease a channel for another node (which is @@ -640,7 +640,7 @@ message QuoteOrderRequest { /* Order amount in satoshis. */ - uint64 amt = 1; + uint64 amt = 1 [jstype = JS_STRING]; /* Fixed order rate in parts per billion. @@ -657,7 +657,7 @@ message QuoteOrderRequest { Maximum fee rate the trader is willing to pay for the batch transaction, expressed in satoshis per 1000 weight units (sat/KW). */ - uint64 max_batch_fee_rate_sat_per_kw = 4; + uint64 max_batch_fee_rate_sat_per_kw = 4 [jstype = JS_STRING]; // The minimum number of order units that must be matched per order pair. uint32 min_units_match = 5; @@ -668,7 +668,7 @@ message QuoteOrderResponse { represents the interest amount paid to the maker by the taker excluding any execution or chain fees. */ - uint64 total_premium_sat = 1; + uint64 total_premium_sat = 1 [jstype = JS_STRING]; /* The fixed order rate expressed as a fraction instead of parts per billion. @@ -684,7 +684,7 @@ message QuoteOrderResponse { The total execution fee in satoshis that needs to be paid to the auctioneer for executing the entire order. */ - uint64 total_execution_fee_sat = 4; + uint64 total_execution_fee_sat = 4 [jstype = JS_STRING]; /* The worst case chain fees that need to be paid if fee rates spike up to the @@ -693,7 +693,7 @@ message QuoteOrderResponse { calculation assumes chain fees for the chain footprint of opening amt/min_units_match channels (hence worst case calculation). */ - uint64 worst_case_chain_fee_sat = 5; + uint64 worst_case_chain_fee_sat = 5 [jstype = JS_STRING]; } message OrderEvent { @@ -701,7 +701,7 @@ message OrderEvent { The unix timestamp in nanoseconds the event was emitted at. This is the primary key of the event and is unique across the database. */ - int64 timestamp_ns = 1; + int64 timestamp_ns = 1 [jstype = JS_STRING]; // The human readable representation of the event. string event_str = 2; @@ -844,7 +844,7 @@ message Lease { OutPoint channel_point = 1; // The amount, in satoshis, of the channel created. - uint64 channel_amt_sat = 2; + uint64 channel_amt_sat = 2 [jstype = JS_STRING]; // The intended duration, in blocks, of the channel created. uint32 channel_duration_blocks = 3; @@ -855,31 +855,31 @@ message Lease { /* The premium, in satoshis, either paid or received for the offered liquidity. */ - uint64 premium_sat = 5; + uint64 premium_sat = 5 [jstype = JS_STRING]; /* The execution fee, in satoshis, charged by the auctioneer for the channel created. */ - uint64 execution_fee_sat = 6; + uint64 execution_fee_sat = 6 [jstype = JS_STRING]; /* The fee, in satoshis, charged by the auctioneer for the batch execution transaction that created this lease. */ - uint64 chain_fee_sat = 7; + uint64 chain_fee_sat = 7 [jstype = JS_STRING]; /* The actual fixed rate expressed in parts per billionth this lease was bought/sold at. */ - uint64 clearing_rate_price = 8; + uint64 clearing_rate_price = 8 [jstype = JS_STRING]; /* The actual fixed rate of the bid/ask, this should always be 'better' than the clearing_rate_price. */ - uint64 order_fixed_rate = 9; + uint64 order_fixed_rate = 9 [jstype = JS_STRING]; // The order executed that resulted in the channel created. bytes order_nonce = 10; @@ -894,7 +894,7 @@ message Lease { NodeTier channel_node_tier = 13; // The self channel balance that was pushed to the recipient. - uint64 self_chan_balance = 14; + uint64 self_chan_balance = 14 [jstype = JS_STRING]; // Whether the channel was leased as a sidecar channel (bid orders only). bool sidecar_channel = 15; @@ -919,10 +919,10 @@ message LeasesResponse { repeated Lease leases = 1; // The total amount of satoshis earned from the leases returned. - uint64 total_amt_earned_sat = 2; + uint64 total_amt_earned_sat = 2 [jstype = JS_STRING]; // The total amount of satoshis paid for the leases returned. - uint64 total_amt_paid_sat = 3; + uint64 total_amt_paid_sat = 3 [jstype = JS_STRING]; } message TokensRequest { @@ -956,17 +956,17 @@ message LsatToken { /** The amount of millisatoshis that was paid to get the token. */ - int64 amount_paid_msat = 4; + int64 amount_paid_msat = 4 [jstype = JS_STRING]; /** The amount of millisatoshis paid in routing fee to pay for the token. */ - int64 routing_fee_paid_msat = 5; + int64 routing_fee_paid_msat = 5 [jstype = JS_STRING]; /** The creation time of the token as UNIX timestamp in seconds. */ - int64 time_created = 6; + int64 time_created = 6 [jstype = JS_STRING]; /** Indicates whether the token is expired or still valid. @@ -1010,13 +1010,13 @@ message NextBatchInfoResponse { The fee rate, in satoshis per kiloweight, estimated by the auctioneer to use for the next batch. */ - uint64 fee_rate_sat_per_kw = 6; + uint64 fee_rate_sat_per_kw = 6 [jstype = JS_STRING]; /* The absolute unix timestamp in seconds at which the auctioneer will attempt to clear the next batch. */ - uint64 clear_timestamp = 7; + uint64 clear_timestamp = 7 [jstype = JS_STRING]; } message NodeRatingRequest { From d0872b12ecf50646ec3518cb47ad339ed9402438 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:24:13 -0400 Subject: [PATCH 03/10] api: update types in the Loop and Pool API classes --- app/src/api/loop.ts | 35 +++++++++++++------------ app/src/api/pool.ts | 64 +++++++++++++++++++++++---------------------- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/app/src/api/loop.ts b/app/src/api/loop.ts index 93e9a2ae..c9264ff9 100644 --- a/app/src/api/loop.ts +++ b/app/src/api/loop.ts @@ -59,7 +59,7 @@ class LoopApi extends BaseApi { confTarget?: number, ): Promise { const req = new LOOP.QuoteRequest(); - req.setAmt(+amount); + req.setAmt(amount.toString()); if (confTarget) req.setConfTarget(confTarget); const res = await this._grpc.request(SwapClient.GetLoopInQuote, req, this._meta); return res.toObject(); @@ -73,7 +73,7 @@ class LoopApi extends BaseApi { confTarget?: number, ): Promise { const req = new LOOP.QuoteRequest(); - req.setAmt(+amount); + req.setAmt(amount.toString()); if (confTarget) req.setConfTarget(confTarget); const res = await this._grpc.request(SwapClient.LoopOutQuote, req, this._meta); return res.toObject(); @@ -89,9 +89,9 @@ class LoopApi extends BaseApi { confTarget?: number, ): Promise { const req = new LOOP.LoopInRequest(); - req.setAmt(+amount); - req.setMaxSwapFee(+quote.swapFee); - req.setMaxMinerFee(+quote.minerFee); + req.setAmt(amount.toString()); + req.setMaxSwapFee(quote.swapFee.toString()); + req.setMaxMinerFee(quote.minerFee.toString()); req.setInitiator(LOOP_INITIATOR); if (lastHop) req.setLastHop(b64(lastHop)); if (confTarget) req.setHtlcConfTarget(confTarget); @@ -105,20 +105,20 @@ class LoopApi extends BaseApi { async loopOut( amount: Big, quote: Quote, - chanIds: number[], + chanIds: string[], deadline: number, confTarget?: number, destAddress?: string, ): Promise { const req = new LOOP.LoopOutRequest(); - req.setAmt(+amount); - req.setMaxSwapFee(+quote.swapFee); - req.setMaxMinerFee(+quote.minerFee); - req.setMaxPrepayAmt(+quote.prepayAmount); - req.setMaxSwapRoutingFee(this._calcRoutingFee(+amount)); - req.setMaxPrepayRoutingFee(this._calcRoutingFee(+quote.prepayAmount)); - req.setOutgoingChanSetList(chanIds); - req.setSwapPublicationDeadline(deadline); + req.setAmt(amount.toString()); + req.setMaxSwapFee(quote.swapFee.toString()); + req.setMaxMinerFee(quote.minerFee.toString()); + req.setMaxPrepayAmt(quote.prepayAmount.toString()); + req.setMaxSwapRoutingFee(this._calcRoutingFee(amount).toString()); + req.setMaxPrepayRoutingFee(this._calcRoutingFee(quote.prepayAmount).toString()); + req.setOutgoingChanSetList(chanIds.map(id => id.toString())); + req.setSwapPublicationDeadline(deadline.toString()); req.setInitiator(LOOP_INITIATOR); if (confTarget) req.setSweepConfTarget(confTarget); if (destAddress) req.setDest(destAddress); @@ -138,15 +138,16 @@ class LoopApi extends BaseApi { this._meta, ); } + /** * Calculates the max routing fee params for loop out. this mimics the loop cli * behavior of using 2% of the amount * @param amount the amount of the payment */ - private _calcRoutingFee(amount: number) { - const routingFeePct = 2; + private _calcRoutingFee(amount: Big): Big { + const routingFeeFactor = 0.02; // round up to avoid decimals - return Math.ceil(amount * (routingFeePct / 100)); + return amount.mul(routingFeeFactor).round(0, Big.roundUp); } } diff --git a/app/src/api/pool.ts b/app/src/api/pool.ts index 6ca47209..7de911ae 100644 --- a/app/src/api/pool.ts +++ b/app/src/api/pool.ts @@ -1,6 +1,7 @@ import * as AUCT from 'types/generated/auctioneerrpc/auctioneer_pb'; import * as POOL from 'types/generated/trader_pb'; import { Trader } from 'types/generated/trader_pb_service'; +import Big from 'big.js'; import { b64 } from 'util/strings'; import { OrderType, Tier } from 'store/models/order'; import BaseApi from './base'; @@ -43,11 +44,11 @@ class PoolApi extends BaseApi { * call the pool `QuoteAccount` RPC and return the response */ async quoteAccount( - amount: number, + amount: Big, confTarget: number, ): Promise { const req = new POOL.QuoteAccountRequest(); - req.setAccountValue(amount); + req.setAccountValue(amount.toString()); req.setConfTarget(confTarget); const res = await this._grpc.request(Trader.QuoteAccount, req, this._meta); return res.toObject(); @@ -57,12 +58,12 @@ class PoolApi extends BaseApi { * call the pool `InitAccount` RPC and return the response */ async initAccount( - amount: number, + amount: Big, expiryBlocks: number, confTarget = 6, ): Promise { const req = new POOL.InitAccountRequest(); - req.setAccountValue(amount); + req.setAccountValue(amount.toString()); req.setRelativeHeight(expiryBlocks); req.setConfTarget(confTarget); req.setInitiator(POOL_INITIATOR); @@ -76,12 +77,12 @@ class PoolApi extends BaseApi { async renewAccount( traderKey: string, expiryBlocks: number, - feeRateSatPerKw: number, + feeRateSatPerKw: Big, ): Promise { const req = new POOL.RenewAccountRequest(); req.setAccountKey(b64(traderKey)); req.setRelativeExpiry(expiryBlocks); - req.setFeeRateSatPerKw(feeRateSatPerKw); + req.setFeeRateSatPerKw(feeRateSatPerKw.toString()); const res = await this._grpc.request(Trader.RenewAccount, req, this._meta); return res.toObject(); @@ -99,7 +100,7 @@ class PoolApi extends BaseApi { req.setTraderKey(b64(traderKey)); const output = new POOL.OutputWithFee(); - output.setFeeRateSatPerKw(feeRateSatPerKw); + output.setFeeRateSatPerKw(feeRateSatPerKw.toString()); if (destinationAddr) { output.setAddress(destinationAddr); } @@ -123,13 +124,13 @@ class PoolApi extends BaseApi { */ async deposit( traderKey: string, - amount: number, + amount: Big, feeRateSatPerKw = 253, ): Promise { const req = new POOL.DepositAccountRequest(); req.setTraderKey(Buffer.from(traderKey, 'hex').toString('base64')); - req.setAmountSat(amount); - req.setFeeRateSatPerKw(feeRateSatPerKw); + req.setAmountSat(amount.toString()); + req.setFeeRateSatPerKw(feeRateSatPerKw.toString()); const res = await this._grpc.request(Trader.DepositAccount, req, this._meta); return res.toObject(); } @@ -139,14 +140,14 @@ class PoolApi extends BaseApi { */ async withdraw( traderKey: string, - amount: number, + amount: Big, feeRateSatPerKw = 253, ): Promise { const req = new POOL.WithdrawAccountRequest(); req.setTraderKey(Buffer.from(traderKey, 'hex').toString('base64')); - req.setFeeRateSatPerKw(feeRateSatPerKw); + req.setFeeRateSatPerKw(feeRateSatPerKw.toString()); const output = new POOL.Output(); - output.setValueSat(amount); + output.setValueSat(amount.toString()); req.setOutputsList([output]); const res = await this._grpc.request(Trader.WithdrawAccount, req, this._meta); return res.toObject(); @@ -165,18 +166,18 @@ class PoolApi extends BaseApi { * call the pool `QuoteOrder` RPC and return the response */ async quoteOrder( - amount: number, + amount: Big, rateFixed: number, duration: number, minUnitsMatch: number, - feeRateSatPerKw: number, + feeRateSatPerKw = 253, ): Promise { const req = new POOL.QuoteOrderRequest(); - req.setAmt(amount); + req.setAmt(amount.toString()); req.setRateFixed(rateFixed); req.setLeaseDurationBlocks(duration); req.setMinUnitsMatch(minUnitsMatch); - req.setMaxBatchFeeRateSatPerKw(feeRateSatPerKw); + req.setMaxBatchFeeRateSatPerKw(feeRateSatPerKw.toString()); const res = await this._grpc.request(Trader.QuoteOrder, req, this._meta); return res.toObject(); @@ -188,11 +189,11 @@ class PoolApi extends BaseApi { async submitOrder( traderKey: string, type: OrderType, - amount: number, + amount: Big, rateFixed: number, duration: number, minUnitsMatch: number, - feeRateSatPerKw: number, + feeRateSatPerKw = 253, minNodeTier?: Tier, ): Promise { if (rateFixed < 1) { @@ -204,10 +205,10 @@ class PoolApi extends BaseApi { const order = new POOL.Order(); order.setTraderKey(b64(traderKey)); - order.setAmt(amount); + order.setAmt(amount.toString()); order.setRateFixed(rateFixed); order.setMinUnitsMatch(minUnitsMatch); - order.setMaxBatchFeeRateSatPerKw(feeRateSatPerKw); + order.setMaxBatchFeeRateSatPerKw(feeRateSatPerKw.toString()); switch (type) { case OrderType.Bid: @@ -324,36 +325,37 @@ class PoolApi extends BaseApi { * Converts from sats per kilo-weight to sats per vByte * @param satsPerVByte the number of sats per kilo-weight */ - satsPerKWeightToVByte(satsPerKWeight: number) { + satsPerKWeightToVByte(satsPerKWeight: Big) { // convert to kilo-vbyte - const satsPerKVByte = satsPerKWeight * 4; + const satsPerKVByte = satsPerKWeight.mul(4); // convert to vbyte - return satsPerKVByte / 1000; + return satsPerKVByte.div(1000); } /** * Calculates the per block fixed rate given an amount and premium * @param amount the amount of the order * @param premium the premium being paid + * @param duration the lease duration in blocks */ - calcFixedRate(amount: number, premium: number, duration: number) { - const ratePct = (premium * 100) / amount; + calcFixedRate(amount: Big, premium: Big, duration: number) { + const ratePct = premium.mul(100).div(amount); // rate = % / 100 // rate = rateFixed / totalParts // rateFixed = rate * totalParts - const interestRate = ratePct / 100; - const rateFixedFloat = interestRate * FEE_RATE_TOTAL_PARTS; + const interestRate = ratePct.div(100); + const rateFixedFloat = interestRate.mul(FEE_RATE_TOTAL_PARTS); // We then take this rate fixed, and divide it by the number of blocks // as the user wants this rate to be the final lump sum they pay. - return Math.floor(rateFixedFloat / duration); + return +rateFixedFloat.div(duration).round(0, Big.roundDown); } /** * Calculates the percentage interest rate for a given fixed rate * @param fixedRate the per block fixed rate */ - calcPctRate(fixedRate: number, duration: number) { - return (fixedRate * duration) / FEE_RATE_TOTAL_PARTS; + calcPctRate(fixedRate: Big, duration: Big) { + return +fixedRate.mul(duration).div(FEE_RATE_TOTAL_PARTS); } } From 7b139158316a3387c9abeb129253fb16379c6a57 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:25:23 -0400 Subject: [PATCH 04/10] mobx: update types in the mobx models --- app/src/store/models/batch.ts | 16 ++++++++-------- app/src/store/models/lease.ts | 8 ++++---- app/src/store/models/order.ts | 26 +++++++++++++------------- app/src/store/models/swap.ts | 18 +++++++++--------- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/app/src/store/models/batch.ts b/app/src/store/models/batch.ts index 314254cc..49a6a69c 100644 --- a/app/src/store/models/batch.ts +++ b/app/src/store/models/batch.ts @@ -48,7 +48,7 @@ export default class Batch { prevBatchId = ''; clearingPriceRate = 0; batchTxId = ''; - batchTxFeeRateSatPerKw = 0; + batchTxFeeRateSatPerKw = Big(0); matchedOrders: MatchedOrder[] = []; // the provided lease duration to filter orders by @@ -101,21 +101,21 @@ export default class Batch { /** the total amount of sats earned in this batch */ get earnedSats() { const pctRate = this._store.api.pool.calcPctRate( - this.clearingPriceRate, - this.leaseDuration, + Big(this.clearingPriceRate), + Big(this.leaseDuration), ); return this.volume.mul(pctRate); } /** the fee in sats/vbyte rounded to the nearest whole number */ get feeLabel() { - return `${Math.round(this.feeInVBytes)}`; + return this.feeInVBytes.round().toString(); } /** a label containing the batch fee in both sats/kw and sats/vbyte */ get feeDescription() { // round the fee to 2 decimal places - const fee = Math.round(this.feeInVBytes * 100) / 100; + const fee = this.feeInVBytes.mul(100).round().div(100); return `${this.batchTxFeeRateSatPerKw} sats/kw - ${fee} sats/vbyte`; } @@ -145,8 +145,8 @@ export default class Batch { /** the batch clearing rate expressed as basis points */ get basisPoints() { const pct = this._store.api.pool.calcPctRate( - this.clearingPriceRate, - this.leaseDuration, + Big(this.clearingPriceRate), + Big(this.leaseDuration), ); // convert the percentage to basis points. round up to prevent 0 bps // which is the case for the first batch on testnet which has a @@ -173,7 +173,7 @@ export default class Batch { this.batchId = hex(llmBatch.batchId); this.prevBatchId = hex(llmBatch.prevBatchId); this.batchTxId = llmBatch.batchTxId; - this.batchTxFeeRateSatPerKw = llmBatch.batchTxFeeRateSatPerKw; + this.batchTxFeeRateSatPerKw = Big(llmBatch.batchTxFeeRateSatPerKw); // loop over all markets to limit the orders of this batch to a specific lease duration llmBatch.matchedMarketsMap.forEach(([duration, market]) => { // ignore markets for other lease durations diff --git a/app/src/store/models/lease.ts b/app/src/store/models/lease.ts index 1fb8debc..7688990f 100644 --- a/app/src/store/models/lease.ts +++ b/app/src/store/models/lease.ts @@ -15,8 +15,8 @@ export default class Lease { premiumSat = Big(0); executionFeeSat = Big(0); chainFeeSat = Big(0); - clearingRatePrice = 0; - orderFixedRate = 0; + clearingRatePrice = Big(0); + orderFixedRate = Big(0); orderNonce = ''; purchased = false; channelRemoteNodeKey = ''; @@ -45,8 +45,8 @@ export default class Lease { this.premiumSat = Big(poolLease.premiumSat); this.executionFeeSat = Big(poolLease.executionFeeSat); this.chainFeeSat = Big(poolLease.chainFeeSat); - this.clearingRatePrice = poolLease.clearingRatePrice; - this.orderFixedRate = poolLease.orderFixedRate; + this.clearingRatePrice = Big(poolLease.clearingRatePrice); + this.orderFixedRate = Big(poolLease.orderFixedRate); this.orderNonce = hex(poolLease.orderNonce); this.purchased = poolLease.purchased; this.channelRemoteNodeKey = hex(poolLease.channelRemoteNodeKey); diff --git a/app/src/store/models/order.ts b/app/src/store/models/order.ts index 17a98310..e103f700 100644 --- a/app/src/store/models/order.ts +++ b/app/src/store/models/order.ts @@ -27,17 +27,17 @@ export default class Order { traderKey = ''; amount = Big(0); state = 0; - rateFixed = 0; - maxBatchFeeRateSatPerKw = 0; + rateFixed = Big(0); + maxBatchFeeRateSatPerKw = Big(0); units = 0; unitsUnfulfilled = 0; reserved = Big(0); - creationTimestamp = 0; + creationTimestamp = Big(0); minNodeTier?: Tier = 0; // custom app values type: OrderType = OrderType.Bid; // for bids, this is the minimum. for asks this is the maximum - duration = 0; + duration = Big(0); constructor(store: Store) { makeAutoObservable(this, {}, { deep: false, autoBind: true }); @@ -102,7 +102,7 @@ export default class Order { /** The date this swap was created as a JS Date object */ get createdOn() { - return new Date(this.creationTimestamp / 1000 / 1000); + return new Date(this.creationTimestamp.div(1000).div(1000).toNumber()); } /** The date this swap was created as formatted string */ @@ -124,15 +124,15 @@ export default class Order { this.traderKey = hex(poolOrder.traderKey); this.amount = Big(poolOrder.amt); this.state = poolOrder.state; - this.rateFixed = poolOrder.rateFixed; - this.maxBatchFeeRateSatPerKw = poolOrder.maxBatchFeeRateSatPerKw; + this.rateFixed = Big(poolOrder.rateFixed); + this.maxBatchFeeRateSatPerKw = Big(poolOrder.maxBatchFeeRateSatPerKw); this.units = poolOrder.units; this.unitsUnfulfilled = poolOrder.unitsUnfulfilled; this.reserved = Big(poolOrder.reservedValueSat); - this.creationTimestamp = poolOrder.creationTimestampNs; + this.creationTimestamp = Big(poolOrder.creationTimestampNs); this.type = type; - this.duration = duration; + this.duration = Big(duration); this.minNodeTier = minNodeTier; } @@ -149,16 +149,16 @@ export default class Order { case 'type': return a.type.toLowerCase() > b.type.toLowerCase() ? 1 : -1; case 'amount': - return +a.amount.sub(b.amount); + return a.amount.sub(b.amount).toNumber(); case 'rateFixed': - return a.rateFixed - b.rateFixed; + return a.rateFixed.sub(b.rateFixed).toNumber(); case 'duration': - return a.duration - b.duration; + return a.duration.sub(b.duration).toNumber(); case 'stateLabel': return a.stateLabel.toLowerCase() > b.stateLabel.toLowerCase() ? 1 : -1; case 'creationTimestamp': default: - return a.creationTimestamp - b.creationTimestamp; + return a.creationTimestamp.sub(b.creationTimestamp).toNumber(); } } } diff --git a/app/src/store/models/swap.ts b/app/src/store/models/swap.ts index f4b4ec99..329aad2e 100644 --- a/app/src/store/models/swap.ts +++ b/app/src/store/models/swap.ts @@ -12,8 +12,8 @@ export default class Swap { id = ''; type = 0; amount = Big(0); - initiationTime = 0; - lastUpdateTime = 0; + initiationTime = Big(0); + lastUpdateTime = Big(0); state = 0; failureReason = 0; @@ -107,7 +107,7 @@ export default class Swap { /** The date this swap was created as a JS Date object */ get createdOn() { - return new Date(this.initiationTime / 1000 / 1000); + return new Date(this.initiationTime.div(1000).div(1000).toNumber()); } /** The date this swap was created as formatted string */ @@ -117,7 +117,7 @@ export default class Swap { /** The date this swap was last updated as a JS Date object */ get updatedOn() { - return new Date(this.lastUpdateTime / 1000 / 1000); + return new Date(this.lastUpdateTime.div(1000).div(1000).toNumber()); } /** The date this swap was last updated as formatted string */ @@ -133,8 +133,8 @@ export default class Swap { this.id = loopSwap.id; this.type = loopSwap.type; this.amount = Big(loopSwap.amt); - this.initiationTime = loopSwap.initiationTime; - this.lastUpdateTime = loopSwap.lastUpdateTime; + this.initiationTime = Big(loopSwap.initiationTime); + this.lastUpdateTime = Big(loopSwap.lastUpdateTime); this.state = loopSwap.state; this.failureReason = loopSwap.failureReason; } @@ -154,12 +154,12 @@ export default class Swap { case 'typeName': return a.typeName.toLowerCase() > b.typeName.toLowerCase() ? 1 : -1; case 'amount': - return +a.amount.sub(b.amount); + return a.amount.sub(b.amount).toNumber(); case 'initiationTime': - return a.initiationTime - b.initiationTime; + return a.initiationTime.sub(b.initiationTime).toNumber(); case 'lastUpdateTime': default: - return a.lastUpdateTime - b.lastUpdateTime; + return a.lastUpdateTime.sub(b.lastUpdateTime).toNumber(); } } From b8900c9fa28ae2a0fe9aff571b27b682a9b933ef Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:25:42 -0400 Subject: [PATCH 05/10] mobx: update types in the mobx stores --- app/src/store/stores/accountStore.ts | 17 +++++++++++++---- app/src/store/stores/batchStore.ts | 17 +++++++++-------- app/src/store/stores/channelStore.ts | 2 +- app/src/store/stores/orderStore.ts | 10 +++++----- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/app/src/store/stores/accountStore.ts b/app/src/store/stores/accountStore.ts index ebb4b986..2c0cb175 100644 --- a/app/src/store/stores/accountStore.ts +++ b/app/src/store/stores/accountStore.ts @@ -8,6 +8,7 @@ import { values, } from 'mobx'; import { AccountState } from 'types/generated/trader_pb'; +import Big from 'big.js'; import copyToClipboard from 'copy-to-clipboard'; import debounce from 'lodash/debounce'; import { hex } from 'util/strings'; @@ -86,7 +87,7 @@ export default class AccountStore { * @param amount the amount (sats) to fund the account with * @param expiryBlocks the number of blocks from now to expire the account */ - async createAccount(amount: number, expiryBlocks: number, confTarget?: number) { + async createAccount(amount: Big, expiryBlocks: number, confTarget?: number) { this._store.log.info(`creating new account with ${amount}sats`); try { const acct = await this._store.api.pool.initAccount( @@ -142,7 +143,7 @@ export default class AccountStore { const res = await this._store.api.pool.renewAccount( acct.traderKey, expiryBlocks, - feeRate, + Big(feeRate), ); runInAction(() => { // the account should always be defined but if not, fetch all accounts as a fallback @@ -214,7 +215,11 @@ export default class AccountStore { const acct = this.activeAccount; this._store.log.info(`depositing ${amount}sats into account ${acct.traderKey}`); - const res = await this._store.api.pool.deposit(acct.traderKey, amount, feeRate); + const res = await this._store.api.pool.deposit( + acct.traderKey, + Big(amount), + feeRate, + ); runInAction(() => { // the account should always be defined but if not, fetch all accounts as a fallback if (res.account) { @@ -238,7 +243,11 @@ export default class AccountStore { const acct = this.activeAccount; this._store.log.info(`withdrawing ${amount}sats into account ${acct.traderKey}`); - const res = await this._store.api.pool.withdraw(acct.traderKey, amount, feeRate); + const res = await this._store.api.pool.withdraw( + acct.traderKey, + Big(amount), + feeRate, + ); runInAction(() => { if (res.account) { acct.update(res.account); diff --git a/app/src/store/stores/batchStore.ts b/app/src/store/stores/batchStore.ts index 35c1718d..65671b97 100644 --- a/app/src/store/stores/batchStore.ts +++ b/app/src/store/stores/batchStore.ts @@ -9,6 +9,7 @@ import { } from 'mobx'; import { NodeTier } from 'types/generated/auctioneerrpc/auctioneer_pb'; import { LeaseDuration } from 'types/state'; +import Big from 'big.js'; import { IS_DEV, IS_TEST } from 'config'; import debounce from 'lodash/debounce'; import { hex } from 'util/strings'; @@ -35,7 +36,7 @@ export default class BatchStore { markets: ObservableMap = observable.map(); /** the timestamp of the next batch in seconds */ - nextBatchTimestamp = 0; + nextBatchTimestamp = Big(0); /** the fee rate (sats/vbyte) estimated by the auctioneer to use for the next batch */ nextFeeRate = 0; @@ -166,12 +167,12 @@ export default class BatchStore { try { const res = await this._store.api.pool.nextBatchInfo(); runInAction(() => { - this.setNextBatchTimestamp(res.clearTimestamp); + this.setNextBatchTimestamp(Big(res.clearTimestamp)); this._store.log.info( 'updated batchStore.nextBatchTimestamp', this.nextBatchTimestamp, ); - this.setNextFeeRate(res.feeRateSatPerKw); + this.setNextFeeRate(Big(res.feeRateSatPerKw)); this._store.log.info('updated batchStore.nextFeeRate', this.nextFeeRate); }); } catch (error) { @@ -254,15 +255,15 @@ export default class BatchStore { * batched to be processed * @param timestamp the next batch timestamp in seconds since epoch */ - setNextBatchTimestamp(timestamp: number) { + setNextBatchTimestamp(timestamp: Big) { // if the value is the same, then just return immediately - if (this.nextBatchTimestamp === timestamp) return; + if (this.nextBatchTimestamp.eq(timestamp)) return; this.nextBatchTimestamp = timestamp; if (this._nextBatchTimer) clearTimeout(this._nextBatchTimer); // calc the number of ms between now and the next batch timestamp - let ms = timestamp * 1000 - Date.now(); + let ms = timestamp.mul(1000).sub(Date.now()).toNumber(); // if the timestamp is somehow in the past, use 10 mins as a default if (ms < 0) ms = 10 * 60 * 1000; this._nextBatchTimer = setTimeout(this.fetchLatestBatch, ms + 3000); @@ -271,9 +272,9 @@ export default class BatchStore { /** * sets the nextFeeRate by converting the provided sats/kw to sats/vbyte */ - setNextFeeRate(satsPerKWeight: number) { + setNextFeeRate(satsPerKWeight: Big) { const satsPerVbyte = this._store.api.pool.satsPerKWeightToVByte(satsPerKWeight); - this.nextFeeRate = Math.ceil(satsPerVbyte); + this.nextFeeRate = satsPerVbyte.round(0, Big.roundUp).toNumber(); } startPolling() { diff --git a/app/src/store/stores/channelStore.ts b/app/src/store/stores/channelStore.ts index 3549ae9a..f404c9df 100644 --- a/app/src/store/stores/channelStore.ts +++ b/app/src/store/stores/channelStore.ts @@ -240,7 +240,7 @@ export default class ChannelStore { const localPubkey = this._store.nodeStore.pubkey; const policy = node1Pub === localPubkey ? node2Policy : node1Policy; if (policy) { - acc[channelId] = policy.feeRateMilliMsat; + acc[channelId] = +Big(policy.feeRateMilliMsat); } return acc; }, data); diff --git a/app/src/store/stores/orderStore.ts b/app/src/store/stores/orderStore.ts index d3eaa074..404f0f24 100644 --- a/app/src/store/stores/orderStore.ts +++ b/app/src/store/stores/orderStore.ts @@ -174,7 +174,7 @@ export default class OrderStore { * @param maxBatchFeeRate the maximum batch fee rate to allowed as sats per vByte */ async quoteOrder( - amount: number, + amount: Big, rateFixed: number, duration: number, minUnitsMatch: number, @@ -202,9 +202,9 @@ export default class OrderStore { return { ratePerBlock: rateFixed, ratePercent: 0, - totalExecutionFeeSat: 0, - totalPremiumSat: 0, - worstCaseChainFeeSat: 0, + totalExecutionFeeSat: '0', + totalPremiumSat: '0', + worstCaseChainFeeSat: '0', }; } } @@ -221,7 +221,7 @@ export default class OrderStore { */ async submitOrder( type: OrderType, - amount: number, + amount: Big, rateFixed: number, duration: number, minUnitsMatch: number, From 680b749cd8fe8d1c0013016d1af601fbbfc4ace5 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:37:43 -0400 Subject: [PATCH 06/10] mobx: update types in the mobx views --- app/src/store/views/appView.ts | 3 +- app/src/store/views/buildSwapView.ts | 3 +- app/src/store/views/closeAccountView.ts | 1 + app/src/store/views/fundAccountView.ts | 1 + app/src/store/views/fundNewAccountView.ts | 14 +++--- app/src/store/views/leaseView.ts | 3 +- app/src/store/views/orderFormView.ts | 61 ++++++++++++----------- app/src/store/views/renewAccountView.ts | 1 + 8 files changed, 47 insertions(+), 40 deletions(-) diff --git a/app/src/store/views/appView.ts b/app/src/store/views/appView.ts index 28867937..0ca31f26 100644 --- a/app/src/store/views/appView.ts +++ b/app/src/store/views/appView.ts @@ -1,6 +1,7 @@ import { makeAutoObservable, observable, toJS } from 'mobx'; import { SwapState } from 'types/generated/loop_pb'; import { Alert } from 'types/state'; +import Big from 'big.js'; import { AuthenticationError } from 'util/errors'; import { prefixTranslation } from 'util/translate'; import { Store } from 'store'; @@ -140,7 +141,7 @@ export default class AppView { // set the timestamp far in the future so it doesn't automatically disappear // from the Processing Loops list after 5 mins const tomorrow = Date.now() + 24 * 60 * 60 * 1000; - this._store.swapStore.sortedSwaps[0].lastUpdateTime = tomorrow * 1000 * 1000; + this._store.swapStore.sortedSwaps[0].lastUpdateTime = Big(tomorrow * 1000 * 1000); } else if (step === 22 /* swap-progress */) { // #22 is the swap-progress step // force the swap to be 100% complete diff --git a/app/src/store/views/buildSwapView.ts b/app/src/store/views/buildSwapView.ts index a7703226..a7f1aabe 100644 --- a/app/src/store/views/buildSwapView.ts +++ b/app/src/store/views/buildSwapView.ts @@ -489,11 +489,10 @@ class BuildSwapView { const deadline = this._store.nodeStore.network === 'regtest' ? 0 : Date.now() + thirtyMins; // convert the selected channel ids to numbers - const chanIds = this.selectedChanIds.map(v => parseInt(v)); res = await this._store.api.loop.loopOut( amount, quote, - chanIds, + this.selectedChanIds, deadline, this.confTarget, this.loopOutAddress, diff --git a/app/src/store/views/closeAccountView.ts b/app/src/store/views/closeAccountView.ts index 30fc0760..d08e4bf4 100644 --- a/app/src/store/views/closeAccountView.ts +++ b/app/src/store/views/closeAccountView.ts @@ -1,4 +1,5 @@ import { makeAutoObservable } from 'mobx'; +import Big from 'big.js'; import { ellipseInside } from 'util/strings'; import { Store } from 'store'; diff --git a/app/src/store/views/fundAccountView.ts b/app/src/store/views/fundAccountView.ts index f9664e84..84940f25 100644 --- a/app/src/store/views/fundAccountView.ts +++ b/app/src/store/views/fundAccountView.ts @@ -1,4 +1,5 @@ import { makeAutoObservable } from 'mobx'; +import Big from 'big.js'; import { prefixTranslation } from 'util/translate'; import { Store } from 'store'; diff --git a/app/src/store/views/fundNewAccountView.ts b/app/src/store/views/fundNewAccountView.ts index 2ceb0d59..9e005ea8 100644 --- a/app/src/store/views/fundNewAccountView.ts +++ b/app/src/store/views/fundNewAccountView.ts @@ -13,11 +13,11 @@ export default class FundNewAccountView { private _store: Store; // editable form fields - amount = 0; + amount = Big(0); confTarget = DEFAULT_CONF_TARGET; expireBlocks = DEFAULT_EXPIRE_BLOCKS; // response from quote - minerFee = 0; + minerFee = Big(0); constructor(store: Store) { makeAutoObservable(this, {}, { deep: false, autoBind: true }); @@ -49,9 +49,9 @@ export default class FundNewAccountView { /** the error message if the amount is invalid */ get amountError() { - if (!this.amount) return ''; + if (this.amount.eq(0)) return ''; const accountMinimum = 100000; - if (this.amount < accountMinimum) { + if (this.amount.lt(accountMinimum)) { return l('amountTooLow', { accountMinimum }); } if (this.walletBalance.lt(this.amount)) { @@ -93,7 +93,7 @@ export default class FundNewAccountView { // setAmount(amount: number) { - this.amount = amount; + this.amount = Big(amount); } setConfTarget(confTarget: number) { @@ -110,7 +110,7 @@ export default class FundNewAccountView { /** shows the summary view */ cancel() { - this.amount = 0; + this.amount = Big(0); this.confTarget = DEFAULT_CONF_TARGET; this.expireBlocks = DEFAULT_EXPIRE_BLOCKS; this._store.accountSectionView.showSummary(); @@ -126,7 +126,7 @@ export default class FundNewAccountView { ); runInAction(() => { - this.minerFee = minerFeeTotal; + this.minerFee = Big(minerFeeTotal); }); this._store.accountSectionView.showFundNewConfirm(); diff --git a/app/src/store/views/leaseView.ts b/app/src/store/views/leaseView.ts index 03ce8f18..b2f559af 100644 --- a/app/src/store/views/leaseView.ts +++ b/app/src/store/views/leaseView.ts @@ -1,5 +1,6 @@ import { makeAutoObservable } from 'mobx'; import { SortParams } from 'types/state'; +import Big from 'big.js'; import { annualPercentRate, toPercent } from 'util/bigmath'; import { BLOCKS_PER_DAY } from 'util/constants'; import { formatSats } from 'util/formatters'; @@ -40,7 +41,7 @@ export default class LeaseView { get apr() { const { channelAmtSat, premiumSat, channelDurationBlocks } = this.lease; const termInDays = channelDurationBlocks / BLOCKS_PER_DAY; - return annualPercentRate(+channelAmtSat, +premiumSat, termInDays); + return annualPercentRate(channelAmtSat, premiumSat, termInDays); } /** the annual percentage rate of this lease as a percentage */ diff --git a/app/src/store/views/orderFormView.ts b/app/src/store/views/orderFormView.ts index 63ef8517..c41ba84a 100644 --- a/app/src/store/views/orderFormView.ts +++ b/app/src/store/views/orderFormView.ts @@ -4,6 +4,7 @@ import { NodeTier, } from 'types/generated/auctioneerrpc/auctioneer_pb'; import { LeaseDuration } from 'types/state'; +import Big from 'big.js'; import debounce from 'lodash/debounce'; import { annualPercentRate, toBasisPoints, toPercent } from 'util/bigmath'; import { BLOCKS_PER_DAY } from 'util/constants'; @@ -22,8 +23,8 @@ export default class OrderFormView { /** the currently selected type of the order */ orderType: OrderType = OrderType.Bid; - amount = 0; - premium = 0; + amount = Big(0); + premium = Big(0); duration = 0; minChanSize = DEFAULT_MIN_CHAN_SIZE; maxBatchFeeRate = DEFAULT_MAX_BATCH_FEE; @@ -33,8 +34,8 @@ export default class OrderFormView { addlOptionsVisible = false; /** quoted fees */ - executionFee = 0; - worstChainFee = 0; + executionFee = Big(0); + worstChainFee = Big(0); quoteLoading = false; constructor(store: Store) { @@ -52,8 +53,8 @@ export default class OrderFormView { /** the error message if the amount is invalid */ get amountError() { - if (!this.amount) return ''; - if (this.amount % ONE_UNIT !== 0) { + if (this.amount.eq(0)) return ''; + if (!this.amount.mod(ONE_UNIT).eq(0)) { return l('errorMultiple'); } return ''; @@ -61,7 +62,7 @@ export default class OrderFormView { /** the error message if the premium is invalid */ get premiumError() { - if (!this.premium || !this.amount) return ''; + if (this.premium.eq(0) || this.amount.eq(0)) return ''; if (this.perBlockFixedRate < 1) { return l('premiumLowError'); } @@ -74,7 +75,7 @@ export default class OrderFormView { if (this.minChanSize % ONE_UNIT !== 0) { return l('errorMultiple'); } - if (this.amount && this.minChanSize > this.amount) { + if (!this.amount.eq(0) && this.amount.lt(this.minChanSize)) { return l('errorLiquidity'); } return ''; @@ -145,7 +146,7 @@ export default class OrderFormView { /** the per block fixed rate */ get perBlockFixedRate() { - if ([this.amount, this.premium].includes(0)) return 0; + if (this.amount.eq(0) || this.premium.eq(0)) return 0; return this._store.api.pool.calcFixedRate( this.amount, @@ -156,13 +157,13 @@ export default class OrderFormView { /** the premium interest of the amount in basis points */ get interestBps() { - if ([this.amount, this.premium].includes(0)) return 0; - return toBasisPoints(this.premium / this.amount); + if (this.amount.eq(0) || this.premium.eq(0)) return 0; + return toBasisPoints(this.premium.div(this.amount).toNumber()); } /** the APR given the amount and premium */ get apr() { - if ([this.amount, this.premium].includes(0)) return 0; + if (this.amount.eq(0) || this.premium.eq(0)) return 0; const termInDays = this.derivedDuration / BLOCKS_PER_DAY; const apr = annualPercentRate(this.amount, this.premium, termInDays); return toPercent(apr); @@ -177,7 +178,9 @@ export default class OrderFormView { /** determines if the current values are all valid */ get isValid() { return ( - ![this.amount, this.premium, this.minChanSize, this.maxBatchFeeRate].includes(0) && + !this.amount.eq(0) && + !this.premium.eq(0) && + ![this.minChanSize, this.maxBatchFeeRate].includes(0) && !this.amountError && !this.minChanSizeError && !this.feeRateError @@ -189,12 +192,12 @@ export default class OrderFormView { } setAmount(amount: number) { - this.amount = amount; + this.amount = Big(amount); this.fetchQuote(); } setPremium(premium: number) { - this.premium = premium; + this.premium = Big(premium); this.fetchQuote(); } @@ -219,18 +222,18 @@ export default class OrderFormView { setSuggestedPremium() { try { - if (!this.amount) throw new Error('Must specify amount first'); + if (this.amount.eq(0)) throw new Error('Must specify amount first'); const prevBatch = this._store.batchStore.sortedBatches[0]; if (!prevBatch) throw new Error('Previous batch not found'); const prevFixedRate = prevBatch.clearingPriceRate; // get the percentage rate of the previous batch and apply to the current amount const prevPctRate = this._store.api.pool.calcPctRate( - prevFixedRate, - this.derivedDuration, + Big(prevFixedRate), + Big(this.derivedDuration), ); - const suggested = this.amount * prevPctRate; + const suggested = this.amount.mul(prevPctRate); // round to the nearest 10 to offset lose of precision in calculating percentages - this.premium = Math.round(suggested / 10) * 10; + this.premium = suggested.div(10).round().mul(10); this.fetchQuote(); } catch (error) { this._store.appView.handleError(error, 'Unable to suggest premium'); @@ -243,7 +246,7 @@ export default class OrderFormView { /** requests a quote for an order to obtain accurate fees */ async quoteOrder() { - const minUnitsMatch = Math.floor(this.minChanSize / ONE_UNIT); + const minUnitsMatch = +Big(this.minChanSize).div(ONE_UNIT).round(0, Big.roundDown); const satsPerKWeight = this._store.api.pool.satsPerVByteToKWeight( this.maxBatchFeeRate, ); @@ -260,8 +263,8 @@ export default class OrderFormView { ); runInAction(() => { - this.executionFee = totalExecutionFeeSat; - this.worstChainFee = worstCaseChainFeeSat; + this.executionFee = Big(totalExecutionFeeSat); + this.worstChainFee = Big(worstCaseChainFeeSat); this.quoteLoading = false; }); } @@ -276,8 +279,8 @@ export default class OrderFormView { fetchQuote() { if (!this.isValid) { runInAction(() => { - this.executionFee = 0; - this.worstChainFee = 0; + this.executionFee = Big(0); + this.worstChainFee = Big(0); this.quoteLoading = false; }); return; @@ -303,11 +306,11 @@ export default class OrderFormView { ); runInAction(() => { if (nonce) { - this.amount = 0; - this.premium = 0; + this.amount = Big(0); + this.premium = Big(0); this.duration = 0; - this.executionFee = 0; - this.worstChainFee = 0; + this.executionFee = Big(0); + this.worstChainFee = Big(0); // persist the additional options so they can be used for future orders this._store.settingsStore.setOrderSettings( this.minChanSize, diff --git a/app/src/store/views/renewAccountView.ts b/app/src/store/views/renewAccountView.ts index c1853546..3a33efee 100644 --- a/app/src/store/views/renewAccountView.ts +++ b/app/src/store/views/renewAccountView.ts @@ -1,4 +1,5 @@ import { makeAutoObservable } from 'mobx'; +import Big from 'big.js'; import { Store } from 'store'; // default expiration to ~90 days From 7780c949db8d7d040e4ba51c630771d44382d381 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:38:08 -0400 Subject: [PATCH 07/10] util: update types in the util functions --- app/src/util/bigmath.ts | 14 +- app/src/util/tests/sampleData.ts | 312 +++++++++++++++---------------- 2 files changed, 159 insertions(+), 167 deletions(-) diff --git a/app/src/util/bigmath.ts b/app/src/util/bigmath.ts index b23805b6..e3a1b661 100644 --- a/app/src/util/bigmath.ts +++ b/app/src/util/bigmath.ts @@ -11,10 +11,7 @@ import Big from 'big.js'; export const percentage = (portion: Big, whole: Big, decimals = 0): number => { if (whole.eq(0)) return 0; - // needed because RoundingMode.RoundDown is a `const enum` which we cannot use - // with '--isolatedModules' - const roundDown = 0; - return +portion.mul(100).div(whole).round(decimals, roundDown); + return +portion.mul(100).div(whole).round(decimals, Big.roundDown); }; /** @@ -35,11 +32,6 @@ export const toBasisPoints = (value: number) => Math.round(toPercent(value) * 10 * @param premium the premium being paid for the loan * @param termInDays the term of the loan in days */ -export const annualPercentRate = ( - principal: number, - premium: number, - termInDays: number, -) => { - const apr = (premium / principal / termInDays) * 365; - return apr; +export const annualPercentRate = (principal: Big, premium: Big, termInDays: number) => { + return +premium.div(principal).div(termInDays).mul(365); }; diff --git a/app/src/util/tests/sampleData.ts b/app/src/util/tests/sampleData.ts index ea2a7033..9f186834 100644 --- a/app/src/util/tests/sampleData.ts +++ b/app/src/util/tests/sampleData.ts @@ -20,7 +20,7 @@ export const lndGetInfo: LND.GetInfoResponse.AsObject = { numPeers: 1, blockHeight: 185, blockHash: '547d3dcfb7d56532bed2efdeea0d400f11167b34d493bcd45fedb21f2ef7ed43', - bestHeaderTimestamp: 1586548672, + bestHeaderTimestamp: '1586548672', syncedToChain: false, syncedToGraph: true, testnet: false, @@ -63,18 +63,18 @@ export const lndGetNodeInfo: Required = { pubKey: '037136742c67e24681f36542f7c8916aa6f6fdf665c1dca2a107425503cff94501', }, numChannels: 3, - totalCapacity: 47000000, + totalCapacity: '47000000', }; export const lndChannelBalance: LND.ChannelBalanceResponse.AsObject = { - balance: 9990950, - pendingOpenBalance: 0, + balance: '9990950', + pendingOpenBalance: '0', }; export const lndWalletBalance: LND.WalletBalanceResponse.AsObject = { - totalBalance: 84992363, - confirmedBalance: 84992363, - unconfirmedBalance: 0, + totalBalance: '84992363', + confirmedBalance: '84992363', + unconfirmedBalance: '0', accountBalanceMap: [], }; @@ -85,39 +85,39 @@ export const lndChannel: LND.Channel.AsObject = { remotePubkey: '037136742c67e24681f36542f7c8916aa6f6fdf665c1dca2a107425503cff94501', channelPoint: `${txId}:${outIndex}`, chanId: '124244814004224', - capacity: 15000000, - localBalance: 9988660, - remoteBalance: 4501409, - commitFee: 11201, - commitWeight: 896, - feePerKw: 12500, - unsettledBalance: 498730, - totalSatoshisSent: 1338, - totalSatoshisReceived: 499929, - numUpdates: 6, + capacity: '15000000', + localBalance: '9988660', + remoteBalance: '4501409', + commitFee: '11201', + commitWeight: '896', + feePerKw: '12500', + unsettledBalance: '498730', + totalSatoshisSent: '1338', + totalSatoshisReceived: '499929', + numUpdates: '6', pendingHtlcsList: [ { incoming: false, - amount: 498730, + amount: '498730', hashLock: 'pl8fmsyoSqEQFQCw6Zu9e1aIlFnMz5H+hW2mmh3kRlI=', expirationHeight: 285, - htlcIndex: 0, - forwardingChannel: 124244814004224, - forwardingHtlcIndex: 0, + htlcIndex: '0', + forwardingChannel: '124244814004224', + forwardingHtlcIndex: '0', }, ], csvDelay: 1802, pb_private: false, initiator: true, chanStatusFlags: 'ChanStatusDefault', - localChanReserveSat: 150000, - remoteChanReserveSat: 150000, + localChanReserveSat: '150000', + remoteChanReserveSat: '150000', staticRemoteKey: true, commitmentType: LND.CommitmentType.STATIC_REMOTE_KEY, - lifetime: 21802, - uptime: 21802, + lifetime: '21802', + uptime: '21802', closeAddress: '', - pushAmountSat: 5000000, + pushAmountSat: '5000000', thawHeight: 0, }; @@ -133,10 +133,10 @@ export const lndListChannelsMany: LND.ListChannelsResponse.AsObject = { chanId: `${i || ''}${c.chanId}`, channelPoint: `${c.channelPoint.substring(0, c.channelPoint.length - 2)}:${i}`, remotePubkey: `${i || ''}${c.remotePubkey}`, - localBalance: local, - remoteBalance: cap - local, - capacity: cap, - uptime: Math.floor(Math.random() * (c.lifetime / 2)) + c.lifetime / 2, + localBalance: `${local}`, + remoteBalance: `${cap - local}`, + capacity: `${cap}`, + uptime: `${Math.floor(Math.random() * (+c.lifetime / 2)) + +c.lifetime / 2}`, }; }), }; @@ -146,29 +146,29 @@ export const lndListChannels: LND.ListChannelsResponse.AsObject = { }; export const lndPendingChannel: LND.PendingChannelsResponse.PendingChannel.AsObject = { - capacity: 500000, + capacity: '500000', channelPoint: '987da7ae4e56a30ee841edc5a4ccf61112e98bce7d4acfdf8e71a670296d16a7:0', commitmentType: 1, initiator: 2, - localBalance: 0, - localChanReserveSat: 5000, - remoteBalance: 490950, - remoteChanReserveSat: 5000, + localBalance: '0', + localChanReserveSat: '5000', + remoteBalance: '490950', + remoteChanReserveSat: '5000', remoteNodePub: '03bb934930cdcd25576aa61d08cc95214e0036f1219c435c06976e561558703290', }; export const lndPendingChannels: LND.PendingChannelsResponse.AsObject = { - totalLimboBalance: 0, + totalLimboBalance: '0', pendingOpenChannelsList: [ { channel: { ...lndPendingChannel, channelPoint: lndListChannels.channelsList[0].channelPoint, }, - commitFee: 9050, - commitWeight: 552, + commitFee: '9050', + commitWeight: '552', confirmationHeight: 0, - feePerKw: 12500, + feePerKw: '12500', }, ], pendingClosingChannelsList: [ @@ -187,14 +187,14 @@ export const lndPendingChannels: LND.PendingChannelsResponse.AsObject = { channelPoint: lndListChannels.channelsList[2].channelPoint, }, commitments: { - localCommitFeeSat: 9050, + localCommitFeeSat: '9050', localTxid: 'fe65f668a1efe1c088b0e7d44abb707cb0171ebbbe43e8f6bb985a98643f1672', - remoteCommitFeeSat: 9050, - remotePendingCommitFeeSat: 0, + remoteCommitFeeSat: '9050', + remotePendingCommitFeeSat: '0', remotePendingTxid: '', remoteTxid: '9850a4b1cfcfbf972f8541b26b8061ed3091ee8cbed5875167080be4be9524e7', }, - limboBalance: 0, + limboBalance: '0', }, ], pendingForceClosingChannelsList: [ @@ -206,10 +206,10 @@ export const lndPendingChannels: LND.PendingChannelsResponse.AsObject = { anchor: 0, blocksTilMaturity: 142, closingTxid: '6c151252215b73547a5415051c82dd25c725c4309b93fed4f38c4c5b610c3fb0', - limboBalance: 990950, + limboBalance: '990950', maturityHeight: 440, pendingHtlcsList: [], - recoveredBalance: 0, + recoveredBalance: '0', }, ], }; @@ -219,7 +219,7 @@ export const lndChannelEvent: Required = { type: LND.ChannelEventUpdate.UpdateType.OPEN_CHANNEL, openChannel: lndChannel, closedChannel: { - capacity: 15000000, + capacity: '15000000', chainHash: '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206', chanId: lndChannel.chanId, channelPoint: lndChannel.channelPoint, @@ -227,8 +227,8 @@ export const lndChannelEvent: Required = { closeType: 0, closingTxHash: '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b', remotePubkey: '030e98fdacf2464bdfb027b866a018d6cdc5108514208988873abea7eff59afd91', - settledBalance: 12990950, - timeLockedBalance: 0, + settledBalance: '12990950', + timeLockedBalance: '0', openInitiator: 1, closeInitiator: 1, resolutionsList: [], @@ -250,7 +250,7 @@ export const lndChannelEvent: Required = { }; export const lndTransaction: LND.Transaction.AsObject = { - amount: 12990950, + amount: '12990950', blockHash: '', blockHeight: 0, destAddressesList: [ @@ -260,8 +260,8 @@ export const lndTransaction: LND.Transaction.AsObject = { numConfirmations: 0, rawTxHex: '02000000000101a8e7e18989480f10638b5ff610cf4b9f1e850498f27351e29161ac7058e4e46e0000000000ffffffff0280841e000000000016001440d80dab5140fb45bd58632c6d84b453c76ece6fe639c60000000000160014b2106d044df68f79e830c517b7718cae1531302d040047304402207e17f9938f04a2379300a5c0f37305c902855fa000726bb7f0ad78d084acfcee02206d3da5edd73624d6ecfa27ae61e994e75bd0ad8cca6c9b7dda087bcf34b2bbbc0148304502210086d0b7e77b1d81f210d55bc13f9eef975774ac1509a22ff649bd2baac85b3fd702203bb272d6372450159b89ca41d97efbf6bdac076bc271696a1bd556efc31b5cda01475221028d084ada5554c83421bfac35bc78332f3c1f6ae980dea1e0eb3220411b7b83972103c60b39c8558f280fe2f0dfa7cb6a04f016470c4670e631458b400774a667610052ae00000000', - timeStamp: 1591226124, - totalFees: 0, + timeStamp: '1591226124', + totalFees: '0', txHash: '1f765f45f2a6d33837a203e3fc911915c891e9b86f9c9d91a1931b92efdedf5b', label: '', }; @@ -272,23 +272,23 @@ export const lndGetChanInfo: Required = { lastUpdate: 1591622793, node1Pub: lndGetInfo.identityPubkey, node2Pub: '021626ad63f6876f2baa6000739312690b027ec289b9d1bf9184f3194e8c923dad', - capacity: 1800000, + capacity: '1800000', node1Policy: { timeLockDelta: 3000, - minHtlc: 1000, - feeBaseMsat: 3000, - feeRateMilliMsat: 300, + minHtlc: '1000', + feeBaseMsat: '3000', + feeRateMilliMsat: '300', disabled: false, - maxHtlcMsat: 1782000000, + maxHtlcMsat: '1782000000', lastUpdate: 1591622793, }, node2Policy: { timeLockDelta: 40, - minHtlc: 1000, - feeBaseMsat: 1000, - feeRateMilliMsat: 1, + minHtlc: '1000', + feeBaseMsat: '1000', + feeRateMilliMsat: '1', disabled: false, - maxHtlcMsat: 1782000000, + maxHtlcMsat: '1782000000', lastUpdate: 1591622772, }, }; @@ -299,49 +299,49 @@ export const lndGetChanInfo: Required = { export const loopListSwaps: LOOP.ListSwapsResponse.AsObject = { swapsList: [...Array(7)].map((x, i) => ({ - amt: 500000 + i * 5000, + amt: `${500000 + i * 5000}`, id: `f4eb118383c2b09d8c7289ce21c25900cfb4545d46c47ed23a31ad2aa57ce83${i}`, idBytes: '9OsRg4PCsJ2MconOIcJZAM+0VF1GxH7SOjGtKqV86DU=', type: (i % 3) as LOOP.SwapStatus.AsObject['type'], state: i % 2 ? LOOP.SwapState.SUCCESS : LOOP.SwapState.FAILED, failureReason: (i % 2 === 0 ? 0 : i % 7) as LOOP.SwapStatus.AsObject['failureReason'], - initiationTime: 1586390353623905000 + i * 100000000000000, - lastUpdateTime: 1586398369729857000 + i * 200000000000000, + initiationTime: `${1586390353623905000 + i * 100000000000000}`, + lastUpdateTime: `${1586398369729857000 + i * 200000000000000}`, htlcAddress: 'bcrt1qzu4077erkr78k52yuf2rwkk6ayr6m3wtazdfz2qqmd7taa5vvy9s5d75gd', htlcAddressP2wsh: 'bcrt1qzu4077erkr78k52yuf2rwkk6ayr6m3wtazdfz2qqmd7taa5vvy9s5d75gd', htlcAddressNp2wsh: '', - costServer: 66, - costOnchain: 6812, - costOffchain: 2, + costServer: '66', + costOnchain: '6812', + costOffchain: '2', label: `Sample Swap #${i + 1}`, })), }; export const loopOutTerms: LOOP.OutTermsResponse.AsObject = { - minSwapAmount: 250000, - maxSwapAmount: 1000000, + minSwapAmount: '250000', + maxSwapAmount: '1000000', minCltvDelta: 20, maxCltvDelta: 60, }; export const loopInTerms: LOOP.InTermsResponse.AsObject = { - minSwapAmount: 250000, - maxSwapAmount: 1000000, + minSwapAmount: '250000', + maxSwapAmount: '1000000', }; export const loopOutQuote: LOOP.OutQuoteResponse.AsObject = { cltvDelta: 50, - htlcSweepFeeSat: 7387, - prepayAmtSat: 1337, - swapFeeSat: 83, + htlcSweepFeeSat: '7387', + prepayAmtSat: '1337', + swapFeeSat: '83', swapPaymentDest: 'Au1a9/hEsbxHUOwFC1QwxZq6EnnKYtpAdc74OZK8/syU', confTarget: 6, }; export const loopInQuote: LOOP.InQuoteResponse.AsObject = { cltvDelta: 50, - htlcPublishFeeSat: 7387, - swapFeeSat: 83, + htlcPublishFeeSat: '7387', + swapFeeSat: '83', confTarget: 6, }; @@ -359,7 +359,7 @@ export const loopSwapResponse: LOOP.SwapResponse.AsObject = { // export const poolInitAccount: POOL.Account.AsObject = { - availableBalance: 10000000, + availableBalance: '10000000', latestTxid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', expirationHeight: 4334, outpoint: { @@ -368,12 +368,12 @@ export const poolInitAccount: POOL.Account.AsObject = { }, state: POOL.AccountState.OPEN, traderKey: 'Ap+9XjK2X8EOrmAJvcvWS1B9jt3xLYka0S7aMru0Bude', - value: 30000000, + value: '30000000', }; export const poolQuoteAccount: POOL.QuoteAccountResponse.AsObject = { - minerFeeRateSatPerKw: 12500, - minerFeeTotal: 7650, + minerFeeRateSatPerKw: '12500', + minerFeeTotal: '7650', }; export const poolCloseAccount: POOL.CloseAccountResponse.AsObject = { @@ -389,7 +389,7 @@ export const poolListAccounts: POOL.ListAccountsResponse.AsObject = { accountsList: [ poolInitAccount, { - availableBalance: 15000000, + availableBalance: '15000000', latestTxid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', expirationHeight: 4331, outpoint: { @@ -398,10 +398,10 @@ export const poolListAccounts: POOL.ListAccountsResponse.AsObject = { }, state: POOL.AccountState.OPEN, traderKey: 'A1XCKczWrUUjZg4rmtYoQnji2mGEyLxM8FvIPZ9ZnRCk', - value: 15000000, + value: '15000000', }, { - availableBalance: 7773185, + availableBalance: '7773185', latestTxid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=', expirationHeight: 4328, outpoint: { @@ -410,7 +410,7 @@ export const poolListAccounts: POOL.ListAccountsResponse.AsObject = { }, state: POOL.AccountState.OPEN, traderKey: 'A9Mua6d2a+1NZZ8knxJ/XtE3VENxQO4erD9Y3igCmH9q', - value: 10000000, + value: '10000000', }, ], }; @@ -429,7 +429,7 @@ export const poolWithdrawAccount: Required Date: Thu, 15 Jul 2021 21:38:43 -0400 Subject: [PATCH 08/10] ui: update types in the React components --- app/src/components/pool/OrderFormSection.tsx | 9 ++++----- app/src/components/pool/account/FundNewAccountForm.tsx | 2 +- app/src/components/pool/batches/BatchStats.tsx | 2 +- app/src/components/pool/orders/OrdersList.tsx | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/components/pool/OrderFormSection.tsx b/app/src/components/pool/OrderFormSection.tsx index 3014a8b7..0bd2fb01 100644 --- a/app/src/components/pool/OrderFormSection.tsx +++ b/app/src/components/pool/OrderFormSection.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { observer } from 'mobx-react-lite'; import { LeaseDuration } from 'types/state'; import styled from '@emotion/styled'; -import Big from 'big.js'; import { usePrefixedTranslation } from 'hooks'; import { Unit, Units } from 'util/constants'; import { useStore } from 'store'; @@ -110,7 +109,7 @@ const OrderFormSection: React.FC = () => { label={l(`amountLabel${orderFormView.orderType}`)} placeholder={l('amountPlaceholder')} extra={Units[Unit.sats].suffix} - value={orderFormView.amount} + value={orderFormView.amount.toNumber()} onChange={orderFormView.setAmount} /> @@ -121,7 +120,7 @@ const OrderFormSection: React.FC = () => { @@ -194,7 +193,7 @@ const OrderFormSection: React.FC = () => { {orderFormView.quoteLoading ? ( ) : ( - + )} @@ -207,7 +206,7 @@ const OrderFormSection: React.FC = () => { {orderFormView.quoteLoading ? ( ) : ( - + )} diff --git a/app/src/components/pool/account/FundNewAccountForm.tsx b/app/src/components/pool/account/FundNewAccountForm.tsx index e128ff45..563cb7a4 100644 --- a/app/src/components/pool/account/FundNewAccountForm.tsx +++ b/app/src/components/pool/account/FundNewAccountForm.tsx @@ -35,7 +35,7 @@ const FundNewAccountForm: React.FC = () => { label={l(`amountLabel`)} placeholder={l('amountPlaceholder')} extra={Units[Unit.sats].suffix} - value={fundNewAccountView.amount} + value={fundNewAccountView.amount.toNumber()} onChange={fundNewAccountView.setAmount} /> diff --git a/app/src/components/pool/batches/BatchStats.tsx b/app/src/components/pool/batches/BatchStats.tsx index 0dbd03a2..776a6720 100644 --- a/app/src/components/pool/batches/BatchStats.tsx +++ b/app/src/components/pool/batches/BatchStats.tsx @@ -61,7 +61,7 @@ const BatchStats: React.FC = () => {
- {order.duration} + {order.duration.toNumber()} {order.basisPoints} {order.stateWithCount} From ef447abdb1197843b59e6cdd4c92c5b751eb2f55 Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:39:00 -0400 Subject: [PATCH 09/10] test: update types in the unit tests --- .../components/loop/LoopPage.spec.tsx | 5 +++-- .../components/loop/ProcessingSwaps.spec.tsx | 3 ++- .../components/pool/AccountSection.spec.tsx | 8 +++---- .../components/pool/BatchStats.spec.tsx | 3 ++- .../components/pool/OrderFormSection.spec.tsx | 12 +++++----- app/src/__tests__/store/accountStore.spec.ts | 20 ++++++++++------- app/src/__tests__/store/buildSwapView.spec.ts | 19 ++++++++++------ app/src/__tests__/store/channelStore.spec.ts | 16 ++++++++------ app/src/__tests__/store/nodeStore.spec.ts | 10 ++++----- app/src/__tests__/store/orderStore.spec.ts | 22 +++++++++++++++---- 10 files changed, 73 insertions(+), 45 deletions(-) diff --git a/app/src/__tests__/components/loop/LoopPage.spec.tsx b/app/src/__tests__/components/loop/LoopPage.spec.tsx index e774d0a4..819dd242 100644 --- a/app/src/__tests__/components/loop/LoopPage.spec.tsx +++ b/app/src/__tests__/components/loop/LoopPage.spec.tsx @@ -3,6 +3,7 @@ import { runInAction } from 'mobx'; import { SwapStatus } from 'types/generated/loop_pb'; import { grpc } from '@improbable-eng/grpc-web'; import { fireEvent, waitFor } from '@testing-library/react'; +import Big from 'big.js'; import { saveAs } from 'file-saver'; import { formatSats } from 'util/formatters'; import { renderWithProviders } from 'util/tests'; @@ -70,9 +71,9 @@ describe('LoopPage component', () => { const { findByText } = render(); // convert from numeric timestamp to string (1586390353623905000 -> '4/15/2020') const formatDate = (s: SwapStatus.AsObject) => - new Date(s.initiationTime / 1000 / 1000).toLocaleDateString(); + new Date(+Big(s.initiationTime).div(1000).div(1000)).toLocaleDateString(); const [swap1, swap2] = loopListSwaps.swapsList.sort( - (a, b) => b.initiationTime - a.initiationTime, + (a, b) => +Big(b.initiationTime).sub(a.initiationTime), ); expect(await findByText(formatDate(swap1))).toBeInTheDocument(); diff --git a/app/src/__tests__/components/loop/ProcessingSwaps.spec.tsx b/app/src/__tests__/components/loop/ProcessingSwaps.spec.tsx index 5108f3c9..648f104c 100644 --- a/app/src/__tests__/components/loop/ProcessingSwaps.spec.tsx +++ b/app/src/__tests__/components/loop/ProcessingSwaps.spec.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { runInAction } from 'mobx'; import * as LOOP from 'types/generated/loop_pb'; import { fireEvent } from '@testing-library/react'; +import Big from 'big.js'; import { renderWithProviders } from 'util/tests'; import { loopListSwaps } from 'util/tests/sampleData'; import { createStore, Store } from 'store'; @@ -27,7 +28,7 @@ describe('ProcessingSwaps component', () => { swap.id = `${id || ''}${swap.id}`; swap.type = type; swap.state = state; - swap.lastUpdateTime = Date.now() * 1000 * 1000; + swap.lastUpdateTime = Big(Date.now() * 1000 * 1000); runInAction(() => { store.swapStore.swaps.set(swap.id, swap); }); diff --git a/app/src/__tests__/components/pool/AccountSection.spec.tsx b/app/src/__tests__/components/pool/AccountSection.spec.tsx index 0d057af7..c7c33a1e 100644 --- a/app/src/__tests__/components/pool/AccountSection.spec.tsx +++ b/app/src/__tests__/components/pool/AccountSection.spec.tsx @@ -117,7 +117,7 @@ describe('AccountSection', () => { }); expect(store.accountStore.activeTraderKey).toBe(hex(poolInitAccount.traderKey)); - expect(store.fundNewAccountView.amount).toBe(0); + expect(+store.fundNewAccountView.amount).toBe(0); expect(store.fundNewAccountView.confTarget).toBe(DEFAULT_CONF_TARGET); expect(store.fundNewAccountView.expireBlocks).toBe(DEFAULT_EXPIRE_BLOCKS); }); @@ -206,7 +206,7 @@ describe('AccountSection', () => { expect(getByText('Account')).toBeInTheDocument(); }); - expect(+store.accountStore.activeAccount.totalBalance).toBe( + expect(store.accountStore.activeAccount.totalBalance.toString()).toBe( poolDepositAccount.account.value, ); expect(store.fundAccountView.amount).toBe(0); @@ -322,7 +322,7 @@ describe('AccountSection', () => { }); expect(req!.traderKey).toBe(b64(store.accountStore.activeAccount.traderKey)); - expect(req!.outputWithFee?.feeRateSatPerKw).toBe(2500); + expect(req!.outputWithFee?.feeRateSatPerKw).toBe('2500'); expect(req!.outputWithFee?.address).toBe('abc123'); }); @@ -375,7 +375,7 @@ describe('AccountSection', () => { }); expect(req!.accountKey).toBe(b64(store.accountStore.activeAccount.traderKey)); - expect(req!.feeRateSatPerKw).toBe(31250); + expect(req!.feeRateSatPerKw).toBe('31250'); expect(req!.relativeExpiry).toBe(2016); }); }); diff --git a/app/src/__tests__/components/pool/BatchStats.spec.tsx b/app/src/__tests__/components/pool/BatchStats.spec.tsx index d45c4e3e..71a9547f 100644 --- a/app/src/__tests__/components/pool/BatchStats.spec.tsx +++ b/app/src/__tests__/components/pool/BatchStats.spec.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { runInAction } from 'mobx'; import { act, waitFor } from '@testing-library/react'; +import Big from 'big.js'; import { formatSats } from 'util/formatters'; import { renderWithProviders } from 'util/tests'; import { createStore, Store } from 'store'; @@ -25,7 +26,7 @@ describe('BatchStats', () => { jest.useFakeTimers(); runInAction(() => { const nowSecs = Math.ceil(Date.now() / 1000); - store.batchStore.nextBatchTimestamp = nowSecs + 90; + store.batchStore.nextBatchTimestamp = Big(nowSecs + 90); }); const { getByText } = render(); expect(getByText('Next Batch')).toBeInTheDocument(); diff --git a/app/src/__tests__/components/pool/OrderFormSection.spec.tsx b/app/src/__tests__/components/pool/OrderFormSection.spec.tsx index d82149a1..3bd66001 100644 --- a/app/src/__tests__/components/pool/OrderFormSection.spec.tsx +++ b/app/src/__tests__/components/pool/OrderFormSection.spec.tsx @@ -71,12 +71,12 @@ describe('OrderFormSection', () => { }); fireEvent.click(getByText('Place Bid Order')); - expect(bid!.details.amt).toBe(1000000); + expect(bid!.details.amt).toBe('1000000'); expect(bid!.details.rateFixed).toBe(4960); expect(bid!.details.minUnitsMatch).toBe(1); expect(bid!.leaseDurationBlocks).toBe(2016); expect(bid!.minNodeTier).toBe(1); - expect(bid!.details.maxBatchFeeRateSatPerKw).toBe(253); + expect(bid!.details.maxBatchFeeRateSatPerKw).toBe('253'); }); it('should submit an ask order', async () => { @@ -95,11 +95,11 @@ describe('OrderFormSection', () => { }); fireEvent.click(getByText('Place Ask Order')); - expect(ask!.details.amt).toBe(1000000); + expect(ask!.details.amt).toBe('1000000'); expect(ask!.details.rateFixed).toBe(4960); expect(ask!.details.minUnitsMatch).toBe(1); expect(ask!.leaseDurationBlocks).toBe(2016); - expect(ask!.details.maxBatchFeeRateSatPerKw).toBe(253); + expect(ask!.details.maxBatchFeeRateSatPerKw).toBe('253'); }); it('should submit an order with a different lease duration', async () => { @@ -119,12 +119,12 @@ describe('OrderFormSection', () => { }); fireEvent.click(getByText('Place Bid Order')); - expect(bid!.details.amt).toBe(1000000); + expect(bid!.details.amt).toBe('1000000'); expect(bid!.details.rateFixed).toBe(2480); expect(bid!.details.minUnitsMatch).toBe(1); expect(bid!.leaseDurationBlocks).toBe(4032); expect(bid!.minNodeTier).toBe(1); - expect(bid!.details.maxBatchFeeRateSatPerKw).toBe(253); + expect(bid!.details.maxBatchFeeRateSatPerKw).toBe('253'); }); it('should reset the form after placing an order', async () => { diff --git a/app/src/__tests__/store/accountStore.spec.ts b/app/src/__tests__/store/accountStore.spec.ts index ee55afd1..57ac1e53 100644 --- a/app/src/__tests__/store/accountStore.spec.ts +++ b/app/src/__tests__/store/accountStore.spec.ts @@ -46,8 +46,8 @@ describe('AccountStore', () => { }); it('should return sorted accounts', async () => { - const a = new Account(rootStore, { ...poolInitAccount, value: 300 }); - const b = new Account(rootStore, { ...poolInitAccount, value: 100 }); + const a = new Account(rootStore, { ...poolInitAccount, value: '300' }); + const b = new Account(rootStore, { ...poolInitAccount, value: '100' }); const c = new Account(rootStore, { ...poolInitAccount, expirationHeight: 5000, @@ -76,8 +76,8 @@ describe('AccountStore', () => { }); it('should excluded closed accounts in sorted accounts', async () => { - const a = new Account(rootStore, { ...poolInitAccount, value: 300 }); - const b = new Account(rootStore, { ...poolInitAccount, value: 100 }); + const a = new Account(rootStore, { ...poolInitAccount, value: '300' }); + const b = new Account(rootStore, { ...poolInitAccount, value: '100' }); const c = new Account(rootStore, { ...poolInitAccount, expirationHeight: 5000, @@ -158,7 +158,7 @@ describe('AccountStore', () => { it('should create a new Account', async () => { expect(store.accounts.size).toEqual(0); - await store.createAccount(3000000, 4032); + await store.createAccount(Big(3000000), 4032); expect(store.accounts.size).toEqual(1); expect(store.activeAccount).toBeDefined(); }); @@ -168,7 +168,7 @@ describe('AccountStore', () => { throw new Error('test-err'); }); expect(rootStore.appView.alerts.size).toBe(0); - await store.createAccount(3000000, 4032); + await store.createAccount(Big(3000000), 4032); await waitFor(() => { expect(rootStore.appView.alerts.size).toBe(1); expect(values(rootStore.appView.alerts)[0].message).toBe('test-err'); @@ -216,7 +216,9 @@ describe('AccountStore', () => { it('should deposit funds into an account', async () => { await store.fetchAccounts(); const txid = await store.deposit(1); - expect(+store.activeAccount.totalBalance).toBe(poolDepositAccount.account?.value); + expect(store.activeAccount.totalBalance.toString()).toBe( + poolDepositAccount.account?.value, + ); expect(txid).toEqual(poolDepositAccount.depositTxid); }); @@ -236,7 +238,9 @@ describe('AccountStore', () => { it('should withdraw funds from an account', async () => { await store.fetchAccounts(); const txid = await store.withdraw(1); - expect(+store.activeAccount.totalBalance).toBe(poolWithdrawAccount.account?.value); + expect(store.activeAccount.totalBalance.toString()).toBe( + poolWithdrawAccount.account?.value, + ); expect(txid).toEqual(poolWithdrawAccount.withdrawTxid); }); diff --git a/app/src/__tests__/store/buildSwapView.spec.ts b/app/src/__tests__/store/buildSwapView.spec.ts index c03a1f86..c96e6b0f 100644 --- a/app/src/__tests__/store/buildSwapView.spec.ts +++ b/app/src/__tests__/store/buildSwapView.spec.ts @@ -111,15 +111,15 @@ describe('BuildSwapView', () => { }); it('should ensure amount is greater than the min terms', async () => { - store.setAmount(Big(loopInTerms.minSwapAmount - 100)); + store.setAmount(Big(loopInTerms.minSwapAmount).sub(100)); await store.getTerms(); - expect(+store.amountForSelected).toBe(loopInTerms.minSwapAmount); + expect(store.amountForSelected.toString()).toBe(loopInTerms.minSwapAmount); }); it('should ensure amount is less than the max terms', async () => { store.setAmount(Big(loopInTerms.maxSwapAmount + 100)); await store.getTerms(); - expect(+store.amountForSelected).toBe(loopInTerms.maxSwapAmount); + expect(store.amountForSelected.toString()).toBe(loopInTerms.maxSwapAmount); }); it('should validate the conf target', async () => { @@ -293,7 +293,7 @@ describe('BuildSwapView', () => { store.setDirection(SwapDirection.OUT); store.setAmount(Big(600)); - let deadline = 0; + let deadline = ''; // mock the grpc unary function in order to capture the supplied deadline // passed in with the API request injectIntoGrpcUnary((desc, props) => { @@ -303,7 +303,7 @@ describe('BuildSwapView', () => { // run a loop on mainnet and verify the deadline rootStore.nodeStore.network = 'mainnet'; store.requestSwap(); - await waitFor(() => expect(deadline).toBeGreaterThan(0)); + await waitFor(() => expect(+deadline).toBeGreaterThan(0)); // inject again for the next swap injectIntoGrpcUnary((desc, props) => { @@ -313,7 +313,7 @@ describe('BuildSwapView', () => { // run a loop on regtest and verify the deadline rootStore.nodeStore.network = 'regtest'; store.requestSwap(); - await waitFor(() => expect(deadline).toEqual(0)); + await waitFor(() => expect(+deadline).toEqual(0)); }); it('should handle errors when performing a loop', async () => { @@ -370,7 +370,12 @@ describe('BuildSwapView', () => { describe('min/max swap limits', () => { const addChannel = (capacity: number, localBalance: number) => { const remoteBalance = capacity - localBalance; - const lndChan = { ...lndChannel, capacity, localBalance, remoteBalance }; + const lndChan = { + ...lndChannel, + capacity: `${capacity}`, + localBalance: `${localBalance}`, + remoteBalance: `${remoteBalance}`, + }; const channel = Channel.create(rootStore, lndChan); channel.chanId = `${channel.chanId}${rootStore.channelStore.channels.size}`; channel.remotePubkey = `${channel.remotePubkey}${rootStore.channelStore.channels.size}`; diff --git a/app/src/__tests__/store/channelStore.spec.ts b/app/src/__tests__/store/channelStore.spec.ts index 429dc0ac..64bdd558 100644 --- a/app/src/__tests__/store/channelStore.spec.ts +++ b/app/src/__tests__/store/channelStore.spec.ts @@ -134,21 +134,21 @@ describe('ChannelStore', () => { it('should compute inbound liquidity', async () => { await store.fetchChannels(); const inbound = lndListChannels.channelsList.reduce( - (sum, chan) => sum + chan.remoteBalance, - 0, + (sum, chan) => sum.plus(chan.remoteBalance), + Big(0), ); - expect(+store.totalInbound).toBe(inbound); + expect(+store.totalInbound).toBe(+inbound); }); it('should compute outbound liquidity', async () => { await store.fetchChannels(); const outbound = lndListChannels.channelsList.reduce( - (sum, chan) => sum + chan.localBalance, - 0, + (sum, chan) => sum.plus(chan.localBalance), + Big(0), ); - expect(+store.totalOutbound).toBe(outbound); + expect(+store.totalOutbound).toBe(+outbound); }); it('should fetch aliases for channels', async () => { @@ -189,7 +189,9 @@ describe('ChannelStore', () => { expect(channel.remoteFeeRate).toBe(0); // the alias is fetched from the API and should be updated after a few ticks await waitFor(() => { - expect(channel.remoteFeeRate).toBe(lndGetChanInfo.node1Policy.feeRateMilliMsat); + expect(channel.remoteFeeRate.toString()).toBe( + lndGetChanInfo.node1Policy.feeRateMilliMsat, + ); }); }); diff --git a/app/src/__tests__/store/nodeStore.spec.ts b/app/src/__tests__/store/nodeStore.spec.ts index e525f36e..fd964508 100644 --- a/app/src/__tests__/store/nodeStore.spec.ts +++ b/app/src/__tests__/store/nodeStore.spec.ts @@ -49,8 +49,8 @@ describe('NodeStore', () => { expect(+store.wallet.channelBalance).toBe(0); expect(+store.wallet.walletBalance).toBe(0); await store.fetchBalances(); - expect(+store.wallet.channelBalance).toEqual(lndChannelBalance.balance); - expect(+store.wallet.walletBalance).toEqual(lndWalletBalance.totalBalance); + expect(store.wallet.channelBalance.toString()).toEqual(lndChannelBalance.balance); + expect(store.wallet.walletBalance.toString()).toEqual(lndWalletBalance.totalBalance); }); it('should handle errors fetching balances', async () => { @@ -69,14 +69,14 @@ describe('NodeStore', () => { it('should handle a transaction event', () => { expect(+store.wallet.walletBalance).toBe(0); store.onTransaction(lndTransaction); - expect(+store.wallet.walletBalance).toBe(lndTransaction.amount); + expect(store.wallet.walletBalance.toString()).toBe(lndTransaction.amount); }); it('should handle duplicate transaction events', () => { expect(+store.wallet.walletBalance).toBe(0); store.onTransaction(lndTransaction); - expect(+store.wallet.walletBalance).toBe(lndTransaction.amount); + expect(store.wallet.walletBalance.toString()).toBe(lndTransaction.amount); store.onTransaction(lndTransaction); - expect(+store.wallet.walletBalance).toBe(lndTransaction.amount); + expect(store.wallet.walletBalance.toString()).toBe(lndTransaction.amount); }); }); diff --git a/app/src/__tests__/store/orderStore.spec.ts b/app/src/__tests__/store/orderStore.spec.ts index 19323b09..83134a44 100644 --- a/app/src/__tests__/store/orderStore.spec.ts +++ b/app/src/__tests__/store/orderStore.spec.ts @@ -75,13 +75,27 @@ describe('OrderStore', () => { it('should submit an ask order', async () => { await rootStore.accountStore.fetchAccounts(); - const nonce = await store.submitOrder(OrderType.Ask, 100000, 2000, 2016, 100000, 253); + const nonce = await store.submitOrder( + OrderType.Ask, + Big(100000), + 2000, + 2016, + 100000, + 253, + ); expect(nonce).toBe(hex(poolSubmitOrder.acceptedOrderNonce)); }); it('should submit a bid order', async () => { await rootStore.accountStore.fetchAccounts(); - const nonce = await store.submitOrder(OrderType.Bid, 100000, 2000, 2016, 100000, 253); + const nonce = await store.submitOrder( + OrderType.Bid, + Big(100000), + 2000, + 2016, + 100000, + 253, + ); expect(nonce).toBe(hex(poolSubmitOrder.acceptedOrderNonce)); }); @@ -100,14 +114,14 @@ describe('OrderStore', () => { } return undefined as any; }); - await store.submitOrder(OrderType.Bid, 100000, 2000, 2016, 100000, 253); + await store.submitOrder(OrderType.Bid, Big(100000), 2000, 2016, 100000, 253); expect(rootStore.appView.alerts.size).toBe(1); expect(values(rootStore.appView.alerts)[0].message).toBe(poolInvalidOrder.failString); }); it('should throw if the fixed rate rate is too low', async () => { await rootStore.accountStore.fetchAccounts(); - await store.submitOrder(OrderType.Bid, 100000, 0.9, 20000, 100000, 253); + await store.submitOrder(OrderType.Bid, Big(100000), 0.9, 20000, 100000, 253); expect(rootStore.appView.alerts.size).toBe(1); expect(values(rootStore.appView.alerts)[0].message).toMatch(/The rate is too low.*/); }); From 1871f6b5630bd62cf97d65b89462ad8d9e60323b Mon Sep 17 00:00:00 2001 From: jamaljsr <1356600+jamaljsr@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:39:24 -0400 Subject: [PATCH 10/10] stories: update types in the Storybook stories --- app/src/__stories__/ProcessingSwaps.stories.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/__stories__/ProcessingSwaps.stories.tsx b/app/src/__stories__/ProcessingSwaps.stories.tsx index f9bdae29..eef4ffbb 100644 --- a/app/src/__stories__/ProcessingSwaps.stories.tsx +++ b/app/src/__stories__/ProcessingSwaps.stories.tsx @@ -1,6 +1,7 @@ import React, { useEffect } from 'react'; import { observable } from 'mobx'; import * as LOOP from 'types/generated/loop_pb'; +import Big from 'big.js'; import { loopListSwaps } from 'util/tests/sampleData'; import { useStore } from 'store'; import { Swap } from 'store/models'; @@ -47,7 +48,7 @@ const mockSwap = (type: number, state: number, id?: string) => { swap.id = `${id || ''}${swap.id}`; swap.type = type; swap.state = state; - swap.lastUpdateTime = Date.now() * 1000 * 1000; + swap.lastUpdateTime = Big(Date.now() * 1000 * 1000); return swap; }; // create a list of swaps to use for stories @@ -84,7 +85,7 @@ export const LoopInProgress = () => { await delay(2000); swap.state = SUCCESS; await delay(2000); - swap.initiationTime = 0; + swap.initiationTime = Big(0); }; startTransitions(); @@ -106,7 +107,7 @@ export const LoopOutProgress = () => { await delay(2000); swap.state = SUCCESS; await delay(2000); - swap.initiationTime = 0; + swap.initiationTime = Big(0); }; startTransitions();