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

Function fmt_privkey

bitcoin/privkey.c:7–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <wire/wire.h>
6
7char *fmt_privkey(const tal_t *ctx, const struct privkey *secret)
8{
9 /* Bitcoin appends "01" to indicate the pubkey is compressed. */
10 char *str = tal_arr(ctx, char, hex_str_size(sizeof(*secret) + 1));
11 hex_encode(secret, sizeof(*secret), str, hex_str_size(sizeof(*secret)));
12 strcat(str, "01");
13 return str;
14}
15
16char *fmt_secret(const tal_t *ctx, const struct secret *secret)
17{

Callers 5

mainFunction · 0.85
blind_nodeFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

hex_str_sizeFunction · 0.85
hex_encodeFunction · 0.85

Tested by 3

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68