breez_sdk_liquid::lightning_125::ln

Function create_payment_onion

pub fn create_payment_onion<T>(
    secp_ctx: &Secp256k1<T>,
    path: &Path,
    session_priv: &SecretKey,
    total_msat: u64,
    recipient_onion: &RecipientOnionFields,
    cur_block_height: u32,
    payment_hash: &PaymentHash,
    keysend_preimage: &Option<PaymentPreimage>,
    prng_seed: [u8; 32],
) -> Result<(OnionPacket, u64, u32), APIError>
where T: Signing,
Expand description

Build a payment onion, returning the first hop msat and cltv values as well. cur_block_height should be set to the best known block height + 1.