mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 15:20:24 +01:00
Base AMP is centered around the concept of a 'payment_secret` - an opaque 32-byte random string which is used to authenticate the sender to the recipient as well as tie the various HTLCs which make up one payment together. This new field gets exposed in a number of places, though sadly only as an Option for backwards compatibility when sending to a receiver/receiving from a sender which does not support Base AMP. Sadly a huge diff here, but almost all of it is changing the method signatures for sending/receiving/failing HTLCs and the PaymentReceived event, which all now need to expose an Option<[u8; 32]> for the payment_secret. It doesn't yet properly fail back pending HTLCs when the full AMP payment is never received (which should result in accidental channel force-closures). Further, as sending AMP payments is not yet supported, the only test here is a simple single-path payment with a payment_secret in it. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |