| 400 | } |
| 401 | |
| 402 | struct rune *rune_from_string(const tal_t *ctx, const char *str) |
| 403 | { |
| 404 | u8 hash[32]; |
| 405 | if (!hex_decode(str, 64, hash, sizeof(hash))) |
| 406 | return NULL; |
| 407 | if (str[64] != ':') |
| 408 | return NULL; |
| 409 | return from_string(ctx, str + 65, hash); |
| 410 | } |
| 411 | |
| 412 | char *rune_to_string(const tal_t *ctx, const struct rune *rune) |
| 413 | { |