LIGHTNING-SENDAMOUNT(7)

πŸ“¦ version 26.06.9, in nixpkgs unstable

πŸ’Έ sendamount β€” the LIGHTNING-SENDAMOUNT(7) glow-up ✨

okay so bestie, buckle up, because we're diving into LIGHTNING-SENDAMOUNT(7) and honestly? it's giving "send a fixed amount and let the fees figure themselves out" energy πŸ’…


πŸŽ€ NAME πŸŽ€

sendamount β€” the command that sends a fixed amount, no cap, no cap 🧒


✨ SYNOPSIS ✨

sendamount invstring amount_msat [maxfee] [layers] [retry_for]
[maxdelay] [payer_note] [label]

🌸 DESCRIPTION 🌸

So this command was added in v26.06, and it's literally the moment we all been waiting for 🫢

The sendamount RPC command tries to send a fixed amount to the destination you point it at. The way this works: fees get deducted from that amount, so the value that actually lands at the destination may vary depending on which route got chosen. It's giving "you get what you get and you don't throw a fit" 😭

  • invstring (string) β€” A bolt12 (non-recursive) offer with no specific amount, or a BIP353 name. It can also pay a Bolt11 invoice as long as the amount is un-specified. slay πŸ¦‹
  • amount_msat (msat) β€” The desired amount to be spent with this payment, i.e. we send this value and the destination receives this minus fees. amount_msat is in millisatoshi precision; it can be a whole number, or a whole number with suffix msat or sat, or a three decimal point number with suffix sat, or an 1 to 11 decimal point number suffixed by btc. the range is ranging, fr fr πŸ”₯
  • maxfee (msat, optional) β€” maxfee creates an absolute limit on what fee will be paid. The default is: for amount_msat smaller than 10sat it is 50%, for amount_msat between 10sat and 500sat maxfee is 5sat, while for amount_msat greater than 500sat it is 1%. tiered queen behavior πŸ‘‘
  • layers (array of strings, optional) β€” These are askrene layers to apply in addition to the 'xpay' layer: these can alter the topology or provide additional information on the lightning network. See askrene-create-layer.:
    • (string, optional) β€” name of an existing layer
  • retry_for (u32, optional) β€” Until retry_for seconds passes, the command will keep finding routes and retrying the payment. The default is 60 seconds. it's persistent, she doesn't give up πŸ’ͺ
  • maxdelay (u32, optional) β€” A payment may be delayed for up to maxdelay blocks by another node; clients should be prepared for this worst case. The default is 2016. prepare yourself bestie πŸ™ˆ
  • label (string, optional) β€” Attach a label to payments for which is returned in listpays and listsendpays. This is for your own use: it is not visible to the recipient. your little secret 🀫

πŸ’– RETURN VALUE πŸ’–

On success, an object is returned, containing:

  • payment_preimage (secret) β€” The proof of payment: SHA256 of this payment_hash. the receipt, the flex, the moment πŸŽ€
  • failed_parts (u64) β€” How many separate payment parts failed. sad but informative πŸ’€
  • successful_parts (u64) β€” How many separate payment parts succeeded (or are anticipated to succeed). This will be at least one. a win is a win ✨
  • amount_msat (msat) β€” Amount the recipient received.
  • amount_sent_msat (msat) β€” Total amount we sent (including fees).

πŸ”₯ ERRORS πŸ”₯

The following error codes may occur:

  • -1 β€” Catchall nonspecific error. the "idk what happened either" of error codes 😭
  • 203 β€” Permanent failure from destination (e.g. it said it didn't recognize invoice)
  • 205 β€” Couldn't find, or find a way to, the destination. we literally cannot get there πŸ™ˆ
  • 207 β€” Invoice has expired. too late, bestie ⏰
  • 219 β€” Invoice has already been paid. been there, done that πŸ’…
  • 209 β€” Other payment error.

🧚 AUTHOR 🧚

Lagrang3 lagrang3@protonmail.com is mainly responsible. icon behavior, we stan 🫢


🌈 SEE ALSO 🌈


⭐ RESOURCES ⭐

Main web site: https://github.com/ElementsProject/lightning


πŸ“ EXAMPLES πŸ“

ngl the original page has the heading and then nothing under it β€” the EXAMPLES section is literally empty. so there are no examples here to show you, and i'm not about to make any up πŸ’€ no cap.


πŸ’œ that's the whole page, bestie πŸ’œ

mwah, go send some fixed amounts β€” this was Core Lightning v26.06.9, signing off πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from