I would like to know if it is possible when closing a Lightning channel to specify an address to retrieve other than the default one?
Thank you in advance for the answers.
I would like to know if it is possible when closing a Lightning channel to specify an address to retrieve other than the default one?
Thank you in advance for the answers.
Yes, it is possible!
In BOLT 2 you have a shutdown message that looks like this
type: 38 (shutdown)
data:
[channel_id:channel_id]
[u16:len]
[len*byte:scriptpubkey]
The scriptpubkey
does the trick. This is trivial.
But the really good thing that you can do with lighting is when you open a channel, you can specify the address where you want to close your channel. So, in this way, you can lose your channel key and when the counterpart force closes the channel, you can take back in a cold wallet the UTXO
You can check this feature inside the open_channel In particular in the TCV types
types:
type: 0 (upfront_shutdown_script)
data:
[...*byte:shutdown_scriptpubkey]