home | help
LIGHTNING-SIGNMESSAGEWITHKEY(7) 		 LIGHTNING-SIGNMESSAGEWITHKEY(7)

NAME
     signmessagewithkey  --  Command  to create a signature using a key from the
     wallet

SYNOPSIS
     signmessagewithkey message address

DESCRIPTION
     Command added in v25.05.

     The signmessagewithkey RPC command creates a digital signature  of  message
     using  the key associated with the address provided in the input.	The sig-
     nature scheme follows the BIP137 specification.

     *	message (string): Less than 65536 characters long message to  be  signed
	by the node.
     *	address (string): A Bitcoin accepted type address for lookup in the list
	of addresses issued to date.  Only P2WPKH type addresses are supported

RETURN VALUE
     On success, an object is returned, containing:

     *	address (string): The bitcoin address used for signing.
     *	pubkey (pubkey): The public key associated with the bitcoin address pro-
	vided.
     *	signature (hex): The signature.
     *	base64 (string): The signature encoded in base64.

AUTHOR
     Lagrang3 lagrang3@protonmail.com is mainly responsible.

SEE ALSO
RESOURCES
     Main web site: https://github.com/ElementsProject/lightning

EXAMPLES
     Example 1:

     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="
     }

Core Lightning v26.06.1 			 LIGHTNING-SIGNMESSAGEWITHKEY(7)

home | help