2024-01-15 13:35:14 -08:00
{
"$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"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-01-15 13:35:14 -08:00
"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"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-01-15 13:35:14 -08:00
"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"
] ,
2024-10-30 09:38:42 +10:30
"additionalProperties" : false ,
2024-01-15 13:35:14 -08:00
"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."
] ,
2024-06-20 14:57:02 -07:00
"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" : [
2024-01-15 13:35:14 -08:00
{
2024-03-27 18:45:18 -07:00
"request" : {
"id" : "example:unreserveinputs#1" ,
"method" : "unreserveinputs" ,
"params" : {
2024-07-18 00:28:22 -07:00
"psbt" : "cHNidP8BAF4CAAAAAZiQf/mEs4NcFFfD4K8xauOgSpbz/xeetoXVWAPCI0h6AQAAAAD9////AahhAAAAAAAAIlEg+3d9jpNmK0getyg5W+Mp31CPIRDKcJg/mZs/uaVrQ+GZAAAAAAEAiQIAAAABswU80whDZOoIHS/lfyxwmHh5USHBwbcjWHaJ9/XU+78BAAAAAP3///8CgIQeAAAAAAAiACDJvFwGPK7796bHgUQHtWJ7T4GotW7L6TLGgvnLrA0Z32INzQsAAAAAIlEgyRg+3pEh88b9FJiCLEenYCcyJ2ackJUIhDusW72BP2iYAAAAAQErYg3NCwAAAAAiUSDJGD7ekSHzxv0UmIIsR6dgJzInZpyQlQiEO6xbvYE/aAAA" ,
2024-03-27 18:45:18 -07:00
"reserve" : 200
}
} ,
"response" : {
2024-07-18 00:28:22 -07:00
"reservations" : [ ]
2024-01-15 13:35:14 -08:00
}
} ,
{
2024-03-27 18:45:18 -07:00
"request" : {
"id" : "example:unreserveinputs#2" ,
"method" : "unreserveinputs" ,
2024-07-18 00:28:22 -07:00
"params" : [
"cHNidP8BAF4CAAAAAZiQf/mEs4NcFFfD4K8xauOgSpbz/xeetoXVWAPCI0h6AQAAAAD9////AfZRxQsAAAAAIlEg21kTTo7K2doCG6F2JqgaDjc1kRCrH7AL08oPVVJhuE+ZAAAAAAEAiQIAAAABswU80whDZOoIHS/lfyxwmHh5USHBwbcjWHaJ9/XU+78BAAAAAP3///8CgIQeAAAAAAAiACDJvFwGPK7796bHgUQHtWJ7T4GotW7L6TLGgvnLrA0Z32INzQsAAAAAIlEgyRg+3pEh88b9FJiCLEenYCcyJ2ackJUIhDusW72BP2iYAAAAAQErYg3NCwAAAAAiUSDJGD7ekSHzxv0UmIIsR6dgJzInZpyQlQiEO6xbvYE/aAAA"
]
2024-03-27 18:45:18 -07:00
} ,
"response" : {
"reservations" : [ ]
}
2024-01-15 13:35:14 -08:00
}
]
}