LIGHTNING-PREAPPROVEINVOICE(7)
πΈ 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 π¦
π 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
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms