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

Function param_secret

common/json_param.c:687–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685}
686
687struct command_result *param_secret(struct command *cmd, const char *name,
688 const char *buffer, const jsmntok_t *tok,
689 struct secret **secret)
690{
691 *secret = tal(cmd, struct secret);
692 if (hex_decode(buffer + tok->start,
693 tok->end - tok->start,
694 *secret, sizeof(**secret)))
695 return NULL;
696
697 return command_fail_badparam(cmd, name, buffer, tok,
698 "should be a 32 byte hex value");
699}
700
701struct command_result *param_bin_from_hex(struct command *cmd, const char *name,
702 const char *buffer, const jsmntok_t *tok,

Callers

nothing calls this directly

Calls 2

hex_decodeFunction · 0.85
command_fail_badparamFunction · 0.70

Tested by

no test coverage detected