| 227 | } |
| 228 | |
| 229 | static void json_add_onionmsg_path(struct json_stream *js, |
| 230 | const char *fieldname, |
| 231 | const struct onionmsg_path *path, |
| 232 | const struct blinded_payinfo *payinfo) |
| 233 | { |
| 234 | json_object_start(js, fieldname); |
| 235 | json_add_pubkey(js, "node_id", &path->node_id); |
| 236 | json_add_hex_talarr(js, "encrypted_recipient_data", path->encrypted_recipient_data); |
| 237 | if (payinfo) { |
| 238 | json_add_u32(js, "fee_base_msat", payinfo->fee_base_msat); |
| 239 | json_add_u32(js, "fee_proportional_millionths", |
| 240 | payinfo->fee_proportional_millionths); |
| 241 | json_add_u32(js, "cltv_expiry_delta", |
| 242 | payinfo->cltv_expiry_delta); |
| 243 | json_add_hex_talarr(js, "features", payinfo->features); |
| 244 | } |
| 245 | json_object_end(js); |
| 246 | } |
| 247 | |
| 248 | /* Returns true if valid */ |
| 249 | static bool json_add_blinded_paths(struct json_stream *js, |
no test coverage detected