core-lightning/doc/schemas/lightning-waitblockheight.json
ShahanaFarooqui 04884ca664 doc: Merge request and schema jsons in a single file
Merge information from `*.request.json` & `*.schema.json`. Also consolidate remaining details from `*.md` files and create a single file in schemas folder.
2024-03-19 14:58:59 +10:30

83 lines
2 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"additionalProperties": false,
"rpc": "waitblockheight",
"title": "Command for waiting for blocks on the blockchain",
"description": [
"The **waitblockheight** RPC command waits until the blockchain has reached the specified *blockheight*."
],
"request": {
"required": [
"blockheight"
],
"properties": {
"blockheight": {
"type": "u32",
"description": [
"Current blockheight of the blockchain if the value is greater than this number. If it is a present or past block height, then the command returns immediately."
]
},
"timeout": {
"type": "u32",
"description": [
"Only wait up to specified seconds."
],
"default": "60 seconds"
}
}
},
"response": {
"required": [
"blockheight"
],
"properties": {
"blockheight": {
"type": "u32",
"description": [
"The current block height (>= *blockheight* parameter)."
]
}
},
"post_return_value_notes": [
"If *timeout* seconds is reached without the specified blockheight being reached, this command will fail with a code of `2000`."
]
},
"errors": [
"The following error codes may occur:",
"",
"- 2000: Timed out."
],
"example_json_request": [
{
"id": "example:waitblockheight#1",
"method": "waitblockheight",
"params": {
"blockheight": 99,
"timeout": null
}
},
{
"id": "example:waitblockheight#2",
"method": "waitblockheight",
"params": {
"blockheight": 103,
"timeout": 600
}
}
],
"example_json_response": [
{
"blockheight": 99
},
{
"blockheight": 103
}
],
"author": [
"ZmnSCPxj <<ZmnSCPxj@protonmail.com>> is mainly responsible."
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
]
}