diff --git a/docker/build.py b/docker/build.py index 73041256..549c32ad 100755 --- a/docker/build.py +++ b/docker/build.py @@ -47,7 +47,7 @@ class Image: C_LIGHTNING_VERSION = "23.08.1" ECLAIR_VERSION = "0.9.0" -LND_VERSION = "0.16.4-beta" +LND_VERSION = "0.17.0-beta" BITCOIN_BUILD_ARG = BuildArgument( name="BITCOIN_VERSION", @@ -101,7 +101,7 @@ class Image: ], ), "regtest": Image( - tags=["4.0.4"], + tags=["4.1.0"], arguments=[ UBUNTU_VERSION, BITCOIN_BUILD_ARG, diff --git a/docker/regtest/startRegtest.sh b/docker/regtest/startRegtest.sh index bb1d4bdd..6e2b9062 100755 --- a/docker/regtest/startRegtest.sh +++ b/docker/regtest/startRegtest.sh @@ -37,7 +37,7 @@ docker run \ -p 31000:31000 \ -p 31001:31001 \ -p 31002:31002 \ - boltz/regtest:4.0.4 + boltz/regtest:4.1.0 docker exec regtest bash -c "cp /root/.lightning/regtest/*.pem /root/.lightning/regtest/certs" docker exec regtest chmod -R 777 /root/.lightning/regtest/certs diff --git a/lib/VersionCheck.ts b/lib/VersionCheck.ts index 0df83aa4..6aee59ea 100644 --- a/lib/VersionCheck.ts +++ b/lib/VersionCheck.ts @@ -83,8 +83,8 @@ class VersionCheck { maximal: '0.0.3', }, [LndClient.serviceName]: { - minimal: '0.15.0', - maximal: '0.16.4', + minimal: '0.16.0', + maximal: '0.17.0', }, }; diff --git a/lib/proto/lnd/rpc_grpc_pb.js b/lib/proto/lnd/rpc_grpc_pb.js index c298e56d..95bb831d 100644 --- a/lib/proto/lnd/rpc_grpc_pb.js +++ b/lib/proto/lnd/rpc_grpc_pb.js @@ -1533,8 +1533,10 @@ signMessage: { responseDeserialize: deserialize_lnrpc_SignMessageResponse, }, // lncli: `verifymessage` -// VerifyMessage verifies a signature over a msg. The signature must be -// zbase32 encoded and signed by an active node in the resident node's +// VerifyMessage verifies a signature over a message and recovers the signer's +// public key. The signature is only deemed valid if the recovered public key +// corresponds to a node key in the public Lightning network. The signature +// must be zbase32 encoded and signed by an active node in the resident node's // channel database. In addition to returning the validity of the signature, // VerifyMessage also returns the recovered pubkey from the signature. verifyMessage: { diff --git a/lib/proto/lnd/rpc_pb.d.ts b/lib/proto/lnd/rpc_pb.d.ts index a87497da..9e049fe6 100644 --- a/lib/proto/lnd/rpc_pb.d.ts +++ b/lib/proto/lnd/rpc_pb.d.ts @@ -1787,6 +1787,8 @@ export class Channel extends jspb.Message { setPeerAlias(value: string): Channel; getPeerScidAlias(): string; setPeerScidAlias(value: string): Channel; + getMemo(): string; + setMemo(value: string): Channel; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Channel.AsObject; @@ -1843,6 +1845,7 @@ export namespace Channel { zeroConfConfirmedScid: number; peerAlias: string; peerScidAlias: string; + memo: string; }; } @@ -3036,6 +3039,28 @@ export class BatchOpenChannel extends jspb.Message { setPendingChanId(value: Uint8Array | string): BatchOpenChannel; getCommitmentType(): CommitmentType; setCommitmentType(value: CommitmentType): BatchOpenChannel; + getRemoteMaxValueInFlightMsat(): number; + setRemoteMaxValueInFlightMsat(value: number): BatchOpenChannel; + getRemoteMaxHtlcs(): number; + setRemoteMaxHtlcs(value: number): BatchOpenChannel; + getMaxLocalCsv(): number; + setMaxLocalCsv(value: number): BatchOpenChannel; + getZeroConf(): boolean; + setZeroConf(value: boolean): BatchOpenChannel; + getScidAlias(): boolean; + setScidAlias(value: boolean): BatchOpenChannel; + getBaseFee(): number; + setBaseFee(value: number): BatchOpenChannel; + getFeeRate(): number; + setFeeRate(value: number): BatchOpenChannel; + getUseBaseFee(): boolean; + setUseBaseFee(value: boolean): BatchOpenChannel; + getUseFeeRate(): boolean; + setUseFeeRate(value: boolean): BatchOpenChannel; + getRemoteChanReserveSat(): number; + setRemoteChanReserveSat(value: number): BatchOpenChannel; + getMemo(): string; + setMemo(value: string): BatchOpenChannel; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BatchOpenChannel.AsObject; @@ -3069,6 +3094,17 @@ export namespace BatchOpenChannel { closeAddress: string; pendingChanId: Uint8Array | string; commitmentType: CommitmentType; + remoteMaxValueInFlightMsat: number; + remoteMaxHtlcs: number; + maxLocalCsv: number; + zeroConf: boolean; + scidAlias: boolean; + baseFee: number; + feeRate: number; + useBaseFee: boolean; + useFeeRate: boolean; + remoteChanReserveSat: number; + memo: string; }; } @@ -3163,6 +3199,12 @@ export class OpenChannelRequest extends jspb.Message { setRemoteChanReserveSat(value: number): OpenChannelRequest; getFundMax(): boolean; setFundMax(value: boolean): OpenChannelRequest; + getMemo(): string; + setMemo(value: string): OpenChannelRequest; + clearOutpointsList(): void; + getOutpointsList(): Array; + setOutpointsList(value: Array): OpenChannelRequest; + addOutpoints(value?: OutPoint, index?: number): OutPoint; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpenChannelRequest.AsObject; @@ -3213,6 +3255,8 @@ export namespace OpenChannelRequest { useFeeRate: boolean; remoteChanReserveSat: number; fundMax: boolean; + memo: string; + outpointsList: Array; }; } @@ -3371,6 +3415,8 @@ export class ChanPointShim extends jspb.Message { setPendingChanId(value: Uint8Array | string): ChanPointShim; getThawHeight(): number; setThawHeight(value: number): ChanPointShim; + getMusig2(): boolean; + setMusig2(value: boolean): ChanPointShim; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ChanPointShim.AsObject; @@ -3401,6 +3447,7 @@ export namespace ChanPointShim { remoteKey: Uint8Array | string; pendingChanId: Uint8Array | string; thawHeight: number; + musig2: boolean; }; } @@ -3860,6 +3907,8 @@ export namespace PendingChannelsResponse { setChanStatusFlags(value: string): PendingChannel; getPrivate(): boolean; setPrivate(value: boolean): PendingChannel; + getMemo(): string; + setMemo(value: string): PendingChannel; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PendingChannel.AsObject; @@ -3896,6 +3945,7 @@ export namespace PendingChannelsResponse { numForwardingPackages: number; chanStatusFlags: string; pb_private: boolean; + memo: string; }; } @@ -3912,6 +3962,8 @@ export namespace PendingChannelsResponse { setCommitWeight(value: number): PendingOpenChannel; getFeePerKw(): number; setFeePerKw(value: number): PendingOpenChannel; + getFundingExpiryBlocks(): number; + setFundingExpiryBlocks(value: number): PendingOpenChannel; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PendingOpenChannel.AsObject; @@ -3940,6 +3992,7 @@ export namespace PendingChannelsResponse { commitFee: number; commitWeight: number; feePerKw: number; + fundingExpiryBlocks: number; }; } @@ -4289,6 +4342,9 @@ export namespace WalletAccountBalance { } export class WalletBalanceRequest extends jspb.Message { + getAccount(): string; + setAccount(value: string): WalletBalanceRequest; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WalletBalanceRequest.AsObject; static toObject( @@ -4311,7 +4367,9 @@ export class WalletBalanceRequest extends jspb.Message { } export namespace WalletBalanceRequest { - export type AsObject = {}; + export type AsObject = { + account: string; + }; } export class WalletBalanceResponse extends jspb.Message { @@ -8587,6 +8645,7 @@ export enum CommitmentType { STATIC_REMOTE_KEY = 2, ANCHORS = 3, SCRIPT_ENFORCED_LEASE = 4, + SIMPLE_TAPROOT = 5, } export enum Initiator { diff --git a/lib/proto/lnd/rpc_pb.js b/lib/proto/lnd/rpc_pb.js index d09dcedd..08175672 100644 --- a/lib/proto/lnd/rpc_pb.js +++ b/lib/proto/lnd/rpc_pb.js @@ -1773,7 +1773,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.lnrpc.OpenChannelRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.lnrpc.OpenChannelRequest.repeatedFields_, null); }; goog.inherits(proto.lnrpc.OpenChannelRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -14193,7 +14193,8 @@ proto.lnrpc.Channel.toObject = function(includeInstance, msg) { zeroConf: jspb.Message.getBooleanFieldWithDefault(msg, 32, false), zeroConfConfirmedScid: jspb.Message.getFieldWithDefault(msg, 33, 0), peerAlias: jspb.Message.getFieldWithDefault(msg, 34, ""), - peerScidAlias: jspb.Message.getFieldWithDefault(msg, 35, "0") + peerScidAlias: jspb.Message.getFieldWithDefault(msg, 35, "0"), + memo: jspb.Message.getFieldWithDefault(msg, 36, "") }; if (includeInstance) { @@ -14375,6 +14376,10 @@ proto.lnrpc.Channel.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readUint64String()); msg.setPeerScidAlias(value); break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -14652,6 +14657,13 @@ proto.lnrpc.Channel.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 36, + f + ); + } }; @@ -15362,6 +15374,24 @@ proto.lnrpc.Channel.prototype.setPeerScidAlias = function(value) { }; +/** + * optional string memo = 36; + * @return {string} + */ +proto.lnrpc.Channel.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.Channel} returns this + */ +proto.lnrpc.Channel.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 36, value); +}; + + @@ -22065,7 +22095,18 @@ proto.lnrpc.BatchOpenChannel.toObject = function(includeInstance, msg) { remoteCsvDelay: jspb.Message.getFieldWithDefault(msg, 6, 0), closeAddress: jspb.Message.getFieldWithDefault(msg, 7, ""), pendingChanId: msg.getPendingChanId_asB64(), - commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0) + commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0), + remoteMaxValueInFlightMsat: jspb.Message.getFieldWithDefault(msg, 10, 0), + remoteMaxHtlcs: jspb.Message.getFieldWithDefault(msg, 11, 0), + maxLocalCsv: jspb.Message.getFieldWithDefault(msg, 12, 0), + zeroConf: jspb.Message.getBooleanFieldWithDefault(msg, 13, false), + scidAlias: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + baseFee: jspb.Message.getFieldWithDefault(msg, 15, 0), + feeRate: jspb.Message.getFieldWithDefault(msg, 16, 0), + useBaseFee: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), + useFeeRate: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), + remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 19, 0), + memo: jspb.Message.getFieldWithDefault(msg, 20, "") }; if (includeInstance) { @@ -22138,6 +22179,50 @@ proto.lnrpc.BatchOpenChannel.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {!proto.lnrpc.CommitmentType} */ (reader.readEnum()); msg.setCommitmentType(value); break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemoteMaxValueInFlightMsat(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint32()); + msg.setRemoteMaxHtlcs(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxLocalCsv(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setZeroConf(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setScidAlias(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBaseFee(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFeeRate(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUseBaseFee(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUseFeeRate(value); + break; + case 19: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemoteChanReserveSat(value); + break; + case 20: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -22230,6 +22315,83 @@ proto.lnrpc.BatchOpenChannel.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getRemoteMaxValueInFlightMsat(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getRemoteMaxHtlcs(); + if (f !== 0) { + writer.writeUint32( + 11, + f + ); + } + f = message.getMaxLocalCsv(); + if (f !== 0) { + writer.writeUint32( + 12, + f + ); + } + f = message.getZeroConf(); + if (f) { + writer.writeBool( + 13, + f + ); + } + f = message.getScidAlias(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getBaseFee(); + if (f !== 0) { + writer.writeUint64( + 15, + f + ); + } + f = message.getFeeRate(); + if (f !== 0) { + writer.writeUint64( + 16, + f + ); + } + f = message.getUseBaseFee(); + if (f) { + writer.writeBool( + 17, + f + ); + } + f = message.getUseFeeRate(); + if (f) { + writer.writeBool( + 18, + f + ); + } + f = message.getRemoteChanReserveSat(); + if (f !== 0) { + writer.writeUint64( + 19, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 20, + f + ); + } }; @@ -22443,6 +22605,204 @@ proto.lnrpc.BatchOpenChannel.prototype.setCommitmentType = function(value) { }; +/** + * optional uint64 remote_max_value_in_flight_msat = 10; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getRemoteMaxValueInFlightMsat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setRemoteMaxValueInFlightMsat = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional uint32 remote_max_htlcs = 11; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getRemoteMaxHtlcs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setRemoteMaxHtlcs = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint32 max_local_csv = 12; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getMaxLocalCsv = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setMaxLocalCsv = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional bool zero_conf = 13; + * @return {boolean} + */ +proto.lnrpc.BatchOpenChannel.prototype.getZeroConf = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setZeroConf = function(value) { + return jspb.Message.setProto3BooleanField(this, 13, value); +}; + + +/** + * optional bool scid_alias = 14; + * @return {boolean} + */ +proto.lnrpc.BatchOpenChannel.prototype.getScidAlias = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setScidAlias = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional uint64 base_fee = 15; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getBaseFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setBaseFee = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + +/** + * optional uint64 fee_rate = 16; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getFeeRate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setFeeRate = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional bool use_base_fee = 17; + * @return {boolean} + */ +proto.lnrpc.BatchOpenChannel.prototype.getUseBaseFee = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setUseBaseFee = function(value) { + return jspb.Message.setProto3BooleanField(this, 17, value); +}; + + +/** + * optional bool use_fee_rate = 18; + * @return {boolean} + */ +proto.lnrpc.BatchOpenChannel.prototype.getUseFeeRate = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setUseFeeRate = function(value) { + return jspb.Message.setProto3BooleanField(this, 18, value); +}; + + +/** + * optional uint64 remote_chan_reserve_sat = 19; + * @return {number} + */ +proto.lnrpc.BatchOpenChannel.prototype.getRemoteChanReserveSat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setRemoteChanReserveSat = function(value) { + return jspb.Message.setProto3IntField(this, 19, value); +}; + + +/** + * optional string memo = 20; + * @return {string} + */ +proto.lnrpc.BatchOpenChannel.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.BatchOpenChannel} returns this + */ +proto.lnrpc.BatchOpenChannel.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 20, value); +}; + + /** * List of repeated fields within this message type. @@ -22604,6 +22964,13 @@ proto.lnrpc.BatchOpenChannelResponse.prototype.clearPendingChannelsList = functi +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.lnrpc.OpenChannelRequest.repeatedFields_ = [28]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -22660,7 +23027,10 @@ proto.lnrpc.OpenChannelRequest.toObject = function(includeInstance, msg) { useBaseFee: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), useFeeRate: jspb.Message.getBooleanFieldWithDefault(msg, 24, false), remoteChanReserveSat: jspb.Message.getFieldWithDefault(msg, 25, 0), - fundMax: jspb.Message.getBooleanFieldWithDefault(msg, 26, false) + fundMax: jspb.Message.getBooleanFieldWithDefault(msg, 26, false), + memo: jspb.Message.getFieldWithDefault(msg, 27, ""), + outpointsList: jspb.Message.toObjectList(msg.getOutpointsList(), + proto.lnrpc.OutPoint.toObject, includeInstance) }; if (includeInstance) { @@ -22802,6 +23172,15 @@ proto.lnrpc.OpenChannelRequest.deserializeBinaryFromReader = function(msg, reade var value = /** @type {boolean} */ (reader.readBool()); msg.setFundMax(value); break; + case 27: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 28: + var value = new proto.lnrpc.OutPoint; + reader.readMessage(value,proto.lnrpc.OutPoint.deserializeBinaryFromReader); + msg.addOutpoints(value); + break; default: reader.skipField(); break; @@ -23014,6 +23393,21 @@ proto.lnrpc.OpenChannelRequest.serializeBinaryToWriter = function(message, write f ); } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 27, + f + ); + } + f = message.getOutpointsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 28, + f, + proto.lnrpc.OutPoint.serializeBinaryToWriter + ); + } }; @@ -23528,6 +23922,62 @@ proto.lnrpc.OpenChannelRequest.prototype.setFundMax = function(value) { }; +/** + * optional string memo = 27; + * @return {string} + */ +proto.lnrpc.OpenChannelRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this + */ +proto.lnrpc.OpenChannelRequest.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 27, value); +}; + + +/** + * repeated OutPoint outpoints = 28; + * @return {!Array} + */ +proto.lnrpc.OpenChannelRequest.prototype.getOutpointsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.lnrpc.OutPoint, 28)); +}; + + +/** + * @param {!Array} value + * @return {!proto.lnrpc.OpenChannelRequest} returns this +*/ +proto.lnrpc.OpenChannelRequest.prototype.setOutpointsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 28, value); +}; + + +/** + * @param {!proto.lnrpc.OutPoint=} opt_value + * @param {number=} opt_index + * @return {!proto.lnrpc.OutPoint} + */ +proto.lnrpc.OpenChannelRequest.prototype.addOutpoints = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 28, opt_value, proto.lnrpc.OutPoint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.lnrpc.OpenChannelRequest} returns this + */ +proto.lnrpc.OpenChannelRequest.prototype.clearOutpointsList = function() { + return this.setOutpointsList([]); +}; + + /** * Oneof group definitions for this message. Each group defines the field @@ -24264,7 +24714,8 @@ proto.lnrpc.ChanPointShim.toObject = function(includeInstance, msg) { localKey: (f = msg.getLocalKey()) && proto.lnrpc.KeyDescriptor.toObject(includeInstance, f), remoteKey: msg.getRemoteKey_asB64(), pendingChanId: msg.getPendingChanId_asB64(), - thawHeight: jspb.Message.getFieldWithDefault(msg, 6, 0) + thawHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), + musig2: jspb.Message.getBooleanFieldWithDefault(msg, 7, false) }; if (includeInstance) { @@ -24327,6 +24778,10 @@ proto.lnrpc.ChanPointShim.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readUint32()); msg.setThawHeight(value); break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMusig2(value); + break; default: reader.skipField(); break; @@ -24400,6 +24855,13 @@ proto.lnrpc.ChanPointShim.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getMusig2(); + if (f) { + writer.writeBool( + 7, + f + ); + } }; @@ -24597,6 +25059,24 @@ proto.lnrpc.ChanPointShim.prototype.setThawHeight = function(value) { }; +/** + * optional bool musig2 = 7; + * @return {boolean} + */ +proto.lnrpc.ChanPointShim.prototype.getMusig2 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.lnrpc.ChanPointShim} returns this + */ +proto.lnrpc.ChanPointShim.prototype.setMusig2 = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + @@ -26753,7 +27233,8 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject = function(includeIn commitmentType: jspb.Message.getFieldWithDefault(msg, 9, 0), numForwardingPackages: jspb.Message.getFieldWithDefault(msg, 10, 0), chanStatusFlags: jspb.Message.getFieldWithDefault(msg, 11, ""), - pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 12, false) + pb_private: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), + memo: jspb.Message.getFieldWithDefault(msg, 13, "") }; if (includeInstance) { @@ -26838,6 +27319,10 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.deserializeBinaryFromReader = var value = /** @type {boolean} */ (reader.readBool()); msg.setPrivate(value); break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -26951,6 +27436,13 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.serializeBinaryToWriter = fun f ); } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } }; @@ -27170,6 +27662,24 @@ proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setPrivate = functi }; +/** + * optional string memo = 13; + * @return {string} + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.PendingChannel.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + @@ -27205,7 +27715,8 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.toObject = function(inclu channel: (f = msg.getChannel()) && proto.lnrpc.PendingChannelsResponse.PendingChannel.toObject(includeInstance, f), commitFee: jspb.Message.getFieldWithDefault(msg, 4, 0), commitWeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - feePerKw: jspb.Message.getFieldWithDefault(msg, 6, 0) + feePerKw: jspb.Message.getFieldWithDefault(msg, 6, 0), + fundingExpiryBlocks: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -27259,6 +27770,10 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.deserializeBinaryFromRead var value = /** @type {number} */ (reader.readInt64()); msg.setFeePerKw(value); break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFundingExpiryBlocks(value); + break; default: reader.skipField(); break; @@ -27317,6 +27832,13 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.serializeBinaryToWriter = f ); } + f = message.getFundingExpiryBlocks(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } }; @@ -27411,6 +27933,24 @@ proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFeePerKw = f }; +/** + * optional int32 funding_expiry_blocks = 3; + * @return {number} + */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.getFundingExpiryBlocks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.lnrpc.PendingChannelsResponse.PendingOpenChannel} returns this + */ +proto.lnrpc.PendingChannelsResponse.PendingOpenChannel.prototype.setFundingExpiryBlocks = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + @@ -29475,7 +30015,7 @@ proto.lnrpc.WalletBalanceRequest.prototype.toObject = function(opt_includeInstan */ proto.lnrpc.WalletBalanceRequest.toObject = function(includeInstance, msg) { var f, obj = { - + account: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -29512,6 +30052,10 @@ proto.lnrpc.WalletBalanceRequest.deserializeBinaryFromReader = function(msg, rea } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAccount(value); + break; default: reader.skipField(); break; @@ -29541,6 +30085,31 @@ proto.lnrpc.WalletBalanceRequest.prototype.serializeBinary = function() { */ proto.lnrpc.WalletBalanceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAccount(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string account = 1; + * @return {string} + */ +proto.lnrpc.WalletBalanceRequest.prototype.getAccount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.lnrpc.WalletBalanceRequest} returns this + */ +proto.lnrpc.WalletBalanceRequest.prototype.setAccount = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -53859,7 +54428,8 @@ proto.lnrpc.CommitmentType = { LEGACY: 1, STATIC_REMOTE_KEY: 2, ANCHORS: 3, - SCRIPT_ENFORCED_LEASE: 4 + SCRIPT_ENFORCED_LEASE: 4, + SIMPLE_TAPROOT: 5 }; /** diff --git a/proto/lnd/rpc.proto b/proto/lnd/rpc.proto index 48175bf4..810e9d85 100644 --- a/proto/lnd/rpc.proto +++ b/proto/lnd/rpc.proto @@ -101,8 +101,10 @@ service Lightning { rpc SignMessage (SignMessageRequest) returns (SignMessageResponse); /* lncli: `verifymessage` - VerifyMessage verifies a signature over a msg. The signature must be - zbase32 encoded and signed by an active node in the resident node's + VerifyMessage verifies a signature over a message and recovers the signer's + public key. The signature is only deemed valid if the recovered public key + corresponds to a node key in the public Lightning network. The signature + must be zbase32 encoded and signed by an active node in the resident node's channel database. In addition to returning the validity of the signature, VerifyMessage also returns the recovered pubkey from the signature. */ @@ -1350,6 +1352,13 @@ enum CommitmentType { channel before its maturity date. */ SCRIPT_ENFORCED_LEASE = 4; + + /* + A channel that uses musig2 for the funding output, and the new tapscript + features where relevant. + */ + // TODO(roasbeef): need script enforce mirror type for the above as well? + SIMPLE_TAPROOT = 5; } message ChannelConstraints { @@ -1545,6 +1554,13 @@ message Channel { // This is the peer SCID alias. uint64 peer_scid_alias = 35 [jstype = JS_STRING]; + + /* + An optional note-to-self to go along with the channel containing some + useful information. This is only ever stored locally and in no way impacts + the channel's operation. + */ + string memo = 36; } message ListChannelsRequest { @@ -2119,6 +2135,76 @@ message BatchOpenChannel { the remote peer supports explicit channel negotiation. */ CommitmentType commitment_type = 9; + + /* + 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 = 10; + + /* + The maximum number of concurrent HTLCs we will allow the remote party to add + to the commitment transaction. + */ + uint32 remote_max_htlcs = 11; + + /* + Max local csv is the maximum csv delay we will allow for our own commitment + transaction. + */ + uint32 max_local_csv = 12; + + /* + If this is true, then a zero-conf channel open will be attempted. + */ + bool zero_conf = 13; + + /* + If this is true, then an option-scid-alias channel-type open will be + attempted. + */ + bool scid_alias = 14; + + /* + The base fee charged regardless of the number of milli-satoshis sent. + */ + uint64 base_fee = 15; + + /* + The fee rate in ppm (parts per million) that will be charged in + proportion of the value of each forwarded HTLC. + */ + uint64 fee_rate = 16; + + /* + If use_base_fee is true the open channel announcement will update the + channel base fee with the value specified in base_fee. In the case of + a base_fee of 0 use_base_fee is needed downstream to distinguish whether + to use the default base fee value specified in the config or 0. + */ + bool use_base_fee = 17; + + /* + If use_fee_rate is true the open channel announcement will update the + channel fee rate with the value specified in fee_rate. In the case of + a fee_rate of 0 use_fee_rate is needed downstream to distinguish whether + to use the default fee rate value specified in the config or 0. + */ + bool use_fee_rate = 18; + + /* + The number of satoshis we require the remote peer to reserve. This value, + if specified, must be above the dust limit and below 20% of the channel + capacity. + */ + uint64 remote_chan_reserve_sat = 19; + + /* + An optional note-to-self to go along with the channel containing some + useful information. This is only ever stored locally and in no way impacts + the channel's operation. + */ + string memo = 20; } message BatchOpenChannelResponse { @@ -2274,6 +2360,18 @@ message OpenChannelRequest { be zero and is ignored. */ bool fund_max = 26; + + /* + An optional note-to-self to go along with the channel containing some + useful information. This is only ever stored locally and in no way impacts + the channel's operation. + */ + string memo = 27; + + /* + A list of selected outpoints that are allocated for channel funding. + */ + repeated OutPoint outpoints = 28; } message OpenStatusUpdate { oneof update { @@ -2355,6 +2453,11 @@ message ChanPointShim { the value is less than 500,000, or as an absolute height otherwise. */ uint32 thaw_height = 6; + + /* + Indicates that the funding output is using a MuSig2 multi-sig output. + */ + bool musig2 = 7; } message PsbtShim { @@ -2540,6 +2643,13 @@ message PendingChannelsResponse { // Whether this channel is advertised to the network or not. bool private = 12; + + /* + An optional note-to-self to go along with the channel containing some + useful information. This is only ever stored locally and in no way + impacts the channel's operation. + */ + string memo = 13; } message PendingOpenChannel { @@ -2567,6 +2677,17 @@ message PendingChannelsResponse { // Previously used for confirmation_height. Do not reuse. reserved 2; + + // The number of blocks until the funding transaction is considered + // expired. If this value gets close to zero, there is a risk that the + // channel funding will be canceled by the channel responder. The + // channel should be fee bumped using CPFP (see walletrpc.BumpFee) to + // ensure that the channel confirms in time. Otherwise a force-close + // will be necessary if the channel confirms after the funding + // transaction expires. A negative value means the channel responder has + // very likely canceled the funding and the channel will never become + // fully operational. + int32 funding_expiry_blocks = 3; } message WaitingCloseChannel { @@ -2719,6 +2840,9 @@ message WalletAccountBalance { } message WalletBalanceRequest { + // The wallet account the balance is shown for. + // If this is not specified, the balance of the "default" account is shown. + string account = 1; } message WalletBalanceResponse { @@ -3466,22 +3590,22 @@ message Invoice { /* The amount that was accepted for this invoice, in satoshis. This will ONLY - be set if this invoice has been settled. We provide this field as if the - invoice was created with a zero value, then we need to record what amount - was ultimately accepted. Additionally, it's possible that the sender paid - MORE that was specified in the original invoice. So we'll record that here - as well. + be set if this invoice has been settled or accepted. We provide this field + as if the invoice was created with a zero value, then we need to record what + amount was ultimately accepted. Additionally, it's possible that the sender + paid MORE that was specified in the original invoice. So we'll record that + here as well. Note: Output only, don't specify for creating an invoice. */ int64 amt_paid_sat = 19; /* The amount that was accepted for this invoice, in millisatoshis. This will - ONLY be set if this invoice has been settled. We provide this field as if - the invoice was created with a zero value, then we need to record what - amount was ultimately accepted. Additionally, it's possible that the sender - paid MORE that was specified in the original invoice. So we'll record that - here as well. + ONLY be set if this invoice has been settled or accepted. We provide this + field as if the invoice was created with a zero value, then we need to + record what amount was ultimately accepted. Additionally, it's possible that + the sender paid MORE that was specified in the original invoice. So we'll + record that here as well. Note: Output only, don't specify for creating an invoice. */ int64 amt_paid_msat = 20;