@@ -169,12 +169,15 @@ pub(super) enum HTLCFailReason {
169
169
}
170
170
171
171
/// payment_hash type, use to cross-lock hop
172
+ /// (C-not exported) as we just use [u8; 32] directly
172
173
#[ derive( Hash , Copy , Clone , PartialEq , Eq , Debug ) ]
173
174
pub struct PaymentHash ( pub [ u8 ; 32 ] ) ;
174
175
/// payment_preimage type, use to route payment between hop
176
+ /// (C-not exported) as we just use [u8; 32] directly
175
177
#[ derive( Hash , Copy , Clone , PartialEq , Eq , Debug ) ]
176
178
pub struct PaymentPreimage ( pub [ u8 ; 32 ] ) ;
177
179
/// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together
180
+ /// (C-not exported) as we just use [u8; 32] directly
178
181
#[ derive( Hash , Copy , Clone , PartialEq , Eq , Debug ) ]
179
182
pub struct PaymentSecret ( pub [ u8 ; 32 ] ) ;
180
183
@@ -753,6 +756,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
753
756
///
754
757
/// Raises APIError::APIMisuseError when channel_value_satoshis > 2**24 or push_msat is
755
758
/// greater than channel_value_satoshis * 1k or channel_value_satoshis is < 1000.
759
+ /// (C-not exported) due to Result
756
760
pub fn create_channel ( & self , their_network_key : PublicKey , channel_value_satoshis : u64 , push_msat : u64 , user_id : u64 , override_config : Option < UserConfig > ) -> Result < ( ) , APIError > {
757
761
if channel_value_satoshis < 1000 {
758
762
return Err ( APIError :: APIMisuseError { err : "channel_value must be at least 1000 satoshis" } ) ;
@@ -812,6 +816,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
812
816
813
817
/// Gets the list of open channels, in random order. See ChannelDetail field documentation for
814
818
/// more information.
819
+ /// (C-not exported) due to Vec
815
820
pub fn list_channels ( & self ) -> Vec < ChannelDetails > {
816
821
self . list_channels_with_filter ( |_| true )
817
822
}
@@ -821,6 +826,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
821
826
///
822
827
/// These are guaranteed to have their is_live value set to true, see the documentation for
823
828
/// ChannelDetails::is_live for more info on exactly what the criteria are.
829
+ /// (C-not exported) due to Vec
824
830
pub fn list_usable_channels ( & self ) -> Vec < ChannelDetails > {
825
831
// Note we use is_live here instead of usable which leads to somewhat confused
826
832
// internal/external nomenclature, but that's ok cause that's probably what the user
@@ -833,6 +839,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
833
839
/// pending HTLCs, the channel will be closed on chain.
834
840
///
835
841
/// May generate a SendShutdown message event on success, which should be relayed.
842
+ /// (C-not exported) due to Result
836
843
pub fn close_channel ( & self , channel_id : & [ u8 ; 32 ] ) -> Result < ( ) , APIError > {
837
844
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
838
845
@@ -1339,6 +1346,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1339
1346
/// If a payment_secret *is* provided, we assume that the invoice had the payment_secret feature
1340
1347
/// bit set (either as required or as available). If multiple paths are present in the Route,
1341
1348
/// we assume the invoice had the basic_mpp feature set.
1349
+ /// (C-not exported) due to Option + Result
1342
1350
pub fn send_payment ( & self , route : & Route , payment_hash : PaymentHash , payment_secret : & Option < PaymentSecret > ) -> Result < ( ) , PaymentSendFailure > {
1343
1351
if route. paths . len ( ) < 1 {
1344
1352
return Err ( PaymentSendFailure :: ParameterError ( APIError :: RouteError { err : "There must be at least one path to send over" } ) ) ;
@@ -1406,6 +1414,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1406
1414
///
1407
1415
/// May panic if the funding_txo is duplicative with some other channel (note that this should
1408
1416
/// be trivially prevented by using unique funding transaction keys per-channel).
1417
+ /// (C-not exported) due to OutPoint
1409
1418
pub fn funding_transaction_generated ( & self , temporary_channel_id : & [ u8 ; 32 ] , funding_txo : OutPoint ) {
1410
1419
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
1411
1420
@@ -1489,6 +1498,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1489
1498
/// only Tor Onion addresses.
1490
1499
///
1491
1500
/// Panics if addresses is absurdly large (more than 500).
1501
+ /// (C-not exported) due to Vec
1492
1502
pub fn broadcast_node_announcement ( & self , rgb : [ u8 ; 3 ] , alias : [ u8 ; 32 ] , addresses : Vec < msgs:: NetAddress > ) {
1493
1503
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
1494
1504
@@ -1797,6 +1807,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1797
1807
/// along the path (including in our own channel on which we received it).
1798
1808
/// Returns false if no payment was found to fail backwards, true if the process of failing the
1799
1809
/// HTLC backwards has been started.
1810
+ /// (C-not exported) due to Option
1800
1811
pub fn fail_htlc_backwards ( & self , payment_hash : & PaymentHash , payment_secret : & Option < PaymentSecret > ) -> bool {
1801
1812
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
1802
1813
@@ -1936,6 +1947,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
1936
1947
/// set. Thus, for such payments we will claim any payments which do not under-pay.
1937
1948
///
1938
1949
/// May panic if called except in response to a PaymentReceived event.
1950
+ /// (C-not exported) due to Option
1939
1951
pub fn claim_funds ( & self , payment_preimage : PaymentPreimage , payment_secret : & Option < PaymentSecret > , expected_amount : u64 ) -> bool {
1940
1952
let payment_hash = PaymentHash ( Sha256 :: hash ( & payment_preimage. 0 ) . into_inner ( ) ) ;
1941
1953
@@ -2123,6 +2135,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
2123
2135
/// 3) update(s) are applied to each remote copy of a ChannelMonitor,
2124
2136
/// 4) once all remote copies are updated, you call this function with the update_id that
2125
2137
/// completed, and once it is the latest the Channel will be re-enabled.
2138
+ /// (C-not exported) due to OutPoint
2126
2139
pub fn channel_monitor_updated ( & self , funding_txo : & OutPoint , highest_applied_update_id : u64 ) {
2127
2140
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
2128
2141
@@ -2833,6 +2846,7 @@ impl<ChanSigner: ChannelKeys, M: Deref, T: Deref, K: Deref, F: Deref> ChannelMan
2833
2846
/// If successful, will generate a UpdateHTLCs event, so you should probably poll
2834
2847
/// PeerManager::process_events afterwards.
2835
2848
/// Note: This API is likely to change!
2849
+ /// (C-not exported) Cause its doc(hidden) anyway
2836
2850
#[ doc( hidden) ]
2837
2851
pub fn update_fee ( & self , channel_id : [ u8 ; 32 ] , feerate_per_kw : u64 ) -> Result < ( ) , APIError > {
2838
2852
let _ = self . total_consistency_lock . read ( ) . unwrap ( ) ;
@@ -3633,6 +3647,7 @@ impl<ChanSigner: ChannelKeys + Writeable, M: Deref, T: Deref, K: Deref, F: Deref
3633
3647
/// 5) Move the ChannelMonitors into your local ManyChannelMonitor.
3634
3648
/// 6) Disconnect/connect blocks on the ChannelManager.
3635
3649
/// 7) Register the new ChannelManager with your ChainWatchInterface.
3650
+ /// (C-not exported) due to references
3636
3651
pub struct ChannelManagerReadArgs < ' a , ChanSigner : ' a + ChannelKeys , M : Deref , T : Deref , K : Deref , F : Deref >
3637
3652
where M :: Target : ManyChannelMonitor < Keys =ChanSigner > ,
3638
3653
T :: Target : BroadcasterInterface ,
0 commit comments