LIGHTNING-SIGNMESSAGEWITHKEY(7)
π LIGHTNING-SIGNMESSAGEWITHKEY β the manual, but make it cute
okay bestie so this is lightning-signmessagewithkey, a section 7 manual page, and it's literally the whole guide to one (1) RPC command. we're gonna get you signing things, no cap π«Ά
β¨ NAME β¨
signmessagewithkey β the command that makes a signature using a key from the wallet. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
signmessagewithkey message address
two arguments, in that order, don't @ me π
π¦ DESCRIPTION π¦
so this command was added in v25.05 (yes, version check, always).
signmessagewithkey creates a digital signature of message using the key associated with the address you hand it. the signature scheme follows the BIP137 specification. iconic behavior honestly π
here's the deets on the args:
message(string): the message you wanna sign, and it has to be less than 65536 characters long. keep it cute, keep it short β¨address(string): a Bitcoin accepted type address, which gets looked up in the list of addresses issued to date. β οΈ and listen β only P2WPKH type addresses are supported. any other type? not happening, bestie π
π RETURN VALUE π
on success you get an object back, and it's giving full receipts:
address(string): the bitcoin address that was used for signing.pubkey(pubkey): the public key associated with the bitcoin address you provided.signature(hex): the signature itself.base64(string): that same signature, encoded in base64. two formats, one icon π
π«Ά AUTHOR π«Ά
Lagrang3 lagrang3@protonmail.com is mainly responsible. thank you king, we appreciate you π
π SEE ALSO / RESOURCES π
- Main web site:
https://github.com/ElementsProject/lightningβ go click around, it's where everything lives πΈ
β EXAMPLES β
Example 1 β let's go π
Request:
$ lightning-cli signmessagewithkey -k "message"="a test message" "address"="bcrt1qgrh5vtf63mtayzhxwp480aww3j3qfr5qpq65un"
{
"id": "example:signmessagewithkey#1",
"method": "signmessagewithkey",
"params": {
"message": "a test message",
"address": "bcrt1qgrh5vtf63mtayzhxwp480aww3j3qfr5qpq65un"
}
}
Response:
{
"address": "bcrt1qgrh5vtf63mtayzhxwp480aww3j3qfr5qpq65un",
"pubkey": "03bc4a456585ba21ba26af4a0e5399ec76410b2e0ca67db0f3bcb2f47b232fa4b0",
"signature": "28564edf260a72d991cbb38cf608e293124f8b8f478d13d4544fe27b9d76c65df1284ca395ccdfd3d5f151729ef18f56c028f5f860155d6aa4d0aaaa176a00db01",
"base64": "KFZO3yYKctmRy7OM9gjikxJPi49HjRPUVE/ie512xl3xKEyjlczf09XxUXKe8Y9WwCj1+GAVXWqk0KqqF2oA2wE="
}
look at that signature. ate and left no crumbs ππ₯
and that's the whole page bestie β go forth and sign responsibly π β¨
this lil masterpiece ships with Core Lightning v26.06.9, dated in the footer of the original, and yes the header up top said LIGHTNING-SIGNMESSAGEWITHKEY(7) twice because that's just how manpages roll π bye ily π«Ά
π¦ 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