X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fsign%2Fmod.rs;h=39f1001c480fd45926aed14355d78068028bfdc5;hb=9b1b724dad71b5a7ffbc76b1350c98a5a5130d44;hp=9a30253049d1bf0816626377ce0c258e568db7e9;hpb=3299d88595d6014dafa6f897a970330ee734e104;p=rust-lightning diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs index 9a302530..39f1001c 100644 --- a/lightning/src/sign/mod.rs +++ b/lightning/src/sign/mod.rs @@ -134,6 +134,22 @@ pub struct StaticPaymentOutputDescriptor { pub channel_transaction_parameters: Option, } impl StaticPaymentOutputDescriptor { + /// Returns the `witness_script` of the spendable output. + /// + /// Note that this will only return `Some` for [`StaticPaymentOutputDescriptor`]s that + /// originated from an anchor outputs channel, as they take the form of a P2WSH script. + pub fn witness_script(&self) -> Option