LIGHTNING-PREAPPROVEINVOICE(7)

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

πŸ’Έ preapproveinvoice: the HSM vibe check πŸ’Έ

okay so this is the LIGHTNING-PREAPPROVEINVOICE(7) manual, and it's literally about asking the HSM to preapprove an invoice β€” low-level edition, no cap. πŸ’…


🌸 NAME 🌸

preapproveinvoice β€” Ask the HSM to preapprove an invoice (low-level) 🫢

✨ SYNOPSIS ✨

preapproveinvoice bolt11

πŸŽ€ DESCRIPTION πŸŽ€

Bestie, this command was added in v23.02. The preapproveinvoice RPC command submits the bolt11 invoice to the HSM to check that it is approved for payment. 🧚

Generally the preapproveinvoice request does not need to be made explicitly β€” it is automatically generated as part of a pay request. slay, convenience. ✨

By default, the HSM will approve all preapproveinvoice requests. πŸ’–

If a remote signer is being used, it might decline an preapproveinvoice request because it would exceed velocity controls, is not covered by allowlist controls, was declined manually, or other reasons. 😭

If a remote signer declines a preapproveinvoice request, a subsequent attempt to pay the invoice anyway will fail; the signer will refuse to sign the commitment. πŸ’€
  • bolt11 (string) β€” Bolt11 invoice to submit to the HSM to check. (added v23.02)

πŸ“¦ RETURN VALUE πŸ“¦

On success, an empty object is returned β€” literally {}, that's it. periodt. ✨

πŸ‘‘ AUTHOR πŸ‘‘

Ken Sedgwick ken@bonsai.com is mainly responsible. πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹

lightning-xpay(7)

🌈 RESOURCES 🌈

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

πŸ“ EXAMPLES πŸ“

πŸ’« Example 1 πŸ’«

Request:

$ lightning-cli preapproveinvoice -k "bolt11"="lnbcrt100n1pnt2bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000"
{
  "id": "example:preapproveinvoice#1",
  "method": "preapproveinvoice",
  "params": {
    "bolt11": "lnbcrt100n1pnt2bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000bolt11invl020400000000"
  }
}

Response:

{}

πŸ’« Example 2 πŸ’«

Request:

$ lightning-cli preapproveinvoice "lnbcrt100n1pnt2bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000"
{
  "id": "example:preapproveinvoice#2",
  "method": "preapproveinvoice",
  "params": [
    "lnbcrt100n1pnt2bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000bolt11invl020500000000"
  ]
}

Response:

{}

okay that's the whole manual, bestie!! πŸ’– brought to you by Core Lightning v26.06.9, manual name LIGHTNING-PREAPPROVEINVOICE(7) β€” mwah, bye! 🫢

πŸ“¦ where this page comes from