pub struct Phoenixd { /* private fields */ }Expand description
Phoenixd
Implementations§
Source§impl Phoenixd
impl Phoenixd
Sourcepub fn new(
api_password: String,
api_url: String,
fee_reserve: FeeReserve,
receiver: Arc<Mutex<Option<Receiver<WebhookResponse>>>>,
webhook_url: String,
) -> Result<Self, Error>
pub fn new( api_password: String, api_url: String, fee_reserve: FeeReserve, receiver: Arc<Mutex<Option<Receiver<WebhookResponse>>>>, webhook_url: String, ) -> Result<Self, Error>
Create new Phoenixd wallet
Sourcepub async fn create_invoice_webhook(
&self,
webhook_endpoint: &str,
sender: Sender<WebhookResponse>,
) -> Result<Router>
pub async fn create_invoice_webhook( &self, webhook_endpoint: &str, sender: Sender<WebhookResponse>, ) -> Result<Router>
Create invoice webhook
Trait Implementations§
Source§impl MintLightning for Phoenixd
impl MintLightning for Phoenixd
Source§fn check_outgoing_payment<'life0, 'life1, 'async_trait>(
&'life0 self,
payment_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PayInvoiceResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_outgoing_payment<'life0, 'life1, 'async_trait>(
&'life0 self,
payment_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PayInvoiceResponse, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check the status of an outgoing invoice
Source§fn get_settings(&self) -> Settings
fn get_settings(&self) -> Settings
Base Unit
Source§fn is_wait_invoice_active(&self) -> bool
fn is_wait_invoice_active(&self) -> bool
Is wait invoice active
Source§fn cancel_wait_invoice(&self)
fn cancel_wait_invoice(&self)
Cancel wait invoice
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_msats: 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_msats: 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_incoming_invoice_status<'life0, 'life1, 'async_trait>(
&'life0 self,
payment_hash: &'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_incoming_invoice_status<'life0, 'life1, 'async_trait>(
&'life0 self,
payment_hash: &'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 Phoenixd
impl !RefUnwindSafe for Phoenixd
impl Send for Phoenixd
impl Sync for Phoenixd
impl Unpin for Phoenixd
impl !UnwindSafe for Phoenixd
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