Skip to content

Commit 2ee716b

Browse files
committed
f - expand InvoiceRequestBuilder::metadata docs
1 parent 1124ae1 commit 2ee716b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lightning/src/offers/invoice_request.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,13 @@ impl<'a> InvoiceRequestBuilder<'a> {
9191
}
9292
}
9393

94-
/// Sets the metadata for the invoice request. Useful for containing information about the
95-
/// derivation of [`InvoiceRequest::payer_id`]. This should not leak any information such as
96-
/// using a simple BIP-32 derivation path.
94+
/// Sets the metadata for the invoice request, which will be reflected in the invoice response.
95+
/// Useful for including information about the derivation of [`InvoiceRequest::payer_id`] such
96+
/// that invoice response handling can be stateless. Also serves as payer-provided entropy while
97+
/// hashing in the signature calculation.
98+
///
99+
/// This should not leak any information such as by using a simple BIP-32 derivation path.
100+
/// Otherwise, payments may be correlated.
97101
///
98102
/// Successive calls to this method will override the previous setting.
99103
pub fn metadata(mut self, metadata: Vec<u8>) -> Self {

0 commit comments

Comments
 (0)