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

Function param_dev_reply_path

plugins/fetchinvoice.c:814–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812}
813
814static struct command_result *param_dev_reply_path(struct command *cmd, const char *name,
815 const char *buffer, const jsmntok_t *tok,
816 struct pubkey **path)
817{
818 size_t i;
819 const jsmntok_t *t;
820
821 if (!plugin_developer_mode(cmd->plugin))
822 return command_fail_badparam(cmd, name, buffer, tok,
823 "not available outside --developer mode");
824
825 if (tok->type != JSMN_ARRAY)
826 return command_fail_badparam(cmd, name, buffer, tok, "Must be array");
827
828 *path = tal_arr(cmd, struct pubkey, tok->size);
829
830 json_for_each_arr(i, t, tok) {
831 if (!json_to_pubkey(buffer, t, &(*path)[i]))
832 return command_fail_badparam(cmd, name, buffer, t, "invalid pubkey");
833 }
834 return NULL;
835}
836
837static bool payer_key(const struct offers_data *od,
838 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