multi: add co-op close custom data to close update
With this commit we populate additional information about the close outputs (including potential custom channel data) in the close update RPC message. This will allow custom channels to find out how the additional close outputs look like on chain and what data they might commit to. We also hook up the aux custom data formatter, so it can format the custom channel data to JSON.
This commit is contained in:
5 files changed
+3624
-3308
No files matched your search
@@ -2033,10 +2033,38 @@ message ChannelOpenUpdate {
|
||||
ChannelPoint channel_point = 1;
|
||||
}
|
||||
|
||||
message CloseOutput {
|
||||
// The amount in satoshi of this close output. This amount is the final
|
||||
// commitment balance of the channel and the actual amount paid out on chain
|
||||
// might be smaller due to subtracted fees.
|
||||
int64 amount_sat = 1;
|
||||
|
||||
// The pkScript of the close output.
|
||||
bytes pk_script = 2;
|
||||
|
||||
// Whether this output is for the local or remote node.
|
||||
bool is_local = 3;
|
||||
|
||||
// The TLV encoded custom channel data records for this output, which might
|
||||
// be set for custom channels.
|
||||
bytes custom_channel_data = 4;
|
||||
}
|
||||
|
||||
message ChannelCloseUpdate {
|
||||
bytes closing_txid = 1;
|
||||
|
||||
bool success = 2;
|
||||
|
||||
// The local channel close output. If the local channel balance was dust to
|
||||
// begin with, this output will not be set.
|
||||
CloseOutput local_close_output = 3;
|
||||
|
||||
// The remote channel close output. If the remote channel balance was dust
|
||||
// to begin with, this output will not be set.
|
||||
CloseOutput remote_close_output = 4;
|
||||
|
||||
// Any additional outputs that might be added for custom channel types.
|
||||
repeated CloseOutput additional_outputs = 5;
|
||||
}
|
||||
|
||||
message CloseChannelRequest {
|
||||
|
||||
Reference in new issue
Block a user