Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
LIGHTNING-RESERVEINPUTS(7)			    LIGHTNING-RESERVEINPUTS(7)

NAME
       lightning-reserveinputs	--  Construct  a  transaction  and reserve the
       UTXOs it	spends

SYNOPSIS
       reserveinputs psbt [exclusive] [reserve]

DESCRIPTION
       The reserveinputs RPC command places (or	increases) reservations	on any
       inputs specified	in psbt	which are known	to lightningd.	It  will  fail
       with  an	 error	if any of the inputs are known to be spent, and	ignore
       inputs which are	unknown.

       Normally	the command will fail (with no reservations made) if an	 input
       is already reserved.

         psbt (string): The PSBT to reserve inputs from.
         exclusive  (boolean,	optional):  If set to False, existing reserva-
	  tions	are simply extended, rather than causing failure.
         reserve (u32,	optional): The number of blocks	 to  reserve.  By  de-
	  fault,  reservations	are  for  the  next 72 blocks (approximately 6
	  hours).

RETURN VALUE
       On success, an object containing	reservations is	returned. It is	an ar-
       ray of objects, where each object contains:

         txid (txid): The input transaction id.
         vout (u32): The input	index output number which was reserved.
         was_reserved (boolean): Whether the input was	already	reserved.
         reserved (boolean) (always true): Whether the	input is now reserved.
         reserved_to_block (u32): What	blockheight the	reservation  will  ex-
	  pire.

ERRORS
       On failure, an error is reported	and no UTXOs are reserved.

         -32602: Invalid parameter, such as specifying	a spent/reserved input
	  in 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
       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
	   }
	 ]
       }

Core Lightning v25.02				    LIGHTNING-RESERVEINPUTS(7)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=lightning-reserveinputs&sektion=7&manpath=FreeBSD+Ports+14.3.quarterly>

home | help