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

FreeBSD Manual Pages

  
 
  

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

NAME
       upgradewallet --	Command	to spend all P2SH-wrapped inputs into a	Native
       Segwit output

SYNOPSIS
       upgradewallet [feerate] [reservedok]

DESCRIPTION
       upgradewallet  is  a  convenience RPC which will	spend all p2sh-wrapped
       Segwit deposits in a wallet into	a single Native	Segwit P2WPKH address.

         feerate (feerate, optional): Feerate for  the	 upgrade  transaction.
	  The default is opening. (added v23.02)
         reservedok  (boolean,	 optional):  Tells  the	 wallet	to include all
	  P2SH-wrapped inputs, including reserved ones.	(added v23.02)

RETURN VALUE
       On success, an object is	returned, containing:

         upgraded_outs	(u64): Count of	spent/upgraded UTXOs. (added v23.02)
         psbt (string,	optional): The	PSBT  that  was	 finalized  and	 sent.
	  (added v23.02)
         tx  (hex,  optional):	 The  raw  transaction	which was sent.	(added
	  v23.02)
         txid (txid, optional): The txid of the tx. (added v23.02)

AUTHOR
       Lisa Neigut <<niftynei@gmail.com>> is mainly responsible.

SEE ALSO
       lightning-utxopsbt(7),	lightning-reserveinputs(7),    lightning-unre-
       serveinputs(7)

RESOURCES
       Main web	site: <https://github.com/ElementsProject/lightning>

USAGE
       The  caller is trying to	buy a liquidity	ad but the command keeps fail-
       ing. They have funds in their wallet, but they're all P2SH-wrapped out-
       puts.

       The caller can call upgradewallet to convert their funds	to native seg-
       wit outputs, which are valid for	liquidity ad buys.

EXAMPLES
       Example 1:

       Request:

       $ lightning-cli upgradewallet

       {
	 "id": "example:upgradewallet#1",
	 "method": "upgradewallet",
	 "params": {}
       }

       Response:

       {
	 "upgraded_outs": 0
       }

       Example 2:

       Request:

       $ lightning-cli upgradewallet -k	"feerate"="urgent" "reservedok"=True

       {
	 "id": "example:upgradewallet#2",
	 "method": "upgradewallet",
	 "params": {
	   "feerate": "urgent",
	   "reservedok": true
	 }
       }

       Response:

       {
	 "tx": "02000000000101upgd20000200002000020000200002000020000200002000020000200002000020000200002000020000200002000020000200002000020000200002000020000200002000020000200002000020000200002000020000",
	 "txid": "txidupgrade200000200000200000200000200000200000200000200000200000",
	 "psbt": "cHNidP8BAgQCAAAAAQMEbwAAAAEEAQpsbt110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000110000",
	 "upgraded_outs": 1
       }

Core Lightning v25.09				    LIGHTNING-UPGRADEWALLET(7)

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

home | help