LIGHTNING-SHOWRUNES(7)

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

✨ showrunes β€” LIGHTNING-SHOWRUNES(7) ✨

okay bestie, this is the showrunes page β€” the command that lists the runes we saved when we generated them, or decodes a rune you hand it. It’s giving rune receipts and we’re obsessed πŸ’…


πŸ’– NAME πŸ’–

showrunes β€” command to list previously generated runes.


🌸 SYNOPSIS 🌸

showrunes [rune]

πŸ¦‹ DESCRIPTION πŸ¦‹

Command added in v23.08. Yes, she’s new-ish and iconic.

The showrunes RPC command either lists runes that we stored as we generate them (see lightning-createrune(7)) or decodes the rune given on the command line. Two modes, one little command, slay ✨

  • rune (string, optional): if specified, only details of that rune will be returned. So if you’re being nosy about one rune, this is your moment πŸ‘‘

πŸŽ€ RETURN VALUE πŸŽ€

On success, an object containing runes is returned. It is an array of objects, where each object contains:

  • rune (string): Base64 encoded rune.
  • unique_id (string): unique id assigned when the rune was generated; this is always a u64 for commando runes.
  • restrictions (array of objects): the restrictions on what commands this rune can authorize.
    • alternatives (array of objects): the alternatives array of objects β€” that’s all the original gives us here, bestie, no extra lore πŸ’€
    • fieldname (string): the field this restriction applies to; see commando-rune(7).
    • value (string): the value accepted for this field.
    • condition (string): the way to compare fieldname and value.
    • english (string): English readable description of this alternative.
    • english (string): English readable summary of alternatives above.
  • restrictions_as_english (string): English readable description of the restrictions array above.
  • stored (boolean, optional) (always false): this is false if the rune does not appear in our datastore (only possible when rune is specified).
  • blacklisted (boolean, optional) (always true): the rune has been blacklisted; see commando-blacklist(7).
  • last_used (number, optional): the last time this rune was successfully used. (added v23.11)
  • our_rune (boolean, optional) (always false): this is not a rune for this node (only possible when rune is specified).

πŸ‘‘ AUTHOR πŸ‘‘

Shahana Farooqui sfarooqui@blockstream.com is mainly responsible. Periodt. πŸ’–


🌈 SEE ALSO 🌈


⭐ RESOURCES ⭐

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


πŸ“ EXAMPLES πŸ“

Example 1:

Request:

$ lightning-cli showrunes -k "rune"="zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA=="

{
  "id": "example:showrunes#1",
  "method": "showrunes",
  "params": {
    "rune": "zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA=="
  }
}

Response:

{
  "runes": [
    {
      "rune": "zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA==",
      "last_used": 1738000000,
      "unique_id": "0",
      "restrictions": [],
      "restrictions_as_english": ""
    }
  ]
}

Example 2:

Request:

$ lightning-cli showrunes

{
  "id": "example:showrunes#2",
  "method": "showrunes",
  "params": {}
}

Response:

       {
         "runes": [
           {
             "rune": "zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA==",
             "last_used": 1738000000,
             "unique_id": "0",
             "restrictions": [],
             "restrictions_as_english": ""
           },
           {
             "rune": "RXgu0DD_i0wSPEZkIDyZIWL0bSAGdhvJ_GHOQdTg04A9MSZpZF4wMjY2ZTQ1OThkMWQzYzQxNWY1NyZtZXRob2Q9bGlzdHBlZXJz",
             "last_used": 1738000000,
             "unique_id": "1",
             "restrictions": [
               {
                 "alternatives": [
                   {
                     "fieldname": "id",
                     "value": "0266e4598d1d3c415f57",
                     "condition": "^",
                     "english": "id starts with 0266e4598d1d3c415f57"
                   }
                 ],
                 "english": "id starts with 0266e4598d1d3c415f57"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "listpeers",
                     "condition": "=",
                     "english": "method equal to listpeers"
                   }
                 ],
                 "english": "method equal to listpeers"
               }
             ],
             "restrictions_as_english": "id starts with 0266e4598d1d3c415f57 AND method equal to listpeers"
           },
           {
             "rune": "QUJEYMLGgiaJvMDv_MhR2hiMKIBTbq-PrL-KxcIlirQ9MiZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==",
             "last_used": 1738000000,
             "unique_id": "2",
             "restrictions": [
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "pay",
                     "condition": "=",
                     "english": "method equal to pay"
                   }
                 ],
                 "english": "method equal to pay"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "pnameamountmsat",
                     "value": "10000",
                     "condition": "<",
                     "english": "pnameamountmsat < 10000"
                   }
                 ],
                 "english": "pnameamountmsat < 10000"
               }
             ],
             "restrictions_as_english": "method equal to pay AND pnameamountmsat < 10000"
           },
           {
             "rune": "jEx3l0c7NMZPSDYT7xnXXvNA83z5PDNBHRQTIk1BwNw9MyZpZD0wMjY2ZTQ1OThkMWQzYzQxNWY1NzJhODQ4ODgzMGI2MGY3ZTc0NGVkOTIzNWViMGIxYmE5MzI4M2IzMTVjMDM1MTgmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZD0wMjY2ZTQ1OThkMWQzYzQxNWY1NzJhODQ4ODgzMGI2MGY3ZTc0NGVkOTIzNWViMGIxYmE5MzI4M2IzMTVjMDM1MTh8cGFycjA9MDI2NmU0NTk4ZDFkM2M0MTVmNTcyYTg0ODg4MzBiNjBmN2U3NDRlZDkyMzVlYjBiMWJhOTMyODNiMzE1YzAzNTE4",
             "unique_id": "3",
             "restrictions": [
               {
                 "alternatives": [
                   {
                     "fieldname": "id",
                     "value": "nodeid010101010101010101010101010101010101010101010101010101010101",
                     "condition": "=",
                     "english": "id equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
                   }
                 ],
                 "english": "id equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "listpeers",
                     "condition": "=",
                     "english": "method equal to listpeers"
                   }
                 ],
                 "english": "method equal to listpeers"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "pnum",
                     "value": "1",
                     "condition": "=",
                     "english": "pnum equal to 1"
                   }
                 ],
                 "english": "pnum equal to 1"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "pnameid",
                     "value": "nodeid010101010101010101010101010101010101010101010101010101010101",
                     "condition": "=",
                     "english": "pnameid equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
                   },
                   {
                     "fieldname": "parr0",
                     "value": "nodeid010101010101010101010101010101010101010101010101010101010101",
                     "condition": "=",
                     "english": "parr0 equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
                   }
                 ],
                 "english": "pnameid equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 OR parr0 equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
               }
             ],
             "restrictions_as_english": "id equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 AND method equal to listpeers AND pnum equal to 1 AND pnameid equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 OR parr0 equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
           },
           {
             "rune": "8_CRIJ4arWAz72A4ILOZ46MESSJtQQQ9iQZjU28qulA9NCZpZD0wMjY2ZTQ1OThkMWQzYzQxNWY1NzJhODQ4ODgzMGI2MGY3ZTc0NGVkOTIzNWViMGIxYmE5MzI4M2IzMTVjMDM1MTgmbWV0aG9kPWxpc3RwZWVycyZwbnVtPTEmcG5hbWVpZF4wMjY2ZTQ1OThkMWQzYzQxNWY1N3xwYXJyMF4wMjY2ZTQ1OThkMWQzYzQxNWY1Nw==",
             "restrictions": [
               {
                 "alternatives": [
                   {
                     "fieldname": "id",
                     "value": "nodeid010101010101010101010101010101010101010101010101010101010101",
                     "condition": "=",
                     "english": "id equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
                   }
                 ],
                 "english": "id equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "listpeers",
                     "condition": "=",
                     "english": "method equal to listpeers"
                   }
                 ],
                 "english": "method equal to listpeers"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "pnum",
                     "value": "1",
                     "condition": "=",
                     "english": "pnum equal to 1"
                   }
                 ],
                 "english": "pnum equal to 1"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "pnameid",
                     "value": "0266e4598d1d3c415f57",
                     "condition": "^",
                     "english": "pnameid starts with 0266e4598d1d3c415f57"
                   },
                   {
                     "fieldname": "parr0",
                     "value": "0266e4598d1d3c415f57",
                     "condition": "^",
                     "english": "parr0 starts with 0266e4598d1d3c415f57"
                   }
                 ],
                 "english": "pnameid starts with 0266e4598d1d3c415f57 OR parr0 starts with 0266e4598d1d3c415f57"
               }
             ],
             "restrictions_as_english": "id equal to 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 AND method equal to listpeers AND pnum equal to 1 AND pnameid starts with 0266e4598d1d3c415f57 OR parr0 starts with 0266e4598d1d3c415f57"
           },
           {
             "rune": "iP1FQEsFmPsu-XW7w8uXIJaJb7jU9PqOfkmXlOyWMuA9NSZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5fG1ldGhvZD1wYXl8bWV0aG9kPXhwYXkmbWV0aG9kL2xpc3RkYXRhc3RvcmUmbWV0aG9kL3BheXxwZXI9MWRheSZtZXRob2QvcGF5fHBuYW1lYW1vdW50X21zYXQ8MTAwMDAwMDAxJm1ldGhvZC94cGF5fHBlcj0xZGF5Jm1ldGhvZC94cGF5fHBuYW1lYW1vdW50X21zYXQ8MTAwMDAwMDAx",
             "unique_id": "5",
             "restrictions": [
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "list",
                     "condition": "^",
                     "english": "method starts with list"
                   },
                   {
                     "fieldname": "method",
                     "value": "get",
                     "condition": "^",
                     "english": "method starts with get"
                   },
                   {
                     "fieldname": "method",
                     "value": "summary",
                     "condition": "=",
                     "english": "method equal to summary"
                   },
                   {
                     "fieldname": "method",
                     "value": "pay",
                     "condition": "=",
                     "english": "method equal to pay"
                   },
                   {
                     "fieldname": "method",
                     "value": "xpay",
                     "condition": "=",
                     "english": "method equal to xpay"
                   }
                 ],
                 "english": "method starts with list OR method starts with get OR method equal to summary OR method equal to pay OR method equal to xpay"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "listdatastore",
                     "condition": "/",
                     "english": "method unequal to listdatastore"
                   }
                 ],
                 "english": "method unequal to listdatastore"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "pay",
                     "condition": "/",
                     "english": "method unequal to pay"
                   },
                   {
                     "fieldname": "per",
                     "value": "1day",
                     "condition": "=",
                     "english": "per equal to 1day"
                   }
                 ],
                 "english": "method unequal to pay OR per equal to 1day"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "pay",
                     "condition": "/",
                     "english": "method unequal to pay"
                   },
                   {
                     "fieldname": "pnameamount_msat",
                     "value": "100000001",
                     "condition": "<",
                     "english": "pnameamount_msat < 100000001"
                   }
                 ],
                 "english": "method unequal to pay OR pnameamount_msat < 100000001"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "xpay",
                     "condition": "/",
                     "english": "method unequal to xpay"
                   },
                   {
                     "fieldname": "per",
                     "value": "1day",
                     "condition": "=",

okay so let's do a vibe check on what you're literally staring at πŸ’… every single entry in this array is one rune, and each one is serving full receipts about itself:

  • rune β€” the actual base64 string, like "zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA==". this is the thing itself, the string you'd hand out. πŸŽ€
  • last_used β€” a timestamp, and in this sample they're all 1738000000.
  • unique_id β€” the little index string counting up: "0", "1", "2", "3", "4", "5".
  • restrictions β€” an array. each element is one restriction, holding an alternatives array, and each alternative is a cute little object with fieldname, value, condition, and english. the restriction also has its own english line that stitches its alternatives together with OR.
  • restrictions_as_english β€” the whole rune's restrictions flattened into one readable sentence, joined with AND. iykyk 😌

and the conditions you can spot in here, with the manpage literally spelling them out for you in the english field:

  • ^ β†’ starts with (see "id starts with 0266e4598d1d3c415f57")
  • = β†’ equal to (see "method equal to listpeers")
  • < β†’ less than (see "pnameamountmsat < 10000" and "pnameamount_msat < 100000001")
  • / β†’ unequal to (see "method unequal to listdatastore")

the empty one is a whole mood: "unique_id": "0" has "restrictions": [] and "restrictions_as_english": "" β€” that's a rune with no restrictions, just out here living free πŸ¦‹

also spot the placeholder energy in "unique_id": "3" and "4": the value field says nodeid010101010101010101010101010101010101010101010101010101010101 while the english field spells out the real 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518. not me squinting at that 😭

and notice how "restrictions_as_english" is just one long line of AND … AND … AND … OR … with no parentheses anywhere β€” "id equal to … AND method equal to listpeers AND pnum equal to 1 AND pnameid equal to … OR parr0 equal to …". read it slowly, bestie, the OR is doing a lot of heavy lifting at the end there πŸ’€

and "unique_id": "5" is the main character of this whole dump fr β€” five alternatives in one restriction, then unequal to listdatastore, then the pay/per/pnameamount_msat pairings, then xpay… the way it just keeps going 🌈

the JSON is still flowing though β€” we're mid-object right now, so hold that thought πŸ’œ

                     "english": "per equal to 1day"
                   }
                 ],
                 "english": "method unequal to xpay OR per equal to 1day"
               },
               {
                 "alternatives": [
                   {
                     "fieldname": "method",
                     "value": "xpay",
                     "condition": "/",
                     "english": "method unequal to xpay"
                   },
                   {
                     "fieldname": "pnameamount_msat",
                     "value": "100000001",
                     "condition": "<",
                     "english": "pnameamount_msat < 100000001"
                   }
                 ],
                 "english": "method unequal to xpay OR pnameamount_msat < 100000001"
               }
             ],
             "restrictions_as_english": "method starts with list OR method starts with get OR method equal to summary OR method equal to pay OR method equal to xpay AND method unequal to listdatastore AND method unequal to pay OR per equal to 1day AND method unequal to pay OR pnameamount_msat < 100000001 AND method unequal to xpay OR per equal to 1day AND method unequal to xpay OR pnameamount_msat < 100000001"
           }
         ]
       }

okay so that's the tail end of the output bestie 🫢 and like… the way that restrictions_as_english key literally spills the entire restriction stack out as one long readable sentence? it's giving "i contain multitudes" ✨ and the rest of those nested alternatives blocks with their fieldname / value / condition / english little quartet are all just chilling there, fully spelled out, one per clause 🌸 not me counting closing braces to make sure the nesting lines up πŸ’€ slay, she balanced.


and that's a wrap on the whole page, no cap πŸ’… pretty iconic of you to read all three parts, honestly.

this one's stamped Core Lightning v26.06.9, page LIGHTNING-SHOWRUNES(7) 🌈 β€” go forth and rune responsibly, babe πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from