newaddr: various fixes for msggen and docs

Changelog-None
This commit is contained in:
daywalker90 2024-04-14 12:35:47 +02:00 committed by Christian Decker
parent 9ad5c6bc75
commit 507c2de9c1
7 changed files with 10 additions and 21 deletions

View File

@ -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

View File

@ -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:

BIN
cln-rpc/src/model.rs generated

Binary file not shown.

View File

@ -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):

View File

@ -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
```

View File

@ -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

View File

@ -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):