File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -395,6 +395,9 @@ pub struct Bolt12ReceiveResponse {
395395 /// to the recipient.
396396 #[ prost( string, tag = "1" ) ]
397397 pub offer : :: prost:: alloc:: string:: String ,
398+ /// The hex-encoded offer id.
399+ #[ prost( string, tag = "2" ) ]
400+ pub offer_id : :: prost:: alloc:: string:: String ,
398401}
399402/// Send a payment for a BOLT12 offer.
400403/// See more:
Original file line number Diff line number Diff line change @@ -328,6 +328,9 @@ message Bolt12ReceiveResponse {
328328 // With the details of the offer, the sender has all the data necessary to send a payment
329329 // to the recipient.
330330 string offer = 1 ;
331+
332+ // The hex-encoded offer id.
333+ string offer_id = 2 ;
331334}
332335
333336// Send a payment for a BOLT12 offer.
Original file line number Diff line number Diff line change 77// You may not use this file except in accordance with one or both of these
88// licenses.
99
10+ use hex:: DisplayHex ;
1011use ldk_server_protos:: api:: { Bolt12ReceiveRequest , Bolt12ReceiveResponse } ;
1112
1213use crate :: api:: error:: LdkServerError ;
@@ -28,6 +29,7 @@ pub(crate) fn handle_bolt12_receive_request(
2829 . receive_variable_amount ( & request. description , request. expiry_secs ) ?,
2930 } ;
3031
31- let response = Bolt12ReceiveResponse { offer : offer. to_string ( ) } ;
32+ let offer_id = offer. id ( ) . 0 . to_lower_hex_string ( ) ;
33+ let response = Bolt12ReceiveResponse { offer : offer. to_string ( ) , offer_id } ;
3234 Ok ( response)
3335}
You can’t perform that action at this time.
0 commit comments