| 5 | #include <wire/wire.h> |
| 6 | |
| 7 | char *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 | |
| 16 | char *fmt_secret(const tal_t *ctx, const struct secret *secret) |
| 17 | { |