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

Function json_listtransactions

wallet/walletrpc.c:578–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576}
577
578static struct command_result *json_listtransactions(struct command *cmd,
579 const char *buffer,
580 const jsmntok_t *obj UNNEEDED,
581 const jsmntok_t *params)
582{
583 struct json_stream *response;
584 struct wallet_transaction *txs;
585
586 if (!param(cmd, buffer, params, NULL))
587 return command_param_failed();
588
589 txs = wallet_transactions_get(cmd->ld->wallet, cmd);
590
591 response = json_stream_success(cmd);
592 json_array_start(response, "transactions");
593 for (size_t i = 0; i < tal_count(txs); i++)
594 json_transaction_details(response, &txs[i]);
595
596 json_array_end(response);
597 return command_success(cmd, response);
598}
599
600static const struct json_command listtransactions_command = {
601 "listtransactions",

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected