]> git.bitcoin.ninja Git - rust-lightning/commit
Replace `PaymentSecret` with `RecipientOnionFields` in the pub API
authorMatt Corallo <git@bluematt.me>
Wed, 22 Mar 2023 21:48:22 +0000 (21:48 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 5 Apr 2023 16:28:14 +0000 (16:28 +0000)
commitdddb2e28c1e2586346d94775d5bb63414c6a73bb
treea38493da24e13b828e9c0894070b1509aced8eb4
parent2f798f6cc0099a10f2f8e4a3ea0f3fab6d51a612
Replace `PaymentSecret` with `RecipientOnionFields` in the pub API

This moves the public payment sending API from passing an explicit
`PaymentSecret` to a new `RecipientOnionFields` struct (which
currently only contains the `PaymentSecret`). This gives us
substantial additional flexibility as we look at add both
`PaymentMetadata`, a new (well, year-or-two-old) BOLT11 invoice
extension to provide additional data sent to the recipient.

In the future, we should also add the ability to add custom TLV
entries in the `RecipientOnionFields` struct.
17 files changed:
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
lightning-invoice/src/payment.rs
lightning-invoice/src/utils.rs
lightning/src/chain/chainmonitor.rs
lightning/src/chain/channelmonitor.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/monitor_tests.rs
lightning/src/ln/onion_route_tests.rs
lightning/src/ln/outbound_payment.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/priv_short_conf_tests.rs
lightning/src/ln/reload_tests.rs
lightning/src/ln/shutdown_tests.rs