@@ -15,7 +15,9 @@ pub use crate::config::{
1515 EsploraSyncConfig , MaxDustHTLCExposure ,
1616} ;
1717pub use crate :: graph:: { ChannelInfo , ChannelUpdateInfo , NodeAnnouncementInfo , NodeInfo } ;
18- pub use crate :: liquidity:: { LSPS1OrderStatus , LSPS2ServiceConfig , OnchainPaymentInfo , PaymentInfo } ;
18+ pub use crate :: liquidity:: {
19+ LSPS1OnchainPaymentInfo , LSPS1OrderStatus , LSPS1PaymentInfo , LSPS2ServiceConfig ,
20+ } ;
1921pub use crate :: logger:: { LogLevel , LogRecord , LogWriter } ;
2022pub use crate :: payment:: store:: {
2123 ConfirmationStatus , LSPFeeLimits , PaymentDirection , PaymentKind , PaymentStatus ,
@@ -33,17 +35,17 @@ pub use lightning_types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
3335
3436pub use lightning_invoice:: { Description , SignedRawBolt11Invoice } ;
3537
36- pub use lightning_liquidity:: lsps1:: msgs:: ChannelInfo as ChannelOrderInfo ;
37- pub use lightning_liquidity:: lsps1:: msgs:: { OrderId , OrderParameters , PaymentState } ;
38+ pub use lightning_liquidity:: lsps0:: ser:: LSPSDateTime ;
39+ pub use lightning_liquidity:: lsps1:: msgs:: {
40+ LSPS1ChannelInfo , LSPS1OrderId , LSPS1OrderParams , LSPS1PaymentState ,
41+ } ;
3842
3943pub use bitcoin:: { Address , BlockHash , FeeRate , Network , OutPoint , Txid } ;
4044
4145pub use bip39:: Mnemonic ;
4246
4347pub use vss_client:: headers:: { VssHeaderProvider , VssHeaderProviderError } ;
4448
45- pub type DateTime = chrono:: DateTime < chrono:: Utc > ;
46-
4749use crate :: UniffiCustomTypeConverter ;
4850
4951use crate :: builder:: sanitize_alias;
@@ -1068,11 +1070,11 @@ impl std::fmt::Display for Bolt11Invoice {
10681070
10691071/// A Lightning payment using BOLT 11.
10701072#[ derive( Clone , Debug , PartialEq , Eq ) ]
1071- pub struct Bolt11PaymentInfo {
1073+ pub struct LSPS1Bolt11PaymentInfo {
10721074 /// Indicates the current state of the payment.
1073- pub state : PaymentState ,
1075+ pub state : LSPS1PaymentState ,
10741076 /// The datetime when the payment option expires.
1075- pub expires_at : chrono :: DateTime < chrono :: Utc > ,
1077+ pub expires_at : LSPSDateTime ,
10761078 /// The total fee the LSP will charge to open this channel in satoshi.
10771079 pub fee_total_sat : u64 ,
10781080 /// The amount the client needs to pay to have the requested channel openend.
@@ -1081,8 +1083,8 @@ pub struct Bolt11PaymentInfo {
10811083 pub invoice : Arc < Bolt11Invoice > ,
10821084}
10831085
1084- impl From < lightning_liquidity:: lsps1:: msgs:: Bolt11PaymentInfo > for Bolt11PaymentInfo {
1085- fn from ( info : lightning_liquidity:: lsps1:: msgs:: Bolt11PaymentInfo ) -> Self {
1086+ impl From < lightning_liquidity:: lsps1:: msgs:: LSPS1Bolt11PaymentInfo > for LSPS1Bolt11PaymentInfo {
1087+ fn from ( info : lightning_liquidity:: lsps1:: msgs:: LSPS1Bolt11PaymentInfo ) -> Self {
10861088 Self {
10871089 state : info. state ,
10881090 expires_at : info. expires_at ,
@@ -1093,7 +1095,7 @@ impl From<lightning_liquidity::lsps1::msgs::Bolt11PaymentInfo> for Bolt11Payment
10931095 }
10941096}
10951097
1096- impl UniffiCustomTypeConverter for OrderId {
1098+ impl UniffiCustomTypeConverter for LSPS1OrderId {
10971099 type Builtin = String ;
10981100
10991101 fn into_custom ( val : Self :: Builtin ) -> uniffi:: Result < Self > {
@@ -1105,11 +1107,11 @@ impl UniffiCustomTypeConverter for OrderId {
11051107 }
11061108}
11071109
1108- impl UniffiCustomTypeConverter for DateTime {
1110+ impl UniffiCustomTypeConverter for LSPSDateTime {
11091111 type Builtin = String ;
11101112
11111113 fn into_custom ( val : Self :: Builtin ) -> uniffi:: Result < Self > {
1112- Ok ( DateTime :: from_str ( & val) . map_err ( |_| Error :: InvalidDateTime ) ?)
1114+ Ok ( LSPSDateTime :: from_str ( & val) . map_err ( |_| Error :: InvalidDateTime ) ?)
11131115 }
11141116
11151117 fn from_custom ( obj : Self ) -> Self :: Builtin {
0 commit comments