pub struct Cln { /* private fields */ }Expand description
CLN mint backend
Implementations§
source§impl Cln
impl Cln
sourcepub async fn new(
rpc_socket: PathBuf,
fee_reserve: FeeReserve,
mint_settings: MintMeltSettings,
melt_settings: MintMeltSettings,
) -> Result<Self, Error>
pub async fn new( rpc_socket: PathBuf, fee_reserve: FeeReserve, mint_settings: MintMeltSettings, melt_settings: MintMeltSettings, ) -> Result<Self, Error>
Create new Cln
Trait Implementations§
source§impl MintLightning for Cln
impl MintLightning for Cln
source§fn get_settings(&self) -> Settings
fn get_settings(&self) -> Settings
Base Unit
source§fn wait_any_invoice<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = String> + Send>>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_any_invoice<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = String> + Send>>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Listen for invoices to be paid to the mint
Returns a stream of request_lookup_id once invoices are paid
source§fn get_payment_quote<'life0, 'life1, 'async_trait>(
&'life0 self,
melt_quote_request: &'life1 MeltQuoteBolt11Request,
) -> Pin<Box<dyn Future<Output = Result<PaymentQuoteResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_payment_quote<'life0, 'life1, 'async_trait>(
&'life0 self,
melt_quote_request: &'life1 MeltQuoteBolt11Request,
) -> Pin<Box<dyn Future<Output = Result<PaymentQuoteResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get payment quote
Used to get fee and amount required for a payment request
source§fn pay_invoice<'life0, 'async_trait>(
&'life0 self,
melt_quote: MeltQuote,
partial_amount: Option<Amount>,
max_fee: Option<Amount>,
) -> Pin<Box<dyn Future<Output = Result<PayInvoiceResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pay_invoice<'life0, 'async_trait>(
&'life0 self,
melt_quote: MeltQuote,
partial_amount: Option<Amount>,
max_fee: Option<Amount>,
) -> Pin<Box<dyn Future<Output = Result<PayInvoiceResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Pay bolt11 invoice
source§fn create_invoice<'life0, 'life1, 'async_trait>(
&'life0 self,
amount: Amount,
unit: &'life1 CurrencyUnit,
description: String,
unix_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<CreateInvoiceResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_invoice<'life0, 'life1, 'async_trait>(
&'life0 self,
amount: Amount,
unit: &'life1 CurrencyUnit,
description: String,
unix_expiry: u64,
) -> Pin<Box<dyn Future<Output = Result<CreateInvoiceResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new invoice
source§fn check_invoice_status<'life0, 'life1, 'async_trait>(
&'life0 self,
request_lookup_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MintQuoteState, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_invoice_status<'life0, 'life1, 'async_trait>(
&'life0 self,
request_lookup_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MintQuoteState, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check the status of an incoming payment
Auto Trait Implementations§
impl Freeze for Cln
impl !RefUnwindSafe for Cln
impl Send for Cln
impl Sync for Cln
impl Unpin for Cln
impl !UnwindSafe for Cln
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)