| 371 | } |
| 372 | |
| 373 | void json_myadd_blinded_path(struct json_stream *s, |
| 374 | const char *fieldname, |
| 375 | const struct blinded_path *blinded_path) |
| 376 | { |
| 377 | // FIXME: how can we support the case when the entry point is a |
| 378 | // scid? |
| 379 | assert(blinded_path->first_node_id.is_pubkey); |
| 380 | json_object_start(s, fieldname); |
| 381 | json_add_pubkey(s, "first_node_id", |
| 382 | &blinded_path->first_node_id.pubkey); |
| 383 | json_add_pubkey(s, "first_path_key", &blinded_path->first_path_key); |
| 384 | json_array_start(s, "path"); |
| 385 | for (size_t i = 0; i < tal_count(blinded_path->path); i++) { |
| 386 | const struct blinded_path_hop *hop = blinded_path->path[i]; |
| 387 | json_object_start(s, NULL); |
| 388 | json_add_pubkey(s, "blinded_node_id", &hop->blinded_node_id); |
| 389 | json_add_hex_talarr(s, "encrypted_recipient_data", |
| 390 | hop->encrypted_recipient_data); |
| 391 | json_object_end(s); |
| 392 | } |
| 393 | json_array_end(s); |
| 394 | json_object_end(s); |
| 395 | } |
nothing calls this directly
no test coverage detected