Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

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

NAME
       exposesecret -- Command for extracting the hsm_secret file for backup

SYNOPSIS
       exposesecret passphrase [identifier]

DESCRIPTION
       The  exposesecret  RPC  command	allows you to read the HSM secret, and
       does not	work with encrypted hsm	secrets.  It only operates if the  ex-
       posesecret-passphrase has been set in the configuration.

         passphrase  (string):	The passphrase,	which must match the exposese-
	  cret-passphrase configuration	parameter.
         identifier (string, optional):  A  four-character,  valid  lowercase
	  bech32 string	(not 1,	i, o or	b) to use in the resulting BIP-93 out-
	  put.	If not specified, this is generated from the node alias.

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

         identifier  (string):	 The  four-character  identifier  used	in the
	  codex32 output.  Redundant, but presented separately for clarity.
         codex32 (string): The	full codex32-encoded (i.e. BIP-93 encoded) HSM
	  secret.
         mnemonic (string, optional): The BIP39 mnemonic phrase for  the  HSM
	  secret (only present for mnemonic-based secrets). (added v25.12)

AUTHOR
       Rusty Russell <<rusty@rustcorp.com.au>> is mainly responsible.

SEE ALSO
       lightning-hsmtool(8)

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

EXAMPLES
       Example 1:

       Request:

       $ lightning-cli exposesecret -k "passphrase"="test_exposesecret"

       {
	 "id": "example:exposesecret#1",
	 "method": "exposesecret",
	 "params": {
	   "passphrase": "test_exposesecret"
	 }
       }

       Response:

       {
	 "identifier": "luea",
	 "codex32": "cl10lueasd35kw6r5de5kueedxyesqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqanvrktzhlhusz"
       }

       Example 2:

       Request:

       $ lightning-cli exposesecret "test_exposesecret"	"cln2"

       {
	 "id": "example:exposesecret#2",
	 "method": "exposesecret",
	 "params": [
	   "test_exposesecret",
	   "cln2"
	 ]
       }

       Response:

       {
	 "identifier": "cln2",
	 "codex32": "cl10cln2sd35kw6r5de5kueedxyesqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn9lcvcu7cez4s"
       }

       Example 3:

       Request:

       $ lightning-cli exposesecret -k "passphrase"="test_exposesecret"

       {
	 "id": "example:exposesecret#3",
	 "method": "exposesecret",
	 "params": {
	   "passphrase": "test_exposesecret"
	 }
       }

       Response:

       {
	 "identifier": "peev",
	 "codex32": "cl10peevst6cqh0wu7p5ssjyf4z4ez42ks9jlt3zneju9uuypr2hddak6tlqsjhsks4laxts8q",
	 "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
       }

Core Lightning v25.12.1				     LIGHTNING-EXPOSESECRET(7)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=lightning-exposesecret&sektion=7&manpath=FreeBSD+Ports+15.1.quarterly>

home | help