Expose blinded paths' advance_path_by_one methods.

Useful for LDK users that are using the onion messages module, like LNDK.
This commit is contained in:
Valentine Wallace 2024-08-05 16:30:31 -07:00
parent e741a9a8e7
commit 4dba7a314c
No known key found for this signature in database
GPG key ID: FD3E106A2CE099B4
2 changed files with 10 additions and 10 deletions

View file

@ -258,11 +258,11 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
utils::construct_blinded_hops(secp_ctx, pks, tlvs, session_priv)
}
// Advance the blinded onion message path by one hop, so make the second hop into the new
// introduction node.
//
// Will only modify `path` when returning `Ok`.
pub(crate) fn advance_path_by_one<NS: Deref, NL: Deref, T>(
/// Advance the blinded onion message path by one hop, so make the second hop into the new
/// introduction node.
///
/// Will only modify `path` when returning `Ok`.
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
path: &mut BlindedMessagePath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
) -> Result<(), ()>
where

View file

@ -341,11 +341,11 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
utils::construct_blinded_hops(secp_ctx, pks, tlvs, session_priv)
}
// Advance the blinded onion payment path by one hop, so make the second hop into the new
// introduction node.
//
// Will only modify `path` when returning `Ok`.
pub(crate) fn advance_path_by_one<NS: Deref, NL: Deref, T>(
/// Advance the blinded onion payment path by one hop, so make the second hop into the new
/// introduction node.
///
/// Will only modify `path` when returning `Ok`.
pub fn advance_path_by_one<NS: Deref, NL: Deref, T>(
path: &mut BlindedPaymentPath, node_signer: &NS, node_id_lookup: &NL, secp_ctx: &Secp256k1<T>
) -> Result<(), ()>
where