| 23 | }; |
| 24 | |
| 25 | static void json_add_blindedpath(struct json_stream *stream, |
| 26 | const char *fieldname, |
| 27 | const struct pubkey *blinding, |
| 28 | const struct pubkey *first_node_id, |
| 29 | struct onionmsg_path **path) |
| 30 | { |
| 31 | json_object_start(stream, fieldname); |
| 32 | json_add_pubkey(stream, "blinding", blinding); |
| 33 | json_add_pubkey(stream, "first_node_id", first_node_id); |
| 34 | json_array_start(stream, "hops"); |
| 35 | for (size_t i = 0; i < tal_count(path); i++) { |
| 36 | json_object_start(stream, NULL); |
| 37 | json_add_pubkey(stream, "id", &path[i]->node_id); |
| 38 | json_add_hex_talarr(stream, "encrypted_recipient_data", |
| 39 | path[i]->encrypted_recipient_data); |
| 40 | json_object_end(stream); |
| 41 | }; |
| 42 | json_array_end(stream); |
| 43 | json_object_end(stream); |
| 44 | } |
| 45 | |
| 46 | static void onion_message_serialize(struct onion_message_hook_payload *payload, |
| 47 | struct json_stream *stream, |
no test coverage detected