LIGHTNING-RESERVEINPUTS(7)
π LIGHTNING-RESERVEINPUTS(7) β reserveinputs
okay bestie, welcome to the lightning-reserveinputs page of the Core Lightning manual π this is the one that goes and claims your UTXOs for a transaction before it's even signed, so nobody else can swoop in and spend them. main character energy for your coins, honestly π
β¨ NAME β¨
reserveinputs β build a transaction and reserve up the UTXOs it spends. literally claiming your bag π
πΈ SYNOPSIS πΈ
reserveinputs psbt [exclusive] [reserve]
π¦ DESCRIPTION π¦
so the reserveinputs RPC command puts (or bumps up) reservations on any inputs that are specified in psbt and that are known to lightningd. that's the whole vibe β¨
it'll fail with an error if any of the inputs are known to be spent, and it just ignores inputs that are unknown β not its problem, not its business π
normally the command fails (and makes no reservations at all, like, zero) if an input is already reserved.
psbt(string) β the PSBT you want to reserve inputs from πexclusive(boolean, optional) β if you set this to False, existing reservations are simply extended instead of causing failure. lowkey the chill option πreserve(u32, optional) β how many blocks to reserve for. by default, reservations are for the next 72 blocks (that's roughly 6 hours β°)
π RETURN VALUE π
on success you get an object containing reservations β it's an array of objects, and each one has:
txid(txid) β the input transaction id.vout(u32) β the input index output number that got reserved.was_reserved(boolean) β whether the input was already reserved (like, before you showed up π).reserved(boolean) (always true) β whether the input is now reserved. spoiler: yes, queen πreserved_to_block(u32) β the blockheight where the reservation expires. tick tock β³
π ERRORS π
on failure, an error gets reported and no UTXOs are reserved. none. zero. nada π
-32602β invalid parameter, like specifying a spent/reserved input inpsbt. not the vibe fr fr.
π AUTHOR π
Lisa Neigut niftynei@gmail.com is mainly responsible. queen behavior, we stan π«Ά
π SEE ALSO π
lightning-unreserveinputs(7), lightning-signpsbt(7), lightning-sendpsbt(7)
β RESOURCES β
main web site: https://github.com/ElementsProject/lightning β go be nosy, iykyk π§
π EXAMPLES π
Example 1
Request:
$ lightning-cli reserveinputs -k "psbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100"
{
"id": "example:reserveinputs#1",
"method": "reserveinputs",
"params": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100"
}
}
Response:
{
"reservations": [
{
"txid": "channeltxid111200111200111200111200111200111200111200111200111200",
"vout": 1,
"was_reserved": false,
"reserved": true,
"reserved_to_block": 226
}
]
}
Example 2
Request:
$ lightning-cli reserveinputs -k "psbt"="cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200"
{
"id": "example:reserveinputs#2",
"method": "reserveinputs",
"params": {
"psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200011200"
}
}
Response:
{
"reservations": [
{
"txid": "txidocsigned1011000110001100011000110001100011000110001100011000",
"vout": 1,
"was_reserved": false,
"reserved": true,
"reserved_to_block": 226
}
]
}
and that's the whole page, bestie π«Ά this was Core Lightning v26.06.9, LIGHTNING-RESERVEINPUTS(7), signing off β go reserve those inputs, slay πβ¨
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms