diff --git a/.msggen.json b/.msggen.json index a642d7b07b1b..7d64d8081584 100644 --- a/.msggen.json +++ b/.msggen.json @@ -330,7 +330,6 @@ "NewaddrAddresstype": { "all": 2, "bech32": 0, - "p2sh-segwit": 1, "p2tr": 3 }, "PayStatus": { @@ -1562,7 +1561,6 @@ }, "NewaddrResponse": { "NewAddr.bech32": 1, - "NewAddr.p2sh-segwit": 2, "NewAddr.p2tr": 3 }, "OfferRecurrence": { @@ -5621,10 +5619,6 @@ "added": "pre-v0.10.1", "deprecated": false }, - "NewAddr.p2sh-segwit": { - "added": "pre-v0.10.1", - "deprecated": "v23.02" - }, "NewAddr.p2tr": { "added": "v23.08", "deprecated": false diff --git a/README.md b/README.md index b8648d733632..794d1a3db68a 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,11 @@ lightning-cli newaddr `lightningd` will register the funds once the transaction is confirmed. -You may need to generate a p2sh-segwit address if the faucet does not support bech32: +Alternatively you can generate a taproot address should your source of funds support it: ```bash -# Return a p2sh-segwit address -lightning-cli newaddr p2sh-segwit +# Return a taproot address +lightning-cli newaddr p2tr ``` Confirm `lightningd` got funds by: diff --git a/cln-rpc/src/model.rs b/cln-rpc/src/model.rs index c1bed7e13094..1009e0424139 100644 --- a/cln-rpc/src/model.rs +++ b/cln-rpc/src/model.rs @@ -1168,7 +1168,7 @@ pub mod requests { fn try_from(c: i32) -> Result { match c { 0 => Ok(NewaddrAddresstype::BECH32), - 1 => Ok(NewaddrAddresstype::P2TR), + 3 => Ok(NewaddrAddresstype::P2TR), 2 => Ok(NewaddrAddresstype::ALL), o => Err(anyhow::anyhow!("Unknown variant {} for enum NewaddrAddresstype", o)), } @@ -2505,11 +2505,11 @@ pub mod responses { fn try_from(c: i32) -> Result { match c { 0 => Ok(GetinfoBindingType::LOCAL_SOCKET), - 1 => Ok(GetinfoBindingType::WEBSOCKET), - 2 => Ok(GetinfoBindingType::IPV4), - 3 => Ok(GetinfoBindingType::IPV6), - 4 => Ok(GetinfoBindingType::TORV2), - 5 => Ok(GetinfoBindingType::TORV3), + 5 => Ok(GetinfoBindingType::WEBSOCKET), + 1 => Ok(GetinfoBindingType::IPV4), + 2 => Ok(GetinfoBindingType::IPV6), + 3 => Ok(GetinfoBindingType::TORV2), + 4 => Ok(GetinfoBindingType::TORV3), o => Err(anyhow::anyhow!("Unknown variant {} for enum GetinfoBindingType", o)), } } @@ -5596,13 +5596,13 @@ pub mod responses { #[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] pub enum MultifundchannelFailedMethod { #[serde(rename = "connect")] - CONNECT, + CONNECT = 0, #[serde(rename = "openchannel_init")] - OPENCHANNEL_INIT, + OPENCHANNEL_INIT = 1, #[serde(rename = "fundchannel_start")] - FUNDCHANNEL_START, + FUNDCHANNEL_START = 2, #[serde(rename = "fundchannel_complete")] - FUNDCHANNEL_COMPLETE, + FUNDCHANNEL_COMPLETE = 3, } impl TryFrom for MultifundchannelFailedMethod { diff --git a/contrib/pyln-testing/pyln/testing/grpc.py b/contrib/pyln-testing/pyln/testing/grpc.py index d854f25bd9be..0b39878e3975 100644 --- a/contrib/pyln-testing/pyln/testing/grpc.py +++ b/contrib/pyln-testing/pyln/testing/grpc.py @@ -133,11 +133,6 @@ def newaddr(self, addresstype=None): payload = clnpb.NewaddrRequest(addresstype=atype) res = grpc2py.newaddr2py(self.stub.NewAddr(payload)) - # Need to remap the bloody spelling of p2sh-segwit to match - # addresstype. - if 'p2sh_segwit' in res: - res['p2sh-segwit'] = res['p2sh_segwit'] - del res['p2sh_segwit'] return res def listfunds(self, spent=None): diff --git a/doc/beginners-guide/opening-channels.md b/doc/beginners-guide/opening-channels.md index 4341e2188029..8c7b87b361c4 100644 --- a/doc/beginners-guide/opening-channels.md +++ b/doc/beginners-guide/opening-channels.md @@ -16,11 +16,11 @@ lightning-cli newaddr `lightningd` will register the funds once the transaction is confirmed. -You may need to generate a p2sh-segwit address if the faucet does not support bech32: +Alternatively you can generate a taproot address should your source of funds support it: ```shell -# Return a p2sh-segwit address -lightning-cli newaddr p2sh-segwit +# Return a taproot address +lightning-cli newaddr p2tr ``` diff --git a/doc/lightningd.8.md b/doc/lightningd.8.md index af4af6b7971a..41cf77051a3c 100644 --- a/doc/lightningd.8.md +++ b/doc/lightningd.8.md @@ -103,11 +103,10 @@ elided, specify it if you selected your own *lightning-dir*): $ lightning-cli newaddr -This will provide a native SegWit bech32 address. In case all your money -is in services that do not support native SegWit and have to use -P2SH-wrapped addresses, instead use: +This will provide a native SegWit bech32 address. Alternatively you can +generate a taproot address with: - $ lightning-cli newaddr p2sh-segwit + $ lightning-cli newaddr p2tr Transfer a small amount of onchain funds to the given address. Check the status of all your funds (onchain and on-Lightning) via diff --git a/tests/test_misc.py b/tests/test_misc.py index d66ee4b5a83c..8979b0532555 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -2019,6 +2019,7 @@ def test_newaddr(node_factory, chainparams): both = l1.rpc.newaddr('all') assert 'p2sh-segwit' not in both assert both['bech32'].startswith(chainparams['bip173_prefix']) + assert both['p2tr'].startswith(chainparams['bip173_prefix']) def test_bitcoind_fail_first(node_factory, bitcoind):