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

Function json_listtransactions

wallet/walletrpc.c:650–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

648}
649
650static struct command_result *json_listtransactions(struct command *cmd,
651 const char *buffer,
652 const jsmntok_t *obj UNNEEDED,
653 const jsmntok_t *params)
654{
655 struct json_stream *response;
656 struct wallet_transaction *txs;
657
658 if (!param(cmd, buffer, params, NULL))
659 return command_param_failed();
660
661 txs = wallet_transactions_get(cmd, cmd->ld->wallet);
662
663 response = json_stream_success(cmd);
664 json_array_start(response, "transactions");
665 for (size_t i = 0; i < tal_count(txs); i++)
666 json_transaction_details(response, &txs[i]);
667
668 json_array_end(response);
669 return command_success(cmd, response);
670}
671
672static const struct json_command listtransactions_command = {
673 "listtransactions",

Callers

nothing calls this directly

Calls 8

wallet_transactions_getFunction · 0.85
json_array_startFunction · 0.85
json_transaction_detailsFunction · 0.85
json_array_endFunction · 0.85
paramFunction · 0.50
command_param_failedFunction · 0.50
json_stream_successFunction · 0.50
command_successFunction · 0.50

Tested by

no test coverage detected