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

Function jsonrpc_command_add

lightningd/jsonrpc.c:1183–1192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1181}
1182
1183bool jsonrpc_command_add(struct jsonrpc *rpc, struct json_command *command,
1184 const char *usage TAKES)
1185{
1186 if (!command_add(rpc, command))
1187 return false;
1188 usage = tal_strdup(command, usage);
1189 strmap_add(&rpc->usagemap, command->name, usage);
1190 tal_add_destructor2(command, destroy_json_command, rpc);
1191 return true;
1192}
1193
1194static bool jsonrpc_command_add_perm(struct lightningd *ld,
1195 struct jsonrpc *rpc,

Callers 1

plugin_rpcmethod_addFunction · 0.85

Calls 1

command_addFunction · 0.85

Tested by

no test coverage detected