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

Function json_listtransactions

wallet/walletrpc.c:649–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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