| 5 | #include <wire/wire.h> |
| 6 | |
| 7 | static char *privkey_to_hexstr(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 | REGISTER_TYPE_TO_STRING(privkey, privkey_to_hexstr); |
| 16 | REGISTER_TYPE_TO_HEXSTR(secret); |
| 17 |
nothing calls this directly
no test coverage detected