core-lightning/doc/schemas/lightning-help.json
ShahanaFarooqui 976c0c90bc docs: Changes examples format
- Changed ALL `doc/schemas/lightning-*.json` file's `json_example` to `examples`
- Change the heading from example to examples
- Bring shell command before the json command
- Move Example to the end of the page
- Remove horizontal line from Example
2024-06-22 17:02:33 +02:00

133 lines
3.7 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"additionalProperties": false,
"rpc": "help",
"title": "Command to return all information about RPC commands.",
"description": [
"The **help** is a RPC command which is possible consult all information about the RPC commands, or a specific command if *command* is given.",
"",
"Note that the lightning-cli(1) tool will prefer to list a man page when a specific *command* is specified, and will only return the JSON if the man page is not found."
],
"request": {
"required": [],
"properties": {
"command": {
"type": "string",
"description": [
"Command to get information about."
]
}
}
},
"response": {
"required": [
"help"
],
"properties": {
"help": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"command",
"category",
"description",
"verbose"
],
"properties": {
"command": {
"type": "string",
"description": [
"The command."
]
},
"category": {
"type": "string",
"description": [
"The category for this command (useful for grouping)."
]
},
"description": {
"type": "string",
"description": [
"A one-line description of the purpose of this command."
]
},
"verbose": {
"type": "string",
"description": [
"A full description of this command (including whether it's deprecated)."
]
}
}
}
},
"format-hint": {
"type": "string",
"enum": [
"simple"
],
"description": [
"Prints the help in human-readable flat form."
]
}
}
},
"errors": [
"On failure, one of the following error codes may be returned:",
"",
"- -32602: Error in given parameters."
],
"author": [
"Vincenzo Palazzo <<vincenzo.palazzo@protonmail.com>> wrote the initial version of this man page,",
"but many others did the hard work of actually implementing this rpc command."
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:help#1",
"method": "help",
"params": {
"command": "pay"
}
},
"response": {
"help": [
{
"command": "pay bolt11 [amount_msat] [label] [riskfactor] [maxfeepercent] [retry_for] [maxdelay] [exemptfee] [localinvreqid] [exclude] [maxfee] [description] [dev_use_shadow]",
"category": "plugin",
"description": "Send payment specified by {bolt11}",
"verbose": "Attempt to pay the {bolt11} invoice."
}
],
"format-hint": "simple"
}
},
{
"request": {
"id": "example:help#2",
"method": "help",
"params": {
"command": "dev"
}
},
"response": {
"help": [
{
"command": "dev subcommand=crash|rhash|slowcmd",
"category": "developer",
"description": "Developer command test multiplexer",
"verbose": "dev rhash {secret}\n\tShow SHA256 of {secret}\ndev crash\n\tCrash lightningd by calling fatal()\ndev slowcmd {msec}\n\tTorture test for slow commands, optional {msec}\n"
}
],
"format-hint": "simple"
}
}
]
}