mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-11 01:27:58 +01:00
newaddr: various fixes for msggen and docs
Changelog-None
This commit is contained in:
parent
9ad5c6bc75
commit
507c2de9c1
7 changed files with 20 additions and 31 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
20
cln-rpc/src/model.rs
generated
20
cln-rpc/src/model.rs
generated
|
@ -1168,7 +1168,7 @@ pub mod requests {
|
|||
fn try_from(c: i32) -> Result<NewaddrAddresstype, anyhow::Error> {
|
||||
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<GetinfoBindingType, anyhow::Error> {
|
||||
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<i32> for MultifundchannelFailedMethod {
|
||||
|
|
|
@ -133,11 +133,6 @@ class LightningGrpc(object):
|
|||
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):
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue