@@ -1122,7 +1122,8 @@ send_payment(struct lightningd *ld,
11221122 const char * label TAKES ,
11231123 const char * invstring TAKES ,
11241124 const struct sha256 * local_offer_id ,
1125- const struct secret * payment_secret )
1125+ const struct secret * payment_secret ,
1126+ const u8 * payment_metadata )
11261127{
11271128 unsigned int base_expiry ;
11281129 struct onionpacket * packet ;
@@ -1174,7 +1175,7 @@ send_payment(struct lightningd *ld,
11741175 route [i ].amount ,
11751176 base_expiry + route [i ].delay ,
11761177 total_msat , route [i ].blinding , route [i ].enctlv ,
1177- payment_secret );
1178+ payment_secret , payment_metadata );
11781179 if (!onion ) {
11791180 return command_fail (cmd , PAY_DESTINATION_PERM_FAIL ,
11801181 "Destination does not support"
@@ -1422,7 +1423,8 @@ static struct command_result *json_sendpay(struct command *cmd,
14221423 const char * invstring , * label ;
14231424 u64 * partid , * group ;
14241425 struct secret * payment_secret ;
1425- struct sha256 * local_offer_id = NULL ;
1426+ struct sha256 * local_offer_id ;
1427+ u8 * payment_metadata ;
14261428
14271429 /* For generating help, give new-style. */
14281430 if (!param (cmd , buffer , params ,
@@ -1436,6 +1438,7 @@ static struct command_result *json_sendpay(struct command *cmd,
14361438 p_opt_def ("partid" , param_u64 , & partid , 0 ),
14371439 p_opt ("localofferid" , param_sha256 , & local_offer_id ),
14381440 p_opt ("groupid" , param_u64 , & group ),
1441+ p_opt ("payment_metadata" , param_bin_from_hex , & payment_metadata ),
14391442 NULL ))
14401443 return command_param_failed ();
14411444
@@ -1485,7 +1488,8 @@ static struct command_result *json_sendpay(struct command *cmd,
14851488 route ,
14861489 final_amount ,
14871490 msat ? * msat : final_amount ,
1488- label , invstring , local_offer_id , payment_secret );
1491+ label , invstring , local_offer_id ,
1492+ payment_secret , payment_metadata );
14891493}
14901494
14911495static const struct json_command sendpay_command = {
0 commit comments