From 83fa4aa28afdf6c26300e81c947ecf2a844f38de Mon Sep 17 00:00:00 2001 From: herrvendil Date: Thu, 21 Sep 2023 10:13:23 +0200 Subject: [PATCH 1/3] Added initial support for 0.17 with functioning unit test --- docs/index.adoc | 1 + src/main/proto/lightning.api.proto | 145 ++++++++++++++++-- src/main/proto/neutrino.proto | 7 +- src/main/proto/signer.proto | 27 +++- src/main/proto/wallet.kit.proto | 6 +- .../org/lightningj/lnd/wrapper/APISpec.groovy | 2 +- .../lightningj/lnd/wrapper/MessageSpec.groovy | 12 +- 7 files changed, 178 insertions(+), 22 deletions(-) diff --git a/docs/index.adoc b/docs/index.adoc index 3ff8eaaff..f3a40034a 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -40,6 +40,7 @@ to the license agreement can be found link:LICENSE.txt[here]. == Whats New +* 0.17.0-Beta : Generated against LND 0.17.0 API * 0.16.2-Beta : Generated against LND 0.16.2 API, added support for ChainKit RPC Service. * 0.16.0-Beta : Generated against LND 0.16.0 API * 0.15.5-Beta : Generated against LND 0.15.5 and fix for NaN issue #79 diff --git a/src/main/proto/lightning.api.proto b/src/main/proto/lightning.api.proto index 9e5836dd1..dec622c1c 100644 --- a/src/main/proto/lightning.api.proto +++ b/src/main/proto/lightning.api.proto @@ -1,7 +1,7 @@ /** * This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto * And is distributed under LNDs MIT License. - * LND (444bbfa) tag : Downloaded 2023-04-27 + * LND (7ceb46d) tag : Downloaded 2023-09-22 */ syntax = "proto3"; @@ -107,8 +107,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. */ @@ -1356,6 +1358,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 { @@ -1551,6 +1560,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 { @@ -2125,6 +2141,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 { @@ -2280,6 +2366,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 { @@ -2546,6 +2644,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 { @@ -2573,6 +2678,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 { @@ -2725,6 +2841,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 { @@ -3472,22 +3591,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; diff --git a/src/main/proto/neutrino.proto b/src/main/proto/neutrino.proto index b7effb024..7d5aa089b 100644 --- a/src/main/proto/neutrino.proto +++ b/src/main/proto/neutrino.proto @@ -1,7 +1,7 @@ /** * This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto * And is distributed under LNDs MIT License. - * LND (74023fe) tag : Downloaded 2023-02-25 + * LND (9ce02b9) tag : Downloaded 2023-09-22 */ syntax = "proto3"; @@ -55,9 +55,12 @@ service NeutrinoKit { rpc GetCFilter (GetCFilterRequest) returns (GetCFilterResponse); /* + Deprecated, use chainrpc.GetBlockHash instead. GetBlockHash returns the header hash of a block at a given height. */ - rpc GetBlockHash (GetBlockHashRequest) returns (GetBlockHashResponse); + rpc GetBlockHash (GetBlockHashRequest) returns (GetBlockHashResponse) { + option deprecated = true; + } } message StatusRequest { diff --git a/src/main/proto/signer.proto b/src/main/proto/signer.proto index 58b9f3af0..0a9881788 100644 --- a/src/main/proto/signer.proto +++ b/src/main/proto/signer.proto @@ -1,7 +1,7 @@ /** * This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto * And is distributed under LNDs MIT License. - * LND (13252ae) tag : Downloaded 2023-02-25 + * LND (8405590) tag : Downloaded 2023-09-22 */ syntax = "proto3"; @@ -19,6 +19,7 @@ service Signer { concerning how the outputs should be signed, which keys they should be signed with, and also any optional tweaks. The return value is a fixed 64-byte signature (the same format as we use on the wire in Lightning). + If we are unable to sign using the specified keys, then an error will be returned. */ @@ -30,6 +31,7 @@ service Signer { This method should be capable of generating the proper input script for both regular p2wkh/p2tr outputs and p2wkh outputs nested within a regular p2sh output. + Note that when using this method to sign inputs belonging to the wallet, the only items of the SignDescriptor that need to be populated are pkScript in the TxOut field, the value in that same field, and finally the input @@ -40,6 +42,7 @@ service Signer { /* SignMessage signs a message with the key specified in the key locator. The returned signature is fixed-size LN wire format encoded. + The main difference to SignMessage in the main RPC is that a specific key is used to sign the message instead of the node identity private key. */ @@ -48,6 +51,7 @@ service Signer { /* VerifyMessage verifies a signature over a message using the public key provided. The signature must be fixed-size LN wire format encoded. + The main difference to VerifyMessage in the main RPC is that the public key used to sign the message does not have to be a node known to the network. */ @@ -73,6 +77,7 @@ service Signer { public key that should be put in an on-chain output once all public keys are known. A signing session is only needed later when that output should be _spent_ again. + NOTE: The MuSig2 BIP is not final yet and therefore this API must be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming releases. Backward compatibility is not guaranteed! @@ -87,6 +92,7 @@ service Signer { key of the local signing key. If nonces of other parties are already known, they can be submitted as well to reduce the number of RPC calls necessary later on. + NOTE: The MuSig2 BIP is not final yet and therefore this API must be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming releases. Backward compatibility is not guaranteed! @@ -98,6 +104,7 @@ service Signer { MuSig2RegisterNonces (experimental!) registers one or more public nonces of other signing participants for a session identified by its ID. This RPC can be called multiple times until all nonces are registered. + NOTE: The MuSig2 BIP is not final yet and therefore this API must be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming releases. Backward compatibility is not guaranteed! @@ -112,6 +119,7 @@ service Signer { registered with the session. If this node isn't responsible for combining all the partial signatures, then the cleanup flag should be set, indicating that the session can be removed from memory once the signature was produced. + NOTE: The MuSig2 BIP is not final yet and therefore this API must be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming releases. Backward compatibility is not guaranteed! @@ -123,6 +131,7 @@ service Signer { with the local one, if it already exists. Once a partial signature of all participants is registered, the final signature will be combined and returned. + NOTE: The MuSig2 BIP is not final yet and therefore this API must be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming releases. Backward compatibility is not guaranteed! @@ -134,6 +143,7 @@ service Signer { MuSig2Cleanup (experimental!) allows a caller to clean up a session early in cases where it's obvious that the signing session won't succeed and the resources can be released. + NOTE: The MuSig2 BIP is not final yet and therefore this API must be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming releases. Backward compatibility is not guaranteed! @@ -202,6 +212,7 @@ message SignDescriptor { A descriptor that precisely describes *which* key to use for signing. This may provide the raw public key directly, or require the Signer to re-derive the key according to the populated derivation path. + Note that if the key descriptor was obtained through walletrpc.DeriveKey, then the key locator MUST always be provided, since the derived keys are not persisted unlike with DeriveNextKey. @@ -212,6 +223,7 @@ message SignDescriptor { A scalar value that will be added to the private key corresponding to the above public key to obtain the private key to be used to sign this input. This value is typically derived via the following computation: + * derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N */ bytes single_tweak = 2; @@ -223,6 +235,7 @@ message SignDescriptor { commitment secret from a previously revoked commitment transaction. This value is in combination with two hash values, and the original private key to derive the private key to be used when signing. + * k = (privKey*sha256(pubKey || tweakPub) + tweakPriv*sha256(tweakPub || pubKey)) mod N */ @@ -232,7 +245,9 @@ message SignDescriptor { The 32 byte input to the taproot tweak derivation that is used to derive the output key from an internal key: outputKey = internalKey + tagged_hash("tapTweak", internalKey || tapTweak). + When doing a BIP 86 spend, this field can be an empty byte slice. + When doing a normal key path spend, with the output key committing to an actual script root, then this field should be: the tapscript root hash. */ @@ -549,6 +564,16 @@ message MuSig2SessionRequest { combined key and nonces are created. */ MuSig2Version version = 6; + + /* + A set of pre generated secret local nonces to use in the musig2 session. + This field is optional. This can be useful for protocols that need to send + nonces ahead of time before the set of signer keys are known. This value + MUST be 97 bytes and be the concatenation of two CSPRNG generated 32 byte + values and local public key used for signing as specified in the key_loc + field. + */ + bytes pregenerated_local_nonce = 7; } message MuSig2SessionResponse { diff --git a/src/main/proto/wallet.kit.proto b/src/main/proto/wallet.kit.proto index 9c2408544..619bac082 100644 --- a/src/main/proto/wallet.kit.proto +++ b/src/main/proto/wallet.kit.proto @@ -1,7 +1,7 @@ /** * This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto * And is distributed under LNDs MIT License. - * LND (44dcfec) tag : Downloaded 2023-04-27 + * LND (31330f1) tag : Downloaded 2023-09-22 */ syntax = "proto3"; @@ -718,7 +718,9 @@ message ImportTapscriptResponse { message Transaction { /* - The raw serialized transaction. + The raw serialized transaction. Despite the field name, this does need to be + specified in raw bytes (or base64 encoded when using REST) and not in hex. + To not break existing software, the field can't simply be renamed. */ bytes tx_hex = 1; diff --git a/src/test/groovy/org/lightningj/lnd/wrapper/APISpec.groovy b/src/test/groovy/org/lightningj/lnd/wrapper/APISpec.groovy index 759d78e6f..b6db1db24 100644 --- a/src/test/groovy/org/lightningj/lnd/wrapper/APISpec.groovy +++ b/src/test/groovy/org/lightningj/lnd/wrapper/APISpec.groovy @@ -107,7 +107,7 @@ class APISpec extends Specification { LightningApi.WalletBalanceRequest result = api.processRequest(walletBalanceRequest) then: result != null - 1 * api.log.fine('Sending request message: WalletBalanceRequest: \n{\n}') + 1 * api.log.fine( {it =~ """Sending request message: WalletBalanceRequest:"""}) } def "Verify getter and setter for perform validation"(){ diff --git a/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy b/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy index 7f043421f..10f167379 100644 --- a/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy +++ b/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy @@ -60,7 +60,7 @@ class MessageSpec extends Specification { def "Verify that toJsonAsString returns json in string format"(){ expect: - genOpenChannelRequest().toJsonAsString(false) == '{"satPerVbyte":0,"nodePubkey":"","nodePubkeyString":"02ad1fddad0c572ec3e886cbea31bbafa30b5f7e745da7e936ed9d1471116cdc02","localFundingAmount":40000,"pushSat":25000,"targetConf":0,"satPerByte":0,"private":false,"minHtlcMsat":0,"remoteCsvDelay":0,"minConfs":0,"spendUnconfirmed":false,"closeAddress":"","fundingShim":{"chanPointShim":{"amt":0,"chanPoint":{"fundingTxidBytes":"","fundingTxidStr":"","outputIndex":0},"localKey":{"rawKeyBytes":"","keyLoc":{"keyFamily":0,"keyIndex":0}},"remoteKey":"","pendingChanId":"","thawHeight":0},"psbtShim":{"pendingChanId":"","basePsbt":"","noPublish":false}},"remoteMaxValueInFlightMsat":0,"remoteMaxHtlcs":0,"maxLocalCsv":0,"commitmentType":"UNKNOWN_COMMITMENT_TYPE","zeroConf":false,"scidAlias":false,"baseFee":0,"feeRate":0,"useBaseFee":false,"useFeeRate":false,"remoteChanReserveSat":0,"fundMax":false}' + genOpenChannelRequest().toJsonAsString(false) == '{"satPerVbyte":0,"nodePubkey":"","nodePubkeyString":"02ad1fddad0c572ec3e886cbea31bbafa30b5f7e745da7e936ed9d1471116cdc02","localFundingAmount":40000,"pushSat":25000,"targetConf":0,"satPerByte":0,"private":false,"minHtlcMsat":0,"remoteCsvDelay":0,"minConfs":0,"spendUnconfirmed":false,"closeAddress":"","fundingShim":{"chanPointShim":{"amt":0,"chanPoint":{"fundingTxidBytes":"","fundingTxidStr":"","outputIndex":0},"localKey":{"rawKeyBytes":"","keyLoc":{"keyFamily":0,"keyIndex":0}},"remoteKey":"","pendingChanId":"","thawHeight":0},"psbtShim":{"pendingChanId":"","basePsbt":"","noPublish":false}},"remoteMaxValueInFlightMsat":0,"remoteMaxHtlcs":0,"maxLocalCsv":0,"commitmentType":"UNKNOWN_COMMITMENT_TYPE","zeroConf":false,"scidAlias":false,"baseFee":0,"feeRate":0,"useBaseFee":false,"useFeeRate":false,"remoteChanReserveSat":0,"fundMax":false,"memo":"","outpoints":[]}' genOpenChannelRequest().toJsonAsString(true) == """ { "satPerVbyte": 0, @@ -112,7 +112,10 @@ class MessageSpec extends Specification { "useBaseFee": false, "useFeeRate": false, "remoteChanReserveSat": 0, - "fundMax": false + "fundMax": false, + "memo": "", + "outpoints": [ + ] }""" } @@ -183,7 +186,10 @@ class MessageSpec extends Specification { "useBaseFee": false, "useFeeRate": false, "remoteChanReserveSat": 0, - "fundMax": false + "fundMax": false, + "memo": "", + "outpoints": [ + ] }""" } From 9bfb539a594f85d728725c722b2bb341dadef43e Mon Sep 17 00:00:00 2001 From: herrvendil Date: Thu, 21 Sep 2023 10:31:03 +0200 Subject: [PATCH 2/3] Updated gradle to 8,1 --- docs/index.adoc | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.adoc b/docs/index.adoc index f3a40034a..83b846e50 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -40,7 +40,7 @@ to the license agreement can be found link:LICENSE.txt[here]. == Whats New -* 0.17.0-Beta : Generated against LND 0.17.0 API +* 0.17.0-Beta : Generated against LND 0.17.0 API, upgraded to Gradle 8.1 * 0.16.2-Beta : Generated against LND 0.16.2 API, added support for ChainKit RPC Service. * 0.16.0-Beta : Generated against LND 0.16.0 API * 0.15.5-Beta : Generated against LND 0.15.5 and fix for NaN issue #79 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661ee..59bc51a20 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 888190db790a16aebafa222a48e5c5f468f18fe0 Mon Sep 17 00:00:00 2001 From: herrvendil Date: Sat, 7 Oct 2023 22:59:44 +0200 Subject: [PATCH 3/3] Last update for 0.17.0 --- .gitignore | 3 ++- src/main/proto/lightning.api.proto | 8 +++++++- .../groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy | 8 +++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3060674fc..ee3726c88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .gradle build -.idea \ No newline at end of file +.idea +bin diff --git a/src/main/proto/lightning.api.proto b/src/main/proto/lightning.api.proto index dec622c1c..03a7cc6d7 100644 --- a/src/main/proto/lightning.api.proto +++ b/src/main/proto/lightning.api.proto @@ -1,7 +1,7 @@ /** * This file is fetched from https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto * And is distributed under LNDs MIT License. - * LND (7ceb46d) tag : Downloaded 2023-09-22 + * LND (d94ae3f) tag : Downloaded 2023-10-07 */ syntax = "proto3"; @@ -10,6 +10,7 @@ package lnrpc; option java_package = "org.lightningj.lnd.proto"; option go_package = "github.com/lightningnetwork/lnd/lnrpc"; + /* * Comments in this file will be directly parsed into the API * Documentation as descriptions of the associated method, message, or field. @@ -2459,6 +2460,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 { diff --git a/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy b/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy index 10f167379..c25aa809c 100644 --- a/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy +++ b/src/test/groovy/org/lightningj/lnd/wrapper/MessageSpec.groovy @@ -60,7 +60,7 @@ class MessageSpec extends Specification { def "Verify that toJsonAsString returns json in string format"(){ expect: - genOpenChannelRequest().toJsonAsString(false) == '{"satPerVbyte":0,"nodePubkey":"","nodePubkeyString":"02ad1fddad0c572ec3e886cbea31bbafa30b5f7e745da7e936ed9d1471116cdc02","localFundingAmount":40000,"pushSat":25000,"targetConf":0,"satPerByte":0,"private":false,"minHtlcMsat":0,"remoteCsvDelay":0,"minConfs":0,"spendUnconfirmed":false,"closeAddress":"","fundingShim":{"chanPointShim":{"amt":0,"chanPoint":{"fundingTxidBytes":"","fundingTxidStr":"","outputIndex":0},"localKey":{"rawKeyBytes":"","keyLoc":{"keyFamily":0,"keyIndex":0}},"remoteKey":"","pendingChanId":"","thawHeight":0},"psbtShim":{"pendingChanId":"","basePsbt":"","noPublish":false}},"remoteMaxValueInFlightMsat":0,"remoteMaxHtlcs":0,"maxLocalCsv":0,"commitmentType":"UNKNOWN_COMMITMENT_TYPE","zeroConf":false,"scidAlias":false,"baseFee":0,"feeRate":0,"useBaseFee":false,"useFeeRate":false,"remoteChanReserveSat":0,"fundMax":false,"memo":"","outpoints":[]}' + genOpenChannelRequest().toJsonAsString(false) == '{"satPerVbyte":0,"nodePubkey":"","nodePubkeyString":"02ad1fddad0c572ec3e886cbea31bbafa30b5f7e745da7e936ed9d1471116cdc02","localFundingAmount":40000,"pushSat":25000,"targetConf":0,"satPerByte":0,"private":false,"minHtlcMsat":0,"remoteCsvDelay":0,"minConfs":0,"spendUnconfirmed":false,"closeAddress":"","fundingShim":{"chanPointShim":{"amt":0,"chanPoint":{"fundingTxidBytes":"","fundingTxidStr":"","outputIndex":0},"localKey":{"rawKeyBytes":"","keyLoc":{"keyFamily":0,"keyIndex":0}},"remoteKey":"","pendingChanId":"","thawHeight":0,"musig2":false},"psbtShim":{"pendingChanId":"","basePsbt":"","noPublish":false}},"remoteMaxValueInFlightMsat":0,"remoteMaxHtlcs":0,"maxLocalCsv":0,"commitmentType":"UNKNOWN_COMMITMENT_TYPE","zeroConf":false,"scidAlias":false,"baseFee":0,"feeRate":0,"useBaseFee":false,"useFeeRate":false,"remoteChanReserveSat":0,"fundMax":false,"memo":"","outpoints":[]}' genOpenChannelRequest().toJsonAsString(true) == """ { "satPerVbyte": 0, @@ -93,7 +93,8 @@ class MessageSpec extends Specification { }, "remoteKey": "", "pendingChanId": "", - "thawHeight": 0 + "thawHeight": 0, + "musig2": false }, "psbtShim": { "pendingChanId": "", @@ -167,7 +168,8 @@ class MessageSpec extends Specification { }, "remoteKey": "", "pendingChanId": "", - "thawHeight": 0 + "thawHeight": 0, + "musig2": false }, "psbtShim": { "pendingChanId": "",