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

Function reply_with_rune

plugins/commando.c:850–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848}
849
850static struct command_result *reply_with_rune(struct command *cmd,
851 const char *buf UNUSED,
852 const jsmntok_t *result UNUSED,
853 struct rune *rune)
854{
855 struct json_stream *js = jsonrpc_stream_success(cmd);
856
857 json_add_string(js, "rune", rune_to_base64(tmpctx, rune));
858 json_add_string(js, "unique_id", rune->unique_id);
859
860 if (tal_count(rune->restrs) <= 1) {
861 json_add_string(js, "warning_unrestricted_rune", "WARNING: This rune has no restrictions! Anyone who has access to this rune could drain funds from your node. Be careful when giving this to apps that you don't trust. Consider using the restrictions parameter to only allow access to specific rpc methods.");
862 }
863 return command_finished(cmd, js);
864}
865
866static struct command_result *json_commando_rune(struct command *cmd,
867 const char *buffer,

Callers 1

json_commando_runeFunction · 0.85

Calls 4

rune_to_base64Function · 0.85
jsonrpc_stream_successFunction · 0.70
command_finishedFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected