| 650 | } |
| 651 | |
| 652 | bool json_to_secret(const char *buffer, const jsmntok_t *tok, struct secret *dest) |
| 653 | { |
| 654 | return hex_decode(buffer + tok->start, tok->end - tok->start, |
| 655 | dest->data, sizeof(struct secret)); |
| 656 | } |
| 657 | |
| 658 | bool json_to_preimage(const char *buffer, const jsmntok_t *tok, struct preimage *preimage) |
| 659 | { |