![]() |
![]()
| ![]() |
![]()
NAMElightning-commando -- Command to Send a Command to a Remote Peer SYNOPSIScommando peer_id method [params] [rune] [filter] DESCRIPTIONThe commando RPC command is a homage to bad 80s movies. It also sends a directly-connected peer_id a custom message, containing a request to run method (with an optional dictionary of params); generally the peer will only allow you to run a command if it has provided you with a rune which allows it.
RETURN VALUEOn success, the return depends on the method invoked. ERRORSOn failure, one of the following error codes may be returned:
It can also fail if the peer does not respond, in which case it will simply hang awaiting a response. AUTHORRusty Russell <rusty@rustcorp.com.au> wrote the original Python commando.py plugin, the in-tree commando plugin, and this manual page. Christian Decker came up with the name "commando", which almost excuses his previous adoption of the name "Eltoo". SEE ALSOlightning-commando-rune(7) RESOURCESMain web site: https://github.com/ElementsProject/lightning EXAMPLESExample 1: Request: $ lightning-cli commando -k "peer_id"="nodeid020202020202020202020202020202020202020202020202020202020202" "rune"="zFMd1fjhrAYxUeFA54TjloZqOt8JrA_i_nYwIgXkag49MA==" "method"="newaddr" "params"='{"addresstype": "p2tr"}' { Response: { Example 2: Request: $ lightning-cli commando -k "peer_id"="nodeid020202020202020202020202020202020202020202020202020202020202" "rune"="RXgu0DD_i0wSPEZkIDyZIWL0bSAGdhvJ_GHOQdTg04A9MSZpZF4wMjY2ZTQ1OThkMWQzYzQxNWY1NyZtZXRob2Q9bGlzdHBlZXJz" "method"="listpeers" "params"='["nodeid030303030303030303030303030303030303030303030303030303030303"]' { Response: { Example 3: Request: $ lightning-cli commando -k "peer_id"="nodeid020202020202020202020202020202020202020202020202020202020202" "rune"="QUJEYMLGgiaJvMDv_MhR2hiMKIBTbq-PrL-KxcIlirQ9MiZtZXRob2Q9cGF5JnBuYW1lYW1vdW50bXNhdDwxMDAwMA==" "method"="pay" "params"='{"bolt11": "lnbcrt100n1pnt2bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000bolt11invl020300000000", "amount_msat": 9900}' { Response: {
|