lightning-signinvoice

lightning-signinvoice -- Low-level invoice signing

SYNOPSIS

signinvoice invstring

DESCRIPTION

Command added in v23.02.

The signinvoice RPC command signs an invoice. Unlike createinvoice it does not save the invoice into the database and thus does not require the preimage.

  • invstring (string): Bolt11 form, but the final signature is ignored. Minimal sanity checks are done.

RETURN VALUE

On success, an object is returned, containing:

  • bolt11 (string): The bolt11 string.

ERRORS

The following error codes may occur:

  • -1: Catchall nonspecific error.

AUTHOR

Carl Dong <[email protected]> is mainly responsible.

SEE ALSO

lightning-createinvoice(7), lightning-invoice(7), lightning-listinvoices(7), lightning-delinvoice(7), lightning-getroute(7), lightning-sendpay(7), lightning-offer(7)

RESOURCES

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

EXAMPLES

Example 1:

Request:

lightning-cli signinvoice -k "invstring"="lnbcrt100n1pnt2bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000"
{
  "id": "example:signinvoice#1",
  "method": "signinvoice",
  "params": {
    "invstring": "lnbcrt100n1pnt2bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000bolt11invl010200000000"
  }
}

Response:

{
  "bolt11": "lnbcrt100n1pnt2bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000bolt11invl060600000000"
}

Example 2:

Request:

lightning-cli signinvoice "lnbcrt100n1pnt2bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000"
{
  "id": "example:signinvoice#2",
  "method": "signinvoice",
  "params": [
    "lnbcrt100n1pnt2bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000bolt11invl020600000000"
  ]
}

Response:

{
  "bolt11": "lnbcrt100n1pnt2bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000bolt11invl060700000000"
}

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.