mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
04884ca664
Merge information from `*.request.json` & `*.schema.json`. Also consolidate remaining details from `*.md` files and create a single file in schemas folder.
157 lines
5.1 KiB
JSON
157 lines
5.1 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"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"
|
|
],
|
|
"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"
|
|
],
|
|
"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"
|
|
],
|
|
"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."
|
|
],
|
|
"example_json_request": [
|
|
{
|
|
"id": "example:unreserveinputs#1",
|
|
"method": "unreserveinputs",
|
|
"params": {
|
|
"psbt": "cHNidP8BAgQCAAAAAQMEZgAAAAEEAQEBBQECAQYBAwH7BAIAAAAAAQDeAgAAAAABAXyy20ynmOFyRbegGyApk50yNIAb4C+RKV5c2n5VKL3lAAAAAAD9////Akf0EAAAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WUs/fQpAQAAABYAFN9HebR4q6498ytdeRKjC64CkCOMAkcwRAIgSTJCpWVH1FLZYPdwFe7gZckxCtk+AxPp20KUVKqPIdUCIA3hkoUco68vffiwt6TrE3KgX09JE9m7PDUUgrHQANMRASEDBOBlCza/8qXE5q8uJ+OWsKscDERWfdA+LLCa/lwMH0BlAAAAAQEfR/QQAAAAAAAWABQB+tkKvNZml+JZIWRyLeSpXr7hZSICA9dFRFyTYmZfIuDZbp52byc/MmDeo5yKdr+gXdJoTdzPRzBEAiBKjSasyN29ODqXSemEQCZfRIvbJP8thKRBrd4e+NLEMQIgMGNz3+DWDnLmjnIDCaVcC7BKxuycwvtJq1qlKFtTaXcBIgYD10VEXJNiZl8i4NlunnZvJz8yYN6jnIp2v6Bd0mhN3M8IAfrZCgAAAAABDiAoXS6QUlCcOApG/j+hr4OhNt0tT4GvCzI6z16Hepi7OwEPBAAAAAABEAT9////AAEDCCN6CAAAAAAAAQQWABQfJ4Qjje0sa2yGBz++6jkM2hGRmAz8CWxpZ2h0bmluZwQCAAEAAQMIinkIAAAAAAABBCJRIGP/7k6n1R5srfkIbihqJSeSKqoluMU66/MvoyoKYn9aIQeRRTKBKkQKTXZscc05GTaUo0CuEeAS5boa2e+6bnbKUwkAwsyrFwIAAAAA",
|
|
"reserve": 200
|
|
}
|
|
},
|
|
{
|
|
"id": "example:unreserveinputs#2",
|
|
"method": "unreserveinputs",
|
|
"params": {
|
|
"psbt": "cHNidP8BAF4CAAAAAVa79WPJoiYrzo/RgzIAn5HanoBFZo0vZvEjxPAVwLv4AAAAAAD9////AXzpHAAAAAAAIlEgBRjpLNlOD2LAbxJt/5i5q+ebfthFoVbVJFZ44mVUR11mAAAAAAEA3gIAAAAAAQENwcSElLyC0jcwUHiODBhtapHyzIdiwytOGiu/Raf4BwAAAAAA/f///wKAhB4AAAAAABYAFAH62Qq81maX4lkhZHIt5KlevuFl82znKQEAAAAWABQyIWyAI6LDf6dJ58BDPdkh+PWUZwJHMEQCIGiJFhVi/d/Hz19Cz48uHTjhgBJ6WAlgl/bLVS7A6VtxAiAwlb7xYzIM4uopFvMnpOmGIOp3+upOPPF2F8VaB8U/HQEhA6BAjey7RADP4ifoh2VXhX7QXkh+sZqozv1EPuU5TxZmZQAAAAEBH4CEHgAAAAAAFgAUAfrZCrzWZpfiWSFkci3kqV6+4WUAAA==",
|
|
"reserve": null
|
|
}
|
|
}
|
|
],
|
|
"example_json_response": [
|
|
{
|
|
"reservations": [
|
|
{
|
|
"txid": "3bbb987a875ecf3a320baf814f2ddd36a183afa13ffe460a389c5052902e5d28",
|
|
"vout": 0,
|
|
"was_reserved": true,
|
|
"reserved": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"reservations": []
|
|
}
|
|
],
|
|
"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>"
|
|
]
|
|
}
|