@@ -15,7 +15,9 @@ pub use crate::config::{
15
15
EsploraSyncConfig , MaxDustHTLCExposure ,
16
16
} ;
17
17
pub 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
+ } ;
19
21
pub use crate :: logger:: { LogLevel , LogRecord , LogWriter } ;
20
22
pub use crate :: payment:: store:: {
21
23
ConfirmationStatus , LSPFeeLimits , PaymentDirection , PaymentKind , PaymentStatus ,
@@ -33,17 +35,17 @@ pub use lightning_types::payment::{PaymentHash, PaymentPreimage, PaymentSecret};
33
35
34
36
pub use lightning_invoice:: { Description , SignedRawBolt11Invoice } ;
35
37
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
+ } ;
38
42
39
43
pub use bitcoin:: { Address , BlockHash , FeeRate , Network , OutPoint , Txid } ;
40
44
41
45
pub use bip39:: Mnemonic ;
42
46
43
47
pub use vss_client:: headers:: { VssHeaderProvider , VssHeaderProviderError } ;
44
48
45
- pub type DateTime = chrono:: DateTime < chrono:: Utc > ;
46
-
47
49
use crate :: UniffiCustomTypeConverter ;
48
50
49
51
use crate :: builder:: sanitize_alias;
@@ -1068,11 +1070,11 @@ impl std::fmt::Display for Bolt11Invoice {
1068
1070
1069
1071
/// A Lightning payment using BOLT 11.
1070
1072
#[ derive( Clone , Debug , PartialEq , Eq ) ]
1071
- pub struct Bolt11PaymentInfo {
1073
+ pub struct LSPS1Bolt11PaymentInfo {
1072
1074
/// Indicates the current state of the payment.
1073
- pub state : PaymentState ,
1075
+ pub state : LSPS1PaymentState ,
1074
1076
/// The datetime when the payment option expires.
1075
- pub expires_at : chrono :: DateTime < chrono :: Utc > ,
1077
+ pub expires_at : LSPSDateTime ,
1076
1078
/// The total fee the LSP will charge to open this channel in satoshi.
1077
1079
pub fee_total_sat : u64 ,
1078
1080
/// The amount the client needs to pay to have the requested channel openend.
@@ -1081,8 +1083,8 @@ pub struct Bolt11PaymentInfo {
1081
1083
pub invoice : Arc < Bolt11Invoice > ,
1082
1084
}
1083
1085
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 {
1086
1088
Self {
1087
1089
state : info. state ,
1088
1090
expires_at : info. expires_at ,
@@ -1093,7 +1095,7 @@ impl From<lightning_liquidity::lsps1::msgs::Bolt11PaymentInfo> for Bolt11Payment
1093
1095
}
1094
1096
}
1095
1097
1096
- impl UniffiCustomTypeConverter for OrderId {
1098
+ impl UniffiCustomTypeConverter for LSPS1OrderId {
1097
1099
type Builtin = String ;
1098
1100
1099
1101
fn into_custom ( val : Self :: Builtin ) -> uniffi:: Result < Self > {
@@ -1105,11 +1107,11 @@ impl UniffiCustomTypeConverter for OrderId {
1105
1107
}
1106
1108
}
1107
1109
1108
- impl UniffiCustomTypeConverter for DateTime {
1110
+ impl UniffiCustomTypeConverter for LSPSDateTime {
1109
1111
type Builtin = String ;
1110
1112
1111
1113
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 ) ?)
1113
1115
}
1114
1116
1115
1117
fn from_custom ( obj : Self ) -> Self :: Builtin {
0 commit comments