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

Function json_add_hex

common/json_stream.c:315–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void json_add_hex(struct json_stream *js, const char *fieldname,
316 const void *data, size_t len)
317{
318 /* Size without NUL term */
319 size_t hexlen = hex_str_size(len);
320 char str[hexlen];
321
322 if (!hex_encode(data, len, str, hexlen))
323 abort();
324
325 json_add_string(js, fieldname, str);
326}
327
328void json_add_hex_talarr(struct json_stream *result,
329 const char *fieldname,

Callers 15

json_transaction_detailsFunction · 0.85
json_signmessagewithkeyFunction · 0.85
json_signmessageFunction · 0.85
log_to_jsonFunction · 0.85
json_add_payment_fieldsFunction · 0.85
json_createonionFunction · 0.85
onion_message_serializeFunction · 0.85
json_add_datastoreFunction · 0.85
handle_tx_broadcastFunction · 0.85
json_add_hex_talarrFunction · 0.85
json_add_node_idFunction · 0.85
json_add_channel_idFunction · 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