Skip to content

Commit e711b26

Browse files
committed
Add ChannelSigner::get_funding_spk
1 parent 77b6fd4 commit e711b26

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lightning/src/sign/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,15 @@ pub trait ChannelSigner {
13931393
}
13941394
ret
13951395
}
1396+
1397+
/// Get the script pubkey of the funding transaction
1398+
fn get_funding_spk(&self) -> ScriptBuf {
1399+
let params = self.get_channel_parameters().unwrap();
1400+
let holder_pubkey = params.holder_pubkeys.funding_pubkey;
1401+
let counterparty_pubkey =
1402+
params.counterparty_parameters.as_ref().unwrap().pubkeys.funding_pubkey;
1403+
make_funding_redeemscript(&holder_pubkey, &counterparty_pubkey).to_p2wsh()
1404+
}
13961405
}
13971406

13981407
/// Specifies the recipient of an invoice.

0 commit comments

Comments
 (0)