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:
Oliver Gugger committed 2024-09-19 10:18:41 +02:00
1 parent 8dee76a1b8
commit e0b4601fb9
5 files changed
+3624 -3308

No files matched your search

+39
View File
@@ -4156,6 +4156,21 @@
},
"success": {
"type": "boolean"
},
"local_close_output": {
"$ref": "#/definitions/lnrpcCloseOutput",
"description": "The local channel close output. If the local channel balance was dust to\nbegin with, this output will not be set."
},
"remote_close_output": {
"$ref": "#/definitions/lnrpcCloseOutput",
"description": "The remote channel close output. If the remote channel balance was dust\nto begin with, this output will not be set."
},
"additional_outputs": {
"type": "array",
"items": {
"$ref": "#/definitions/lnrpcCloseOutput"
},
"description": "Any additional outputs that might be added for custom channel types."
}
}
},
@@ -4465,6 +4480,30 @@
}
}
},
"lnrpcCloseOutput": {
"type": "object",
"properties": {
"amount_sat": {
"type": "string",
"format": "int64",
"description": "The amount in satoshi of this close output. This amount is the final\ncommitment balance of the channel and the actual amount paid out on chain\nmight be smaller due to subtracted fees."
},
"pk_script": {
"type": "string",
"format": "byte",
"description": "The pkScript of the close output."
},
"is_local": {
"type": "boolean",
"description": "Whether this output is for the local or remote node."
},
"custom_channel_data": {
"type": "string",
"format": "byte",
"description": "The TLV encoded custom channel data records for this output, which might\nbe set for custom channels."
}
}
},
"lnrpcCloseStatusUpdate": {
"type": "object",
"properties": {