mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
rpc: have fundchannel_start also return scriptpubkey
Easier to pass it back than dig it out of the address, since we have it. Needed for extracting fundchannel
This commit is contained in:
parent
19e65068a9
commit
b1f05795a8
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
- JSON API: `listfunds` now lists a blockheight for confirmed transactions
|
- JSON API: `listfunds` now lists a blockheight for confirmed transactions
|
||||||
|
- JSON API: `fundchannel_start` result now includes field `scriptpubkey`
|
||||||
|
|
||||||
- bolt11: support for parsing feature bits (field `9`).
|
- bolt11: support for parsing feature bits (field `9`).
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ transaction before that can lead to unrecoverable loss of funds\.
|
|||||||
|
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
|
|
||||||
On success, returns the \fIfunding_address\fR for the channel\.
|
On success, returns the \fIfunding_address\fR and the \fIscriptpubkey\fR for the channel funding output\.
|
||||||
|
|
||||||
|
|
||||||
On failure, returns an error\.
|
On failure, returns an error\.
|
||||||
|
@ -32,7 +32,7 @@ transaction before that can lead to unrecoverable loss of funds.
|
|||||||
RETURN VALUE
|
RETURN VALUE
|
||||||
------------
|
------------
|
||||||
|
|
||||||
On success, returns the *funding\_address* for the channel.
|
On success, returns the *funding\_address* and the *scriptpubkey* for the channel funding output.
|
||||||
|
|
||||||
On failure, returns an error.
|
On failure, returns an error.
|
||||||
|
|
||||||
|
@ -343,8 +343,10 @@ static void funding_started_success(struct funding_channel *fc,
|
|||||||
out = encode_scriptpubkey_to_addr(cmd,
|
out = encode_scriptpubkey_to_addr(cmd,
|
||||||
get_chainparams(cmd->ld)->bip173_name,
|
get_chainparams(cmd->ld)->bip173_name,
|
||||||
scriptPubkey);
|
scriptPubkey);
|
||||||
if (out)
|
if (out) {
|
||||||
json_add_string(response, "funding_address", out);
|
json_add_string(response, "funding_address", out);
|
||||||
|
json_add_hex_talarr(response, "scriptpubkey", scriptPubkey);
|
||||||
|
}
|
||||||
|
|
||||||
/* Clear this so cancel doesn't think it's still in progress */
|
/* Clear this so cancel doesn't think it's still in progress */
|
||||||
fc->cmd = NULL;
|
fc->cmd = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user