LIGHTNING-EXPOSESECRET(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’– LIGHTNING-EXPOSESECRET πŸ’–

okay so bestie, this is the manual page for lightning-exposesecret β€” the command that pulls out your hsm_secret file for backup. yeah. that one. 🫢


✨ NAME ✨

exposesecret β€” the command for extracting the hsm_secret file for backup. that's it, that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

exposesecret passphrase [identifier]

πŸ¦‹ DESCRIPTION πŸ¦‹

so this command was added in v24.11, and it's the RPC command that lets you read the HSM secret. yes, the actual secret. no cap.

⚠️ heads up: it does not work with encrypted hsm secrets. like, at all. and it only operates if exposesecret-passphrase has been set in the configuration. no config, no vibes. πŸ’…

here's the tea on the arguments:

  • passphrase (string) β€” the passphrase, which must match the exposesecret-passphrase configuration parameter. if it doesn't match, bestie, you're not getting in. πŸ”’
  • identifier (string, optional) β€” a four-character, valid lowercase bech32 string (so not 1, i, o or b) to use in the resulting BIP-93 output. if you don't specify it, it's generated from the node alias. iconic behaviour honestly. ✨

πŸ’œ RETURN VALUE πŸ’œ

on success, you get an object back, containing:

  • identifier (string) β€” the four-character identifier used in the codex32 output. it's redundant, but presented separately for clarity. lowkey thoughtful of them. πŸ₯Ή
  • codex32 (string) β€” the full codex32-encoded (i.e. BIP-93 encoded) HSM secret. the main character of the response, fr fr. πŸ‘‘
  • 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. thank you king. πŸ«‘πŸ’–


⭐ SEE ALSO ⭐


πŸ”₯ RESOURCES πŸ”₯

main web site: https://github.com/ElementsProject/lightning β€” go click around, it's giving very much community. 🌸


πŸ’… 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"
}
πŸ”₯ notice how example 3 is the only one with mnemonic? that's the mnemonic-based secret life. the other two are just built different. πŸ’€

and that's the whole page bestie!! πŸŽ€ this one's brought to you by Core Lightning v26.06.9 β€” yes that's the version, and LIGHTNING-EXPOSESECRET(7) is the page itself, so now you know all of it. go back up your secret responsibly and slay πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from