@@ -894,6 +894,7 @@ impl InMemorySigner {
894
894
/// Returns the counterparty's pubkeys.
895
895
///
896
896
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
897
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
897
898
pub fn counterparty_pubkeys ( & self ) -> Option < & ChannelPublicKeys > {
898
899
self . get_channel_parameters ( )
899
900
. and_then ( |params| params. counterparty_parameters . as_ref ( ) . map ( |params| & params. pubkeys ) )
@@ -904,6 +905,7 @@ impl InMemorySigner {
904
905
/// broadcast a transaction.
905
906
///
906
907
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
908
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
907
909
pub fn counterparty_selected_contest_delay ( & self ) -> Option < u16 > {
908
910
self . get_channel_parameters ( )
909
911
. and_then ( |params| params. counterparty_parameters . as_ref ( ) . map ( |params| params. selected_contest_delay ) )
@@ -914,20 +916,23 @@ impl InMemorySigner {
914
916
/// if they broadcast a transaction.
915
917
///
916
918
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
919
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
917
920
pub fn holder_selected_contest_delay ( & self ) -> Option < u16 > {
918
921
self . get_channel_parameters ( ) . map ( |params| params. holder_selected_contest_delay )
919
922
}
920
923
921
924
/// Returns whether the holder is the initiator.
922
925
///
923
926
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
927
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
924
928
pub fn is_outbound ( & self ) -> Option < bool > {
925
929
self . get_channel_parameters ( ) . map ( |params| params. is_outbound_from_holder )
926
930
}
927
931
928
932
/// Funding outpoint
929
933
///
930
934
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
935
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
931
936
pub fn funding_outpoint ( & self ) -> Option < & OutPoint > {
932
937
self . get_channel_parameters ( ) . map ( |params| params. funding_outpoint . as_ref ( ) ) . flatten ( )
933
938
}
@@ -936,6 +941,7 @@ impl InMemorySigner {
936
941
/// building transactions.
937
942
///
938
943
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
944
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
939
945
pub fn get_channel_parameters ( & self ) -> Option < & ChannelTransactionParameters > {
940
946
self . channel_parameters . as_ref ( )
941
947
}
@@ -944,6 +950,7 @@ impl InMemorySigner {
944
950
/// determining a channel's category, i. e. legacy/anchors/taproot/etc.
945
951
///
946
952
/// Will return `None` if [`ChannelSigner::provide_channel_parameters`] has not been called.
953
+ /// In general, this is safe to `unwrap` only in [`ChannelSigner`] implementation.
947
954
pub fn channel_type_features ( & self ) -> Option < & ChannelTypeFeatures > {
948
955
self . get_channel_parameters ( ) . map ( |params| & params. channel_type_features )
949
956
}
0 commit comments