mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
jsonrpc: Add a category field to commands.
A new string field is added to the command structure and is specified at the creation of each native command, and in the JSON created by 'json_add_help_command()'.
This commit is contained in:
@@ -1007,6 +1007,7 @@ static struct command_result *json_listpeers(struct command *cmd,
|
||||
|
||||
static const struct json_command listpeers_command = {
|
||||
"listpeers",
|
||||
"network",
|
||||
json_listpeers,
|
||||
"Show current peers, if {level} is set, include logs for {id}"
|
||||
};
|
||||
@@ -1137,6 +1138,7 @@ static struct command_result *json_close(struct command *cmd,
|
||||
|
||||
static const struct json_command close_command = {
|
||||
"close",
|
||||
"channels",
|
||||
json_close,
|
||||
"Close the channel with {id} "
|
||||
"(either peer ID, channel ID, or short channel ID). "
|
||||
@@ -1244,6 +1246,7 @@ static struct command_result *json_disconnect(struct command *cmd,
|
||||
|
||||
static const struct json_command disconnect_command = {
|
||||
"disconnect",
|
||||
"network",
|
||||
json_disconnect,
|
||||
"Disconnect from {id} that has previously been connected to using connect; with {force} set, even if it has a current channel"
|
||||
};
|
||||
@@ -1316,6 +1319,7 @@ static struct command_result *json_getinfo(struct command *cmd,
|
||||
|
||||
static const struct json_command getinfo_command = {
|
||||
"getinfo",
|
||||
"utility",
|
||||
json_getinfo,
|
||||
"Show information about this node"
|
||||
};
|
||||
@@ -1472,6 +1476,7 @@ static struct command_result *json_setchannelfee(struct command *cmd,
|
||||
|
||||
static const struct json_command setchannelfee_command = {
|
||||
"setchannelfee",
|
||||
"channels",
|
||||
json_setchannelfee,
|
||||
"Sets specific routing fees for channel with {id} "
|
||||
"(either peer ID, channel ID, short channel ID or 'all'). "
|
||||
@@ -1526,6 +1531,7 @@ static struct command_result *json_sign_last_tx(struct command *cmd,
|
||||
|
||||
static const struct json_command dev_sign_last_tx = {
|
||||
"dev-sign-last-tx",
|
||||
"developer",
|
||||
json_sign_last_tx,
|
||||
"Sign and show the last commitment transaction with peer {id}"
|
||||
};
|
||||
@@ -1563,6 +1569,7 @@ static struct command_result *json_dev_fail(struct command *cmd,
|
||||
|
||||
static const struct json_command dev_fail_command = {
|
||||
"dev-fail",
|
||||
"developer",
|
||||
json_dev_fail,
|
||||
"Fail with peer {id}"
|
||||
};
|
||||
@@ -1620,6 +1627,7 @@ static struct command_result *json_dev_reenable_commit(struct command *cmd,
|
||||
|
||||
static const struct json_command dev_reenable_commit = {
|
||||
"dev-reenable-commit",
|
||||
"developer",
|
||||
json_dev_reenable_commit,
|
||||
"Re-enable the commit timer on peer {id}"
|
||||
};
|
||||
@@ -1728,7 +1736,9 @@ static struct command_result *json_dev_forget_channel(struct command *cmd,
|
||||
}
|
||||
|
||||
static const struct json_command dev_forget_channel_command = {
|
||||
"dev-forget-channel", json_dev_forget_channel,
|
||||
"dev-forget-channel",
|
||||
"developer",
|
||||
json_dev_forget_channel,
|
||||
"Forget the channel with peer {id}, ignore UTXO check with {force}='true'.", false,
|
||||
"Forget the channel with peer {id}. Checks if the channel is still active by checking its funding transaction. Check can be ignored by setting {force} to 'true'"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user