lightning-preapproveinvoice

lightning-preapproveinvoice -- Ask the HSM to preapprove an invoice (low-level)

SYNOPSIS

preapproveinvoice bolt11

DESCRIPTION

Command 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.

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.

AUTHOR

Ken Sedgwick <[email protected]> is mainly responsible.

SEE ALSO

lightning-pay(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:

{}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.