breez_sdk_liquid::lightning::ln::inbound_payment

Function create

pub fn create<ES>(
    keys: &ExpandedKey,
    min_value_msat: Option<u64>,
    invoice_expiry_delta_secs: u32,
    entropy_source: &ES,
    current_time: u64,
    min_final_cltv_expiry_delta: Option<u16>,
) -> Result<(PaymentHash, PaymentSecret), ()>
where ES: Deref, <ES as Deref>::Target: EntropySource,
Expand description

Equivalent to crate::ln::channelmanager::ChannelManager::create_inbound_payment, but no ChannelManager is required. Useful for generating invoices for phantom node payments without a ChannelManager.

keys is generated by calling NodeSigner::get_inbound_payment_key_material and then calling ExpandedKey::new with its result. It is recommended to cache this value and not regenerate it for each new inbound payment.

current_time is a Unix timestamp representing the current time.

Note that if min_final_cltv_expiry_delta is set to some value, then the payment will not be receivable on versions of LDK prior to 0.0.114.