X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fsign%2Fmod.rs;h=04c4446e2c0c8c75bd4f2f7e3b415b8f35296cf2;hb=34f8dd9a49060676da0cf4157613cfb5fd58cf1e;hp=ebcd106b80b4a2ac55e8358701e56747afeaa8a2;hpb=65569ed5d68b67efabd37bfc593268a66bb1fd55;p=rust-lightning diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs index ebcd106b..04c4446e 100644 --- a/lightning/src/sign/mod.rs +++ b/lightning/src/sign/mod.rs @@ -275,6 +275,9 @@ impl SpendableOutputDescriptor { /// /// Note that this does not include any signatures, just the information required to /// construct the transaction and sign it. + /// + /// This is not exported to bindings users as there is no standard serialization for an input. + /// See [`Self::create_spendable_outputs_psbt`] instead. pub fn to_psbt_input(&self) -> bitcoin::psbt::Input { match self { SpendableOutputDescriptor::StaticOutput { output, .. } => { @@ -894,6 +897,7 @@ impl InMemorySigner { /// Returns the counterparty's pubkeys. /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn counterparty_pubkeys(&self) -> Option<&ChannelPublicKeys> { self.get_channel_parameters() .and_then(|params| params.counterparty_parameters.as_ref().map(|params| ¶ms.pubkeys)) @@ -904,6 +908,7 @@ impl InMemorySigner { /// broadcast a transaction. /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn counterparty_selected_contest_delay(&self) -> Option { self.get_channel_parameters() .and_then(|params| params.counterparty_parameters.as_ref().map(|params| params.selected_contest_delay)) @@ -914,6 +919,7 @@ impl InMemorySigner { /// if they broadcast a transaction. /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn holder_selected_contest_delay(&self) -> Option { self.get_channel_parameters().map(|params| params.holder_selected_contest_delay) } @@ -921,6 +927,7 @@ impl InMemorySigner { /// Returns whether the holder is the initiator. /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn is_outbound(&self) -> Option { self.get_channel_parameters().map(|params| params.is_outbound_from_holder) } @@ -928,6 +935,7 @@ impl InMemorySigner { /// Funding outpoint /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn funding_outpoint(&self) -> Option<&OutPoint> { self.get_channel_parameters().map(|params| params.funding_outpoint.as_ref()).flatten() } @@ -936,6 +944,7 @@ impl InMemorySigner { /// building transactions. /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn get_channel_parameters(&self) -> Option<&ChannelTransactionParameters> { self.channel_parameters.as_ref() } @@ -944,6 +953,7 @@ impl InMemorySigner { /// determining a channel's category, i. e. legacy/anchors/taproot/etc. /// /// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called. + /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation. pub fn channel_type_features(&self) -> Option<&ChannelTypeFeatures> { self.get_channel_parameters().map(|params| ¶ms.channel_type_features) }