Skip to content

Commit ef17d23

Browse files
authored
Merge pull request #268 from jkczyz/2024-05-bolt12-has-arrived-update
Update BOLT12 blog for final 0.0.123 release
2 parents f04df5c + 246ab7c commit ef17d23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/_blog/bolt12-has-arrived.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ As the recipient, you only need to wait for an event to claim the payment.
9696
```rust
9797
channel_manager.process_pending_events(&|event| match event {
9898
Event::PaymentClaimable { payment_hash, purpose, .. } => match purpose {
99-
PaymentPurpose::InvoicePayment { payment_preimage: Some(payment_preimage), .. } => {
99+
PaymentPurpose::Bolt12OfferPayment { payment_preimage: Some(payment_preimage), .. } => {
100100
println!("Claiming payment {}", payment_hash);
101101
channel_manager.claim_funds(payment_preimage);
102102
},
103-
PaymentPurpose::InvoicePayment { payment_preimage: None, .. } => {
103+
PaymentPurpose::Bolt12OfferPayment { payment_preimage: None, .. } => {
104104
println!("Unknown payment hash: {}", payment_hash);
105105
},
106106
// ...
@@ -123,7 +123,7 @@ channel_manager.process_pending_events(&|event| match event {
123123
});
124124
```
125125

126-
These examples work swimmingly when building a Lightning wallet programmatically. However, LDK uniquely exposes the underlying [offers](https://docs.rs/lightning/0.0.123-beta/lightning/offers/index.html), [blinded paths](https://docs.rs/lightning/0.0.123-beta/lightning/blinded_path/index.html), and [onion message](https://docs.rs/lightning/0.0.123-beta/lightning/onion_message/index.html) modules for direct use. This means you can experiment with building your applications or add BOLT12 support to LND, such as the [LNDK](https://github.com/lndk-org/lndk) project.
126+
These examples work swimmingly when building a Lightning wallet programmatically. However, LDK uniquely exposes the underlying [offers](https://docs.rs/lightning/0.0.123/lightning/offers/index.html), [blinded paths](https://docs.rs/lightning/0.0.123/lightning/blinded_path/index.html), and [onion message](https://docs.rs/lightning/0.0.123/lightning/onion_message/index.html) modules for direct use. This means you can experiment with building your applications or add BOLT12 support to LND, such as the [LNDK](https://github.com/lndk-org/lndk) project.
127127

128128
## Wait, what about refunds?
129129

@@ -144,7 +144,7 @@ let refund = channel_manager
144144
let bech32_refund = refund.to_string();
145145
```
146146

147-
Like when paying an offer, LDK will track a pending payment and surface events just the same.
147+
Like when paying an offer, LDK will track a pending payment and surface events just the same. However, for inbound payments the events will use `PaymentPurpose::Bolt12RefundPayment` instead.
148148

149149
## Achieving statelessness
150150

0 commit comments

Comments
 (0)