@@ -573,10 +573,26 @@ impl RecipientOnionFields {
573573 /// Note that if this field is non-empty, it will contain strictly increasing TLVs, each
574574 /// represented by a `(u64, Vec<u8>)` for its type number and serialized value respectively.
575575 /// This is validated when setting this field using [`Self::with_custom_tlvs`].
576+ #[ cfg( not( c_bindings) ) ]
576577 pub fn custom_tlvs ( & self ) -> & Vec < ( u64 , Vec < u8 > ) > {
577578 & self . custom_tlvs
578579 }
579580
581+ /// Gets the custom TLVs that will be sent or have been received.
582+ ///
583+ /// Custom TLVs allow sending extra application-specific data with a payment. They provide
584+ /// additional flexibility on top of payment metadata, as while other implementations may
585+ /// require `payment_metadata` to reflect metadata provided in an invoice, custom TLVs
586+ /// do not have this restriction.
587+ ///
588+ /// Note that if this field is non-empty, it will contain strictly increasing TLVs, each
589+ /// represented by a `(u64, Vec<u8>)` for its type number and serialized value respectively.
590+ /// This is validated when setting this field using [`Self::with_custom_tlvs`].
591+ #[ cfg( c_bindings) ]
592+ pub fn custom_tlvs ( & self ) -> Vec < ( u64 , Vec < u8 > ) > {
593+ self . custom_tlvs . clone ( )
594+ }
595+
580596 /// When we have received some HTLC(s) towards an MPP payment, as we receive further HTLC(s) we
581597 /// have to make sure that some fields match exactly across the parts. For those that aren't
582598 /// required to match, if they don't match we should remove them so as to not expose data
0 commit comments