lightning-signmessage

lightning-signmessage -- Command to create a signature from this node

SYNOPSIS

signmessage message

DESCRIPTION

The signmessage RPC command creates a digital signature of message using this node's secret key. A receiver who knows your node's id and the message can be sure that the resulting signature could only be created by something with access to this node's secret key.

  • message (string): Less than 65536 characters long message to be signed by the node.

RETURN VALUE

On success, an object is returned, containing:

  • signature (hex) (always 128 characters): The signature.
  • recid (hex) (always 2 characters): The recovery id (0, 1, 2 or 3).
  • zbase (string): signature and recid encoded in a style compatible with lnd's [SignMessageRequest](https://api.lightning.community/#grpc-request- signmessagerequest).

AUTHOR

Rusty Russell <[email protected]> is mainly responsible.

SEE ALSO

lightning-checkmessage(7)

RESOURCES

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

SignMessageRequest

EXAMPLES

Example 1:

Request:

lightning-cli signmessage -k "message"="this is a test!"
{
  "id": "example:signmessage#1",
  "method": "signmessage",
  "params": {
    "message": "this is a test!"
  }
}

Response:

{
  "signature": "9ea05929890e40489edbd5fe0552d22bcffe00bbd29da4fcf93ed5d8f1973e421509071a64935231a126637e3615225ddda86d2d0926ae537d9c3be149f9b21f",
  "recid": "00",
  "zbase": "d6xkysjjtr8ry1r65xk9hbk14eih99oyzxjj5j8h9r9pms8t1h9rrfejyhpgjr41ggo1ca56gak1rzq7ibs14njgi3jz58b5hfr9uco9"
}

Example 2:

Request:

lightning-cli signmessage -k "message"="message for you"
{
  "id": "example:signmessage#2",
  "method": "signmessage",
  "params": {
    "message": "message for you"
  }
}

Response:

{
  "signature": "8149401781108c1c2fda12d91969bfe2306afe06c387394d47a83a85a14702a16b6fcd0060693da436ff1c2b25cc470d7db68fe45d833733d8dca660a3f4d67d",
  "recid": "00",
  "zbase": "d6yw1oyzoreea8bx5ejp1gmjz9tdy4z6y5baqqkpe6wdibpbehbkn45x3wygy4j7wo5x68bmrzgrqdm7s486ezcdgh37tzfgcnt9jiu7"
}

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.