2020-06-10 02:20:18 +02:00
|
|
|
lightning-reserveinputs -- Construct a transaction and reserve the UTXOs it spends
|
|
|
|
==================================================================================
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
|
2022-01-26 18:18:49 +01:00
|
|
|
**reserveinputs** *psbt* [*exclusive*] [*reserve*]
|
2020-06-10 02:20:18 +02:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
2020-07-15 07:31:49 +02:00
|
|
|
The **reserveinputs** RPC command places (or increases) reservations on any
|
|
|
|
inputs specified in *psbt* which are known to lightningd. It will fail
|
2020-07-15 07:39:47 +02:00
|
|
|
with an error if any of the inputs are known to be spent, and ignore inputs
|
|
|
|
which are unknown.
|
2020-06-10 02:20:18 +02:00
|
|
|
|
2020-07-15 07:32:49 +02:00
|
|
|
Normally the command will fail (with no reservations made) if an input
|
|
|
|
is already reserved. If *exclusive* is set to *False*, then existing
|
|
|
|
reservations are simply extended, rather than causing failure.
|
|
|
|
|
2021-05-26 03:19:37 +02:00
|
|
|
By default, reservations are for the next 72 blocks (approximately 6
|
|
|
|
hours), but this can be changed by setting *reserve*.
|
2020-06-10 02:20:18 +02:00
|
|
|
|
|
|
|
RETURN VALUE
|
|
|
|
------------
|
|
|
|
|
2021-06-16 03:10:17 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-START)
|
|
|
|
On success, an object containing **reservations** is returned. It is an array of objects, where each object contains:
|
2022-09-05 23:33:09 +02:00
|
|
|
|
2021-06-16 03:10:17 +02:00
|
|
|
- **txid** (txid): the transaction id
|
|
|
|
- **vout** (u32): the output number which was reserved
|
2022-09-05 23:45:06 +02:00
|
|
|
- **was\_reserved** (boolean): whether the input was already reserved
|
2021-06-16 03:10:17 +02:00
|
|
|
- **reserved** (boolean): whether the input is now reserved (always *true*)
|
2022-09-05 23:45:06 +02:00
|
|
|
- **reserved\_to\_block** (u32): what blockheight the reservation will expire
|
2021-09-03 12:07:59 +02:00
|
|
|
|
2021-06-16 03:10:17 +02:00
|
|
|
[comment]: # (GENERATE-FROM-SCHEMA-END)
|
|
|
|
|
2020-07-15 07:39:47 +02:00
|
|
|
On success, a *reservations* array is returned, with an entry for each input
|
2020-07-15 07:31:49 +02:00
|
|
|
which was reserved:
|
|
|
|
|
|
|
|
- *txid* is the input transaction id.
|
|
|
|
- *vout* is the input index.
|
2022-11-11 02:44:56 +01:00
|
|
|
- *was\_reserved* indicates whether the input was already reserved.
|
2020-07-15 07:31:49 +02:00
|
|
|
- *reserved* indicates that the input is now reserved (i.e. true).
|
2022-11-11 02:44:56 +01:00
|
|
|
- *reserved\_to\_block* indicates what blockheight the reservation will expire.
|
2020-06-10 02:20:18 +02:00
|
|
|
|
|
|
|
On failure, an error is reported and no UTXOs are reserved.
|
|
|
|
|
|
|
|
The following error codes may occur:
|
2020-07-15 07:32:49 +02:00
|
|
|
- -32602: Invalid parameter, such as specifying a spent/reserved input in *psbt*.
|
2020-06-10 02:20:18 +02:00
|
|
|
|
|
|
|
AUTHOR
|
|
|
|
------
|
|
|
|
|
|
|
|
niftynei <<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>
|
2020-08-25 03:33:16 +02:00
|
|
|
|
2023-01-30 07:24:16 +01:00
|
|
|
[comment]: # ( SHA256STAMP:0df4568eb6977f3837270b935c26792bc08d18cfa05ce0c517aae880cf0b497b)
|