LIGHTNING-MULTIWITHDRAW(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’– multiwithdraw β€” the LIGHTNING-MULTIWITHDRAW(7) page πŸ’–

okay bestie, this is the LIGHTNING-MULTIWITHDRAW(7) page for multiwithdraw, and it's literally the command for withdrawing to multiple addresses. group-chat recap: you give it outputs, it sends funds from Core Lightning's internal wallet. slay. πŸ’…


✨ NAME ✨

multiwithdraw β€” command for withdrawing to multiple addresses


⭐ SYNOPSIS ⭐

multiwithdraw outputs [feerate] [minconf] [utxos]

πŸ’– DESCRIPTION πŸ’–

The multiwithdraw RPC command sends funds from Core Lightning's internal wallet to the addresses specified in outputs. no cap, that's the whole vibe.

  • outputs (array of outputdescs) β€” an array containing objects of the form {address: amount}. The amount may be the string all, which means all onchain funds get sent to the specified address. Otherwise it's 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 available 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. like, nothing goes out. 🫢

  • -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. iconic. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹


🌈 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"
}

okay that's the whole LIGHTNING-MULTIWITHDRAW(7) page, bestie β€” brought to you by Core Lightning v26.06.9. mwah πŸ’‹

πŸ“¦ where this page comes from