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

Function param_dev_reply_path

plugins/fetchinvoice.c:855–876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853}
854
855static struct command_result *param_dev_reply_path(struct command *cmd, const char *name,
856 const char *buffer, const jsmntok_t *tok,
857 struct pubkey **path)
858{
859 size_t i;
860 const jsmntok_t *t;
861
862 if (!plugin_developer_mode(cmd->plugin))
863 return command_fail_badparam(cmd, name, buffer, tok,
864 "not available outside --developer mode");
865
866 if (tok->type != JSMN_ARRAY)
867 return command_fail_badparam(cmd, name, buffer, tok, "Must be array");
868
869 *path = tal_arr(cmd, struct pubkey, tok->size);
870
871 json_for_each_arr(i, t, tok) {
872 if (!json_to_pubkey(buffer, t, &(*path)[i]))
873 return command_fail_badparam(cmd, name, buffer, t, "invalid pubkey");
874 }
875 return NULL;
876}
877
878static bool payer_key(const struct offers_data *od,
879 const u8 *public_tweak, size_t public_tweak_len,

Callers

nothing calls this directly

Calls 3

plugin_developer_modeFunction · 0.85
command_fail_badparamFunction · 0.50
json_to_pubkeyFunction · 0.50

Tested by

no test coverage detected