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

Function rune_from_string

ccan/ccan/rune/coding.c:402–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400}
401
402struct 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
412char *rune_to_string(const tal_t *ctx, const struct rune *rune)
413{

Callers 1

mainFunction · 0.85

Calls 2

hex_decodeFunction · 0.85
from_stringFunction · 0.85

Tested by 1

mainFunction · 0.68