@@ -31,7 +31,7 @@ use bitcoin::{secp256k1, Witness};
31
31
use bitcoin:: script:: ScriptBuf ;
32
32
use bitcoin:: hash_types:: Txid ;
33
33
34
- use crate :: blinded_path:: payment:: { BlindedPaymentTlvs , ForwardTlvs , ReceiveTlvs , UnauthenticatedReceiveTlvs } ;
34
+ use crate :: blinded_path:: payment:: { BlindedPaymentTlvs , ForwardTlvs , ReceiveTlvs , TrampolineForwardTlvs , UnauthenticatedReceiveTlvs } ;
35
35
use crate :: ln:: channelmanager:: Verification ;
36
36
use crate :: ln:: types:: ChannelId ;
37
37
use crate :: types:: payment:: { PaymentPreimage , PaymentHash , PaymentSecret } ;
@@ -1844,6 +1844,17 @@ mod fuzzy_internal_msgs {
1844
1844
pub intro_node_blinding_point : Option < PublicKey > ,
1845
1845
pub next_blinding_override : Option < PublicKey > ,
1846
1846
}
1847
+
1848
+ #[ allow( unused) ]
1849
+ pub struct InboundTrampolineBlindedForwardPayload {
1850
+ pub outgoing_node_id : NodeId ,
1851
+ pub payment_relay : PaymentRelay ,
1852
+ pub payment_constraints : PaymentConstraints ,
1853
+ pub features : BlindedHopFeatures ,
1854
+ pub intro_node_blinding_point : Option < PublicKey > ,
1855
+ pub next_blinding_override : Option < PublicKey > ,
1856
+ }
1857
+
1847
1858
pub struct InboundOnionBlindedReceivePayload {
1848
1859
pub sender_intended_htlc_amt_msat : u64 ,
1849
1860
pub total_msat : u64 ,
@@ -1868,6 +1879,8 @@ mod fuzzy_internal_msgs {
1868
1879
// These payloads should be seen inside an inner Trampoline onion
1869
1880
#[ allow( unused) ]
1870
1881
TrampolineForward ( InboundTrampolineForwardPayload ) ,
1882
+ #[ allow( unused) ]
1883
+ TrampolineBlindedForward ( InboundTrampolineBlindedForwardPayload ) ,
1871
1884
}
1872
1885
1873
1886
pub ( crate ) enum OutboundOnionPayload < ' a > {
@@ -3028,6 +3041,23 @@ impl<NS: Deref> ReadableArgs<(Option<PublicKey>, NS)> for InboundOnionPayload wh
3028
3041
next_blinding_override,
3029
3042
} ) )
3030
3043
} ,
3044
+ ChaChaPolyReadAdapter { readable : BlindedPaymentTlvs :: TrampolineForward ( TrampolineForwardTlvs {
3045
+ outgoing_node_id, payment_relay, payment_constraints, features, next_blinding_override
3046
+ } ) } => {
3047
+ if amt. is_some ( ) || cltv_value. is_some ( ) || total_msat. is_some ( ) ||
3048
+ keysend_preimage. is_some ( ) || invoice_request. is_some ( )
3049
+ {
3050
+ return Err ( DecodeError :: InvalidValue )
3051
+ }
3052
+ Ok ( Self :: TrampolineBlindedForward ( InboundTrampolineBlindedForwardPayload {
3053
+ outgoing_node_id,
3054
+ payment_relay,
3055
+ payment_constraints,
3056
+ features,
3057
+ intro_node_blinding_point,
3058
+ next_blinding_override,
3059
+ } ) )
3060
+ } ,
3031
3061
ChaChaPolyReadAdapter { readable : BlindedPaymentTlvs :: Receive ( receive_tlvs) } => {
3032
3062
let ReceiveTlvs { tlvs, authentication : ( hmac, nonce) } = receive_tlvs;
3033
3063
let expanded_key = node_signer. get_inbound_payment_key ( ) ;
0 commit comments