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

NAME
     makesecret -- Command for deriving pseudorandom key from HSM

SYNOPSIS
     makesecret [hex] [string]

DESCRIPTION
     The makesecret RPC command derives a secret key from the HSM_secret.

     *	hex  (hex, optional): One of hex or string must be specified: hex can be
	any hex data.
     *	string (string, optional): One of  hex	or  string  must  be  specified:
	string is a UTF-8 string interpreted literally.

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

     *	secret (secret): The pseudorandom key derived from HSM_secret.

ERRORS
     The following error codes may occur:

     *	-1: Catchall nonspecific error.

AUTHOR
     Aditya aditya.sharma20111@gmail.com is mainly responsible.

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

EXAMPLES
     Example 1:

     Request:

     $ lightning-cli makesecret "73636220736563726574"

     {
       "id": "example:makesecret#1",
       "method": "makesecret",
       "params": [
	 "73636220736563726574"
       ]
     }

     Response:

     {
       "secret": "82d3e65651ac89124448cb88b5f4cd009f6c321f58ada0fca6e9e3f2d1c5889e"
     }

     Example 2:

     Request:

     $ lightning-cli makesecret -k "string"="scb secret"

     {
       "id": "example:makesecret#2",
       "method": "makesecret",
       "params": {
	 "string": "scb secret"
       }
     }

     Response:

     {
       "secret": "82d3e65651ac89124448cb88b5f4cd009f6c321f58ada0fca6e9e3f2d1c5889e"
     }

Core Lightning v26.06.1 				 LIGHTNING-MAKESECRET(7)

home | help