Trait fedimint_testing::ln::LightningTest
source · pub trait LightningTest: ILnRpcClient {
// Required methods
fn invoice<'life0, 'async_trait>(
&'life0 self,
amount: Amount,
expiry_time: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<Bolt11Invoice>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_shared(&self) -> bool;
fn listening_address(&self) -> String;
fn lightning_node_type(&self) -> LightningNodeType;
// Provided method
fn unpayable_invoice(
&self,
amount: Amount,
expiry_time: Option<u64>
) -> Result<Bolt11Invoice> { ... }
}
Required Methods§
sourcefn invoice<'life0, 'async_trait>(
&'life0 self,
amount: Amount,
expiry_time: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<Bolt11Invoice>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoice<'life0, 'async_trait>(
&'life0 self,
amount: Amount,
expiry_time: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<Bolt11Invoice>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates invoice from the lightning implementation
Is this a LN instance shared with other tests
fn listening_address(&self) -> String
fn lightning_node_type(&self) -> LightningNodeType
Provided Methods§
sourcefn unpayable_invoice(
&self,
amount: Amount,
expiry_time: Option<u64>
) -> Result<Bolt11Invoice>
fn unpayable_invoice( &self, amount: Amount, expiry_time: Option<u64> ) -> Result<Bolt11Invoice>
Creates an invoice that is not payable
- Mocks use hard-coded invoice description to fail the payment
- Real fixtures won’t be able to route to randomly generated node pubkey