lnrpc: unify proto style by moving services to top of file

This commit is contained in:
Oliver Gugger committed 2020-05-08 14:33:04 +02:00
1 parent acd105fccb
commit 0800386138
7 files changed
+315 -300

No files matched your search

+32 -30
View File
@@ -4,6 +4,38 @@ package wtclientrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/wtclientrpc";
// WatchtowerClient is a service that grants access to the watchtower client
// functionality of the daemon.
service WatchtowerClient {
/*
AddTower adds a new watchtower reachable at the given address and
considers it for new sessions. If the watchtower already exists, then
any new addresses included will be considered when dialing it for
session negotiations and backups.
*/
rpc AddTower (AddTowerRequest) returns (AddTowerResponse);
/*
RemoveTower removes a watchtower from being considered for future session
negotiations and from being used for any subsequent backups until it's added
again. If an address is provided, then this RPC only serves as a way of
removing the address from the watchtower instead.
*/
rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse);
// ListTowers returns the list of watchtowers registered with the client.
rpc ListTowers (ListTowersRequest) returns (ListTowersResponse);
// GetTowerInfo retrieves information for a registered watchtower.
rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower);
// Stats returns the in-memory statistics of the client since startup.
rpc Stats (StatsRequest) returns (StatsResponse);
// Policy returns the active watchtower client policy configuration.
rpc Policy (PolicyRequest) returns (PolicyResponse);
}
message AddTowerRequest {
// The identifying public key of the watchtower to add.
bytes pubkey = 1;
@@ -133,33 +165,3 @@ message PolicyResponse {
*/
uint32 sweep_sat_per_byte = 2;
}
service WatchtowerClient {
/*
AddTower adds a new watchtower reachable at the given address and
considers it for new sessions. If the watchtower already exists, then
any new addresses included will be considered when dialing it for
session negotiations and backups.
*/
rpc AddTower (AddTowerRequest) returns (AddTowerResponse);
/*
RemoveTower removes a watchtower from being considered for future session
negotiations and from being used for any subsequent backups until it's added
again. If an address is provided, then this RPC only serves as a way of
removing the address from the watchtower instead.
*/
rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse);
// ListTowers returns the list of watchtowers registered with the client.
rpc ListTowers (ListTowersRequest) returns (ListTowersResponse);
// GetTowerInfo retrieves information for a registered watchtower.
rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower);
// Stats returns the in-memory statistics of the client since startup.
rpc Stats (StatsRequest) returns (StatsResponse);
// Policy returns the active watchtower client policy configuration.
rpc Policy (PolicyRequest) returns (PolicyResponse);
}