MCPcopy Create free account
hub / github.com/ElementsProject/lightning / json_add_hex

Function json_add_hex

common/json_stream.c:301–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void json_add_hex(struct json_stream *js, const char *fieldname,
302 const void *data, size_t len)
303{
304 /* Size without NUL term */
305 size_t hexlen = hex_str_size(len);
306 char str[hexlen];
307
308 if (!hex_encode(data, len, str, hexlen))
309 abort();
310
311 json_add_string(js, fieldname, str);
312}
313
314void json_add_hex_talarr(struct json_stream *result,
315 const char *fieldname,

Callers 15

json_transaction_detailsFunction · 0.85
json_signmessageFunction · 0.85
json_add_payment_fieldsFunction · 0.85
json_createonionFunction · 0.85
onion_message_serializeFunction · 0.85
json_add_datastoreFunction · 0.85
json_add_hex_talarrFunction · 0.85
json_add_node_idFunction · 0.85
json_add_channel_idFunction · 0.85
json_add_pubkeyFunction · 0.85

Calls 4

hex_str_sizeFunction · 0.85
hex_encodeFunction · 0.85
abortFunction · 0.85
json_add_stringFunction · 0.70

Tested by

no test coverage detected