github.com/decred/dcrlnd@v0.7.6/lnrpc/autopilotrpc/autopilot.proto (about) 1 syntax = "proto3"; 2 3 package autopilotrpc; 4 5 option go_package = "github.com/decred/dcrlnd/lnrpc/autopilotrpc"; 6 7 // Autopilot is a service that can be used to get information about the current 8 // state of the daemon's autopilot agent, and also supply it with information 9 // that can be used when deciding where to open channels. 10 service Autopilot { 11 /* 12 Status returns whether the daemon's autopilot agent is active. 13 */ 14 rpc Status (StatusRequest) returns (StatusResponse); 15 16 /* 17 ModifyStatus is used to modify the status of the autopilot agent, like 18 enabling or disabling it. 19 */ 20 rpc ModifyStatus (ModifyStatusRequest) returns (ModifyStatusResponse); 21 22 /* 23 QueryScores queries all available autopilot heuristics, in addition to any 24 active combination of these heruristics, for the scores they would give to 25 the given nodes. 26 */ 27 rpc QueryScores (QueryScoresRequest) returns (QueryScoresResponse); 28 29 /* 30 SetScores attempts to set the scores used by the running autopilot agent, 31 if the external scoring heuristic is enabled. 32 */ 33 rpc SetScores (SetScoresRequest) returns (SetScoresResponse); 34 } 35 36 message StatusRequest { 37 } 38 39 message StatusResponse { 40 // Indicates whether the autopilot is active or not. 41 bool active = 1; 42 } 43 44 message ModifyStatusRequest { 45 // Whether the autopilot agent should be enabled or not. 46 bool enable = 1; 47 } 48 49 message ModifyStatusResponse { 50 } 51 52 message QueryScoresRequest { 53 repeated string pubkeys = 1; 54 55 // If set, we will ignore the local channel state when calculating scores. 56 bool ignore_local_state = 2; 57 } 58 59 message QueryScoresResponse { 60 message HeuristicResult { 61 string heuristic = 1; 62 map<string, double> scores = 2; 63 } 64 65 repeated HeuristicResult results = 1; 66 } 67 68 message SetScoresRequest { 69 // The name of the heuristic to provide scores to. 70 string heuristic = 1; 71 72 /* 73 A map from hex-encoded public keys to scores. Scores must be in the range 74 [0.0, 1.0]. 75 */ 76 map<string, double> scores = 2; 77 } 78 79 message SetScoresResponse { 80 }