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

FreeBSD Manual Pages

  
 
  

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

NAME
       lightning-multiwithdraw	--  Command  for  withdrawing  to multiple ad-
       dresses

SYNOPSIS
       multiwithdraw outputs [feerate] [minconf] [utxos]

DESCRIPTION
       The multiwithdraw RPC command sends funds from Core Lightning's	inter-
       nal wallet to the addresses specified in	outputs.

         outputs  (array  of outputdescs): An array containing	objects	of the
	  form {address: amount}. The amount may be the	string all, indicating
	  that all onchain funds be sent to the	specified address.  Otherwise,
	  it is	in satoshi precision; it can be	a whole	number,	a whole	number
	  ending  in sat, a whole number ending	in 000msat, or a number	with 1
	  to 8 decimal places ending in	btc.:

	    (outputdesc, optional)
         feerate (feerate, optional): Feerate used for	the  withdrawals.  See
	  NOTES	 in  lightning-feerates(7) for possible	values.	The default is
	  normal.
         minconf (u32,	optional): Minimum number of confirmations  that  used
	  outputs should have. The default is 1.
         utxos	(array of outpoints, optional):

	    (outpoint,	 optional):  Utxos to be used to be withdrawn from, as
	     an	array of txid:vout. These must be drawn	from the node's	avail-
	     able UTXO set.

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

         tx (hex): The	raw transaction	which was sent.
         txid (txid): The txid	of the tx.

ERRORS
       On failure, an error is reported	and the	withdrawal transaction is  not
       created.

         -1: Catchall nonspecific error.
         301:	There  are  not	enough funds in	the internal wallet (including
	  fees)	to create the transaction.
         302: The dust	limit is not met.

AUTHOR
       ZmnSCPxj	<<ZmnSCPxj@protonmail.com>> is mainly responsible.

SEE ALSO
       lightning-listfunds(7), lightning-fundchannel(7), lightning-newaddr(7),
       lightning-txprepare(7), lightning-withdraw(7)

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

EXAMPLES
       Example 1:

       Request:

       $ lightning-cli multiwithdraw -k	"outputs"='[{"bcrt1q84payf4ucfcpnt0994arm3f20tqmu29cna738w": "2222000msat"}, {"bcrt1q64wyjwvrmdj3uyz8w32mr4qgcv08a833zepjm3": "3333000msat"}]'

       {
	 "id": "example:multiwithdraw#1",
	 "method": "multiwithdraw",
	 "params": {
	   "outputs": [
	     {
	       "bcrt1q84payf4ucfcpnt0994arm3f20tqmu29cna738w": "2222000msat"
	     },
	     {
	       "bcrt1q64wyjwvrmdj3uyz8w32mr4qgcv08a833zepjm3": "3333000msat"
	     }
	   ]
	 }
       }

       Response:

       {
	 "tx": "02000000000155multiw55000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000550005500055000",
	 "txid": "txid5500055000550005500055000550005500055000550005500055000"
       }

       Example 2:

       Request:

       $ lightning-cli multiwithdraw -k	"outputs"='[{"bcrt1p97zrhgxgm6wscsdx8gjafj4jyqetunat7fynrk4cyg2rz6lzrr9q6dlrp2": 1000},	{"bcrt1qm7k64cvd2ljw758ptwrrm8ny30u67ea3cfkxpn": 1000},	{"bcrt1qdgvytwcw58uwlf3lqrej2eqaku6smn2mdvkycp": 1000},	{"bcrt1q68wfpfam8tu3a457jv7u8r64tdvqltgfs0kj84": 1000},	{"bcrt1qq7g9ccvfcxhg4lcj2e4s8u6l75tdzl5y7krmtl": 1000},	{"bcrt1pp9uw53lnrtt9v8vkemhpf6z3jfex2dkyu8je6z0jzlem2a3tqccqvseg2y": 1000}, {"bcrt1q5sacyx5hjrugpcgn5w2mw9aq7d2tnkwxmmjp06": 1000}]'

       {
	 "id": "example:multiwithdraw#2",
	 "method": "multiwithdraw",
	 "params": {
	   "outputs": [
	     {
	       "bcrt1p97zrhgxgm6wscsdx8gjafj4jyqetunat7fynrk4cyg2rz6lzrr9q6dlrp2": 1000
	     },
	     {
	       "bcrt1qm7k64cvd2ljw758ptwrrm8ny30u67ea3cfkxpn": 1000
	     },
	     {
	       "bcrt1qdgvytwcw58uwlf3lqrej2eqaku6smn2mdvkycp": 1000
	     },
	     {
	       "bcrt1q68wfpfam8tu3a457jv7u8r64tdvqltgfs0kj84": 1000
	     },
	     {
	       "bcrt1qq7g9ccvfcxhg4lcj2e4s8u6l75tdzl5y7krmtl": 1000
	     },
	     {
	       "bcrt1pp9uw53lnrtt9v8vkemhpf6z3jfex2dkyu8je6z0jzlem2a3tqccqvseg2y": 1000
	     },
	     {
	       "bcrt1q5sacyx5hjrugpcgn5w2mw9aq7d2tnkwxmmjp06": 1000
	     }
	   ]
	 }
       }

       Response:

       {
	 "tx": "02000000000155multiw56000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000560005600056000",
	 "txid": "txid5600056000560005600056000560005600056000560005600056000"
       }

Core Lightning v25.02				    LIGHTNING-MULTIWITHDRAW(7)

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

home | help