Add ShutdownScript for BOLT 2 acceptable scripts
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 22 Jul 2021 01:12:14 +0000 (20:12 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Sat, 31 Jul 2021 03:49:30 +0000 (22:49 -0500)
commit25a6a77468b3108555cc6ab3b716cd8934584646
treea5ce011b7171e9e2473ee0463c89acdbe5c00a5c
parente861ad66f162b2546507cfedcf160462ea39a8eb
Add ShutdownScript for BOLT 2 acceptable scripts

BOLT 2 enumerates the script formats that may be used for a shutdown
script. KeysInterface::get_shutdown_pubkey returns a PublicKey used to
form one of the acceptable formats (P2WPKH). Add a ShutdownScript
abstraction to encapsulate all accept formats and be backwards
compatible with P2WPKH scripts serialized as the corresponding
PublicKey.
lightning/src/ln/mod.rs
lightning/src/ln/script.rs [new file with mode: 0644]