-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lsp): Add support for lsp
in lampo
#277
base: main
Are you sure you want to change the base?
Changes from all commits
af4ec91
ba24141
bf9692e
b621c4d
cabe25a
7257d8c
fd02eac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
use bitcoin::secp256k1::PublicKey; | ||
use lightning::events::HTLCDestination; | ||
use lightning::ln::{channelmanager::InterceptId, ChannelId, PaymentHash}; | ||
use lightning_liquidity::{lsps0::ser::RequestId, lsps2::msgs::OpeningFeeParams}; | ||
|
||
#[derive(Debug, Clone)] | ||
pub enum LiquidityEvent { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure that this is the correct place where to put the event, but maybe this can be moved later in another crate |
||
OpenParamsReady { | ||
counterparty_node_id: PublicKey, | ||
opening_fee_params_menu: Vec<OpeningFeeParams>, | ||
}, | ||
InvoiceparamsReady { | ||
counterparty_node_id: PublicKey, | ||
intercept_scid: u64, | ||
cltv_expiry_delta: u32, | ||
}, | ||
BuyRequest { | ||
request_id: RequestId, | ||
counterparty_node_id: PublicKey, | ||
opening_fee_params: OpeningFeeParams, | ||
payment_size_msat: Option<u64>, | ||
}, | ||
Geinfo { | ||
request_id: RequestId, | ||
counterparty_node_id: PublicKey, | ||
token: Option<String>, | ||
}, | ||
OpenChannel { | ||
their_network_key: PublicKey, | ||
amt_to_forward_msat: u64, | ||
opening_fee_msat: u64, | ||
user_channel_id: u128, | ||
intercept_scid: u64, | ||
}, | ||
HTLCHandlingFailed { | ||
prev_channel_id: ChannelId, | ||
failed_next_destination: HTLCDestination, | ||
}, | ||
HTLCIntercepted { | ||
intercept_id: InterceptId, | ||
requested_next_hop_scid: u64, | ||
payment_hash: PaymentHash, | ||
inbound_amount_msat: u64, | ||
expected_outbound_amount_msat: u64, | ||
}, | ||
PaymentForwarded { | ||
prev_channel_id: Option<ChannelId>, | ||
next_channel_id: Option<ChannelId>, | ||
prev_user_channel_id: Option<u128>, | ||
next_user_channel_id: Option<u128>, | ||
total_fee_earned_msat: Option<u64>, | ||
skimmed_fee_msat: Option<u64>, | ||
claim_from_onchain_tx: bool, | ||
outbound_amount_forwarded_msat: Option<u64>, | ||
}, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,7 @@ pub mod btc_rpc { | |
pub mempoolminfee: f32, | ||
} | ||
} | ||
|
||
pub mod chrono { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not understand why we need this |
||
pub use chrono::*; | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -8,7 +8,7 @@ use std::time::SystemTime; | |||||
// FIXME: this is not async we should modify it | ||||||
use std::fs::File; | ||||||
|
||||||
use chrono::prelude::*; | ||||||
use crate::chrono::prelude::*; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
use colored::*; | ||||||
|
||||||
pub use log::{Level, Log, Metadata, Record, SetLoggerError}; | ||||||
|
@@ -53,7 +53,7 @@ impl Log for Logger { | |||||
writeln!( | ||||||
stream, | ||||||
"{} {}", | ||||||
DateTime::from(SystemTime::now()) | ||||||
DateTime::<Utc>::from(SystemTime::now()) | ||||||
.to_rfc3339_opts(SecondsFormat::Millis, true) | ||||||
.white(), | ||||||
message, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is the correct place