LIGHTNING-COMMANDO(7)
π LIGHTNING-COMMANDO(7) π
okay bestie, welcome to lightning-commando(7) β yes the whole page has a manual name and everything, and honestly? she earned it. π
β¨ NAME β¨
commando β literally the Command to Send a Command to a Remote Peer. a command inside a command, it's giving inception but make it lightning π₯
β¨ SYNOPSIS β¨
commando peer_id method [params] [rune] [filter]
β¨ DESCRIPTION β¨
so the commando RPC command is a homage to bad 80s movies (no i'm not joking, that's canon π). it sends a directly-connected peer_id a custom message containing a request to run method β with an optional dictionary of params. and here's the tea: generally the peer will only let you run a command if it has provided you with a rune which allows it. no rune, no vibes. π«Ά
peer_id(pubkey) β the peer you're commanding. yes, command them. main character energy πmethod(string) β the method to invoke on that peerparams(one of, optional) β pick one of these:- (array) β an array of positional parameters
- (object) β parameters for
method.
rune(string, optional) β the rune to authorize the command πfilter(object, optional) β filter to peer to apply to any successful result.
β¨ RETURN VALUE β¨
on success, the return depends on the method you invoked. no cap, it's genuinely just "whatever that method gives you" β the commando wrapper isn't gatekeeping the results π
β¨ ERRORS β¨
on failure, one of these error codes may be returned:
-32600β usually means peer is not connected π19535β the local commando plugin discovered an error19536β the remote commando plugin discovered an error19537β the remote commando plugin said we weren't authorized π
also it can fail if the peer does not respond β in which case it will simply hang awaiting a response. like, just sit there. forever. staring. π so maybe keep that in mind before you fire one off into the void.
β¨ AUTHOR β¨
Rusty Russell rusty@rustcorp.com.au wrote the original Python commando.py plugin, the in-tree commando plugin, and this manual page. legend behavior, honestly π«‘
Christian Decker came up with the name "commando" β which almost excuses his previous adoption of the name "Eltoo". almost. π (we love you christian)
β¨ SEE ALSO β¨
lightning-commando-rune(7) β go read it, it's the rune lore β¨
β¨ RESOURCES β¨
main web site: https://github.com/ElementsProject/lightning β go be nosy, it's fine πΈ
β¨ EXAMPLES β¨
Example 1: π«
request:
$ lightning-cli commando -k "peer_id"="nodeid020202020202020202020202020202020202020202020202020202020202" "rune"="zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA==" "method"="newaddr" "params"='{"addresstype": "p2tr"}'
{
"id": "example:commando#1",
"method": "commando",
"params": {
"peer_id": "nodeid020202020202020202020202020202020202020202020202020202020202",
"rune": "zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA==",
"method": "newaddr",
"params": {
"addresstype": "p2tr"
}
}
}
response:
{
"p2tr": "bcrt1p338x07070707070707070707070707070707070707070707070707070707"
}
Example 2: π¦
request:
$ lightning-cli commando -k "peer_id"="nodeid020202020202020202020202020202020202020202020202020202020202" "rune"="RXgu0DD_i0wSPEZkIDyZIWL0bSAGdhvJ_GHOQdTg04A9MSZpZF4wMjY2ZTQ1OThkMWQzYzQxNWY1NyZtZXRob2Q9bGlzdHBlZXJz" "method"="listpeers" "params"='["nodeid030303030303030303030303030303030303030303030303030303030303"]'
{
"id": "example:commando#2",
"method": "commando",
"params": {
"peer_id": "nodeid020202020202020202020202020202020202020202020202020202020202",
"rune": "RXgu0DD_i0wSPEZkIDyZIWL0bSAGdhvJ_GHOQdTg04A9MSZpZF4wMjY2ZTQ1OThkMWQzYzQxNWY1NyZtZXRob2Q9bGlzdHBlZXJz",
"method": "listpeers",
"params": [
"nodeid030303030303030303030303030303030303030303030303030303030303"
]
}
}
response:
{
"peers": [
{
"id": "nodeid030303030303030303030303030303030303030303030303030303030303",
"connected": true,
"num_channels": 2,
"netaddr": [
"127.0.0.1:19736"
],
"features": "0898882a8a59a1"
}
]
}
Example 3: π
request:
$ lightning-cli commando -k "peer_id"="nodeid020202020202020202020202020202020202020202020202020202020202" "rune"="QUJEYMLGgiaJvMDv_MhR2hiMKIBTbq-PrL-KxcIlirQ9MiZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==" "method"="pay" "params"='{"bolt11": "lnbcrt100n1pnt2bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000", "amount_msat": 9900}'
{
"id": "example:commando#3",
"method": "commando",
"params": {
"peer_id": "nodeid020202020202020202020202020202020202020202020202020202020202",
"rune": "QUJEYMLGgiaJvMDv_MhR2hiMKIBTbq-PrL-KxcIlirQ9MiZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==",
"method": "pay",
"params": {
"bolt11": "lnbcrt100n1pnt2bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000",
"amount_msat": 9900
}
}
}
response:
{
"destination": "nodeid020202020202020202020202020202020202020202020202020202020202",
"payment_hash": "paymenthashcmdpycp10cp10cp10cp10cp10cp10cp10cp10cp10cp10cp10cp10",
"created_at": 1738000000,
"parts": 1,
"amount_msat": 9900,
"amount_sent_msat": 9900,
"payment_preimage": "paymentpreimagec010101010101010101010101010101010101010101010101",
"status": "complete"
}
and that's the whole page bestie, you ate it up π this lil doc is from Core Lightning v26.06.9 β go forth and command your peers responsibly πβ¨π
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms