"title":"Command to Send a Command to a Remote Peer",
"description":[
"The **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."
],
"request":{
"required":[
"peer_id",
"method"
],
"properties":{
"peer_id":{
"type":"pubkey",
"description":[
"Peer to command."
]
},
"method":{
"type":"string",
"description":[
"Method to invoke on peer."
]
},
"params":{
"oneOf":[
{
"type":"array",
"description":[
"Array of positional parameters."
]
},
{
"type":"object",
"description":[
"Parameters for method."
]
}
]
},
"rune":{
"type":"string",
"description":[
"Rune to authorize the command."
]
},
"filter":{
"type":"object",
"description":[
"Filter to peer to apply to any successful result."
]
}
}
},
"response":{
"required":[],
"properties":{},
"pre_return_value_notes":[
"On success, the return depends on the *method* invoked."
]
},
"errors":[
"On failure, one of the following error codes may be returned:",
"",
"- -32600: Usually means peer is not connected",
"- 19535: the local commando plugin discovered an error.",
"- 19536: the remote commando plugin discovered an error.",
"- 19537: the remote commando plugin said we weren't authorized.",
"",
"It can also fail if the peer does not respond, in which case it will simply hang awaiting a response."