mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-20 02:27:21 +01:00
a654be5884
Adds a new lnrpc API that lets the caller get ("dry run") the scores that would be given to a set of node by the available autopilot heuristics.
57 lines
1.6 KiB
Protocol Buffer
57 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package autopilotrpc;
|
|
|
|
option go_package = "github.com/lightningnetwork/lnd/lnrpc/autopilotrpc";
|
|
|
|
// Autopilot is a service that can be used to get information about the current
|
|
// state of the daemon's autopilot agent, and also supply it with information
|
|
// that can be used when deciding where to open channels.
|
|
service Autopilot {
|
|
/**
|
|
Status returns whether the daemon's autopilot agent is active.
|
|
*/
|
|
rpc Status(StatusRequest) returns (StatusResponse);
|
|
|
|
/**
|
|
ModifyStatus is used to modify the status of the autopilot agent, like
|
|
enabling or disabling it.
|
|
*/
|
|
rpc ModifyStatus(ModifyStatusRequest) returns (ModifyStatusResponse);
|
|
|
|
/**
|
|
QueryScores queries all available autopilot heuristics, in addition to any
|
|
active combination of these heruristics, for the scores they would give to
|
|
the given nodes.
|
|
*/
|
|
rpc QueryScores(QueryScoresRequest) returns (QueryScoresResponse);
|
|
}
|
|
|
|
message StatusRequest{
|
|
}
|
|
|
|
message StatusResponse{
|
|
/// Indicates whether the autopilot is active or not.
|
|
bool active = 1 [json_name = "active"];
|
|
}
|
|
|
|
message ModifyStatusRequest{
|
|
/// Whether the autopilot agent should be enabled or not.
|
|
bool enable = 1 [json_name = "enable"];
|
|
}
|
|
|
|
message ModifyStatusResponse {}
|
|
|
|
message QueryScoresRequest{
|
|
repeated string pubkeys = 1 [json_name = "pubkeys"];
|
|
}
|
|
|
|
message QueryScoresResponse {
|
|
message HeuristicResult {
|
|
string heuristic = 1 [json_name = "heuristic"];
|
|
map<string, double> scores= 2 [json_name = "scores"];
|
|
}
|
|
|
|
repeated HeuristicResult results = 1 [json_name = "results"];
|
|
}
|