From: Wilmer Paulino Date: Thu, 28 Sep 2023 19:31:43 +0000 (-0700) Subject: Expose witness_script for StaticPaymentOutputDescriptor X-Git-Tag: v0.0.117-rc1~4^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=f464aa97c3c534666991c6cb3496058bc0d0de4e;p=rust-lightning Expose witness_script for StaticPaymentOutputDescriptor --- diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs index 9a3025304..39f1001c4 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