You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a) we always pull that method, so no matter when we send it, gotta override KeysInterface 's get_shutdown_pubkey and return your own public key at that time. That interface may change to a (native-segwit-only) script soon-ish, but other lightning nodes need to upgrade for us to be able to do that.
b) we can do it later or earlier, currently we fetch the public key at channel open no matter what, but then can optionally send it to the peer later based on https://docs.rs/lightning/0.0.99/lightning/util/config/struct.ChannelConfig.html#structfield.commit_upfront_shutdown_pubkey will fix that to pull the public key at shutdown-time instead.
Matt Corallo 5 minutes ago
In any case, create your own KeysInterface implementation, with each method just calling a KeysManager.as_KeysInterface() method, except get_shutdown_pubkey where you provide the public key you want to pay out to (via p2wpkh).
Matt Corallo 5 minutes ago
Then, set ChannelConfig.commit_upfront_shutdown_pubkey to false when you open the channel/create your ChannelManager.
Matt Corallo 4 minutes ago
Then, in 0.0.100, LDK will call get_shutdown_pubkey only when the channel is about to be closed and use the public key provided there (as p2wpkh)
Matt Corallo 2 minutes ago
Note that if you do this, you must ignore SpendableOutputs objects of which are just a SpendableOutputDescriptor::StaticOutput where the output's script_pubkey is the public key you provided
Matt Corallo 1 minute ago
Note that you can ignore all SpendableOutputDescriptor::StaticOutput objects if you also override the get_destination_script() method in KeysInterface
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: