core-lightning/doc/schemas/lightning-unreserveinputs.json
ShahanaFarooqui 9592facf83 doc: Lock example values
Changelog-Added: Test script generates all RPC documentation examples now.
2024-11-26 21:45:19 +10:30

152 lines
4.3 KiB
JSON

{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"rpc": "unreserveinputs",
"title": "Release reserved UTXOs",
"description": [
"The **unreserveinputs** RPC command releases (or reduces reservation) on UTXOs which were previously marked as reserved, generally by lightning-reserveinputs(7)."
],
"request": {
"required": [
"psbt"
],
"additionalProperties": false,
"properties": {
"psbt": {
"type": "string",
"description": [
"Inputs to unreserve are the inputs specified in the passed-in *psbt*."
]
},
"reserve": {
"type": "u32",
"description": [
"The number of blocks to decrease reservation by."
],
"default": 72
}
}
},
"response": {
"required": [
"reservations"
],
"additionalProperties": false,
"properties": {
"reservations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"txid",
"vout",
"was_reserved",
"reserved"
],
"properties": {
"txid": {
"type": "txid",
"description": [
"The transaction id."
]
},
"vout": {
"type": "u32",
"description": [
"The output number which was reserved."
]
},
"was_reserved": {
"type": "boolean",
"description": [
"Whether the input was already reserved (usually `true`)."
]
},
"reserved": {
"type": "boolean",
"description": [
"Whether the input is now reserved (may still be `true` if it was reserved for a long time)."
]
}
},
"allOf": [
{
"if": {
"additionalProperties": true,
"properties": {
"reserved": {
"enum": [
true
]
}
}
},
"then": {
"required": [
"reserved_to_block"
],
"additionalProperties": false,
"properties": {
"txid": {},
"vout": {},
"was_reserved": {},
"reserved": {},
"reserved_to_block": {
"type": "u32",
"description": [
"What blockheight the reservation will expire."
]
}
}
}
}
]
}
}
}
},
"errors": [
"On failure, an error is reported and no UTXOs are unreserved.",
"",
"- -32602: Invalid parameter, i.e. an unparseable PSBT."
],
"author": [
"Lisa Neigut <<niftynei@gmail.com>> is mainly responsible."
],
"see_also": [
"lightning-unreserveinputs(7)",
"lightning-signpsbt(7)",
"lightning-sendpsbt(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:unreserveinputs#1",
"method": "unreserveinputs",
"params": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000310000",
"reserve": 200
}
},
"response": {
"reservations": []
}
},
{
"request": {
"id": "example:unreserveinputs#2",
"method": "unreserveinputs",
"params": [
"cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000410000"
]
},
"response": {
"reservations": []
}
}
]
}