Add BOLT 12 Refunds section to ChannelManager docs
[rust-lightning] / lightning / src / offers / refund.rs
index 42177960868ab553ee1385f2569146dc8209e2bf..5305076bf91c127edc79542a61b3810cd21bc149 100644 (file)
@@ -375,6 +375,16 @@ for RefundMaybeWithDerivedMetadataBuilder<'a> {
        }
 }
 
+#[cfg(c_bindings)]
+impl<'a> From<RefundMaybeWithDerivedMetadataBuilder<'a>>
+for RefundBuilder<'a, secp256k1::All> {
+       fn from(builder: RefundMaybeWithDerivedMetadataBuilder<'a>) -> Self {
+               let RefundMaybeWithDerivedMetadataBuilder { refund, secp_ctx } = builder;
+
+               Self { refund, secp_ctx }
+       }
+}
+
 /// A `Refund` is a request to send an [`Bolt12Invoice`] without a preceding [`Offer`].
 ///
 /// Typically, after an invoice is paid, the recipient may publish a refund allowing the sender to