wtclientrpc: format wtclient.proto and remove json_name fields
We now use the jsonpb marshaler to convert the RPC responses to JSON in lncli and REST. The jsonpb has a setting to use the original name as defined in the proto file and the explicit json_name definition is not necessary any more. The jsonpb setting is called OrigName and needs to be true.
This commit is contained in:
parent
ad0fba548f
commit
3a5348ea8b
@ -189,7 +189,7 @@ type GetTowerInfoRequest struct {
|
||||
// The identifying public key of the watchtower to retrieve information for.
|
||||
Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
|
||||
// Whether we should include sessions with the watchtower in the response.
|
||||
IncludeSessions bool `protobuf:"varint,2,opt,name=include_sessions,proto3" json:"include_sessions,omitempty"`
|
||||
IncludeSessions bool `protobuf:"varint,2,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -238,17 +238,17 @@ type TowerSession struct {
|
||||
//
|
||||
//The total number of successful backups that have been made to the
|
||||
//watchtower session.
|
||||
NumBackups uint32 `protobuf:"varint,1,opt,name=num_backups,proto3" json:"num_backups,omitempty"`
|
||||
NumBackups uint32 `protobuf:"varint,1,opt,name=num_backups,json=numBackups,proto3" json:"num_backups,omitempty"`
|
||||
//
|
||||
//The total number of backups in the session that are currently pending to be
|
||||
//acknowledged by the watchtower.
|
||||
NumPendingBackups uint32 `protobuf:"varint,2,opt,name=num_pending_backups,proto3" json:"num_pending_backups,omitempty"`
|
||||
NumPendingBackups uint32 `protobuf:"varint,2,opt,name=num_pending_backups,json=numPendingBackups,proto3" json:"num_pending_backups,omitempty"`
|
||||
// The maximum number of backups allowed by the watchtower session.
|
||||
MaxBackups uint32 `protobuf:"varint,3,opt,name=max_backups,proto3" json:"max_backups,omitempty"`
|
||||
MaxBackups uint32 `protobuf:"varint,3,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups,omitempty"`
|
||||
//
|
||||
//The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
//the justice transaction in the event of a channel breach.
|
||||
SweepSatPerByte uint32 `protobuf:"varint,4,opt,name=sweep_sat_per_byte,proto3" json:"sweep_sat_per_byte,omitempty"`
|
||||
SweepSatPerByte uint32 `protobuf:"varint,4,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -313,9 +313,9 @@ type Tower struct {
|
||||
// The list of addresses the watchtower is reachable over.
|
||||
Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
|
||||
// Whether the watchtower is currently a candidate for new sessions.
|
||||
ActiveSessionCandidate bool `protobuf:"varint,3,opt,name=active_session_candidate,proto3" json:"active_session_candidate,omitempty"`
|
||||
ActiveSessionCandidate bool `protobuf:"varint,3,opt,name=active_session_candidate,json=activeSessionCandidate,proto3" json:"active_session_candidate,omitempty"`
|
||||
// The number of sessions that have been negotiated with the watchtower.
|
||||
NumSessions uint32 `protobuf:"varint,4,opt,name=num_sessions,proto3" json:"num_sessions,omitempty"`
|
||||
NumSessions uint32 `protobuf:"varint,4,opt,name=num_sessions,json=numSessions,proto3" json:"num_sessions,omitempty"`
|
||||
// The list of sessions that have been negotiated with the watchtower.
|
||||
Sessions []*TowerSession `protobuf:"bytes,5,rep,name=sessions,proto3" json:"sessions,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@ -385,7 +385,7 @@ func (m *Tower) GetSessions() []*TowerSession {
|
||||
|
||||
type ListTowersRequest struct {
|
||||
// Whether we should include sessions with the watchtower in the response.
|
||||
IncludeSessions bool `protobuf:"varint,1,opt,name=include_sessions,proto3" json:"include_sessions,omitempty"`
|
||||
IncludeSessions bool `protobuf:"varint,1,opt,name=include_sessions,json=includeSessions,proto3" json:"include_sessions,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -498,19 +498,19 @@ type StatsResponse struct {
|
||||
//
|
||||
//The total number of backups made to all active and exhausted watchtower
|
||||
//sessions.
|
||||
NumBackups uint32 `protobuf:"varint,1,opt,name=num_backups,proto3" json:"num_backups,omitempty"`
|
||||
NumBackups uint32 `protobuf:"varint,1,opt,name=num_backups,json=numBackups,proto3" json:"num_backups,omitempty"`
|
||||
//
|
||||
//The total number of backups that are pending to be acknowledged by all
|
||||
//active and exhausted watchtower sessions.
|
||||
NumPendingBackups uint32 `protobuf:"varint,2,opt,name=num_pending_backups,proto3" json:"num_pending_backups,omitempty"`
|
||||
NumPendingBackups uint32 `protobuf:"varint,2,opt,name=num_pending_backups,json=numPendingBackups,proto3" json:"num_pending_backups,omitempty"`
|
||||
//
|
||||
//The total number of backups that all active and exhausted watchtower
|
||||
//sessions have failed to acknowledge.
|
||||
NumFailedBackups uint32 `protobuf:"varint,3,opt,name=num_failed_backups,proto3" json:"num_failed_backups,omitempty"`
|
||||
NumFailedBackups uint32 `protobuf:"varint,3,opt,name=num_failed_backups,json=numFailedBackups,proto3" json:"num_failed_backups,omitempty"`
|
||||
// The total number of new sessions made to watchtowers.
|
||||
NumSessionsAcquired uint32 `protobuf:"varint,4,opt,name=num_sessions_acquired,proto3" json:"num_sessions_acquired,omitempty"`
|
||||
NumSessionsAcquired uint32 `protobuf:"varint,4,opt,name=num_sessions_acquired,json=numSessionsAcquired,proto3" json:"num_sessions_acquired,omitempty"`
|
||||
// The total number of watchtower sessions that have been exhausted.
|
||||
NumSessionsExhausted uint32 `protobuf:"varint,5,opt,name=num_sessions_exhausted,proto3" json:"num_sessions_exhausted,omitempty"`
|
||||
NumSessionsExhausted uint32 `protobuf:"varint,5,opt,name=num_sessions_exhausted,json=numSessionsExhausted,proto3" json:"num_sessions_exhausted,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -611,11 +611,11 @@ type PolicyResponse struct {
|
||||
//
|
||||
//The maximum number of updates each session we negotiate with watchtowers
|
||||
//should allow.
|
||||
MaxUpdates uint32 `protobuf:"varint,1,opt,name=max_updates,proto3" json:"max_updates,omitempty"`
|
||||
MaxUpdates uint32 `protobuf:"varint,1,opt,name=max_updates,json=maxUpdates,proto3" json:"max_updates,omitempty"`
|
||||
//
|
||||
//The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
//justice transactions in response to channel breaches.
|
||||
SweepSatPerByte uint32 `protobuf:"varint,2,opt,name=sweep_sat_per_byte,proto3" json:"sweep_sat_per_byte,omitempty"`
|
||||
SweepSatPerByte uint32 `protobuf:"varint,2,opt,name=sweep_sat_per_byte,json=sweepSatPerByte,proto3" json:"sweep_sat_per_byte,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -679,47 +679,50 @@ func init() {
|
||||
func init() { proto.RegisterFile("wtclientrpc/wtclient.proto", fileDescriptor_b5f4e7d95a641af2) }
|
||||
|
||||
var fileDescriptor_b5f4e7d95a641af2 = []byte{
|
||||
// 634 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcb, 0x6e, 0xd3, 0x40,
|
||||
0x14, 0x95, 0x13, 0x12, 0xd2, 0x9b, 0xf4, 0xc1, 0xad, 0x5a, 0x19, 0x53, 0x68, 0xe4, 0x55, 0xd4,
|
||||
0x45, 0x02, 0x2d, 0xb0, 0x60, 0x01, 0x94, 0x22, 0x2a, 0x24, 0x90, 0x2a, 0x17, 0x09, 0xc1, 0xc6,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0x74, 0x5e,
|
||||
0xb7, 0x54, 0x08, 0x9f, 0xc2, 0x76, 0x7a, 0x8c, 0x08, 0xf3, 0x29, 0x9b, 0x96, 0xca, 0x96, 0x54,
|
||||
0xd6, 0x51, 0xa9, 0xe7, 0xdc, 0xb9, 0x29, 0x95, 0xed, 0xcc, 0x53, 0x81, 0x70, 0x0c, 0xc8, 0x17,
|
||||
0x84, 0x44, 0x36, 0x77, 0x84, 0x1d, 0x91, 0xd8, 0x76, 0x6f, 0x05, 0xd1, 0xef, 0x49, 0x61, 0x0d,
|
||||
0x63, 0xfe, 0xd6, 0xa0, 0x23, 0xcb, 0x6e, 0x6c, 0xc2, 0x1e, 0xac, 0xe5, 0x5d, 0x25, 0x69, 0x6d,
|
||||
0xed, 0xd1, 0x9a, 0xb5, 0x04, 0xf0, 0x15, 0xe8, 0x8e, 0x27, 0xe8, 0x75, 0xd9, 0x09, 0xdb, 0x73,
|
||||
0x98, 0x4f, 0x7d, 0x47, 0x10, 0x59, 0x5e, 0xcf, 0x6a, 0xe4, 0xd1, 0x84, 0x41, 0xfa, 0x23, 0xcb,
|
||||
0xd6, 0x66, 0x55, 0x56, 0x30, 0x7c, 0x01, 0xbd, 0x92, 0xef, 0x0c, 0xdb, 0xa3, 0xfe, 0xe1, 0xc3,
|
||||
0xb1, 0x92, 0xc4, 0xb1, 0xda, 0x72, 0xab, 0x94, 0x9a, 0x6f, 0xe0, 0xc1, 0x27, 0xca, 0xb3, 0x49,
|
||||
0xf3, 0x62, 0xcc, 0x75, 0xe3, 0xd4, 0x1a, 0xc6, 0xf9, 0x16, 0x50, 0x35, 0xc8, 0xf2, 0x83, 0x07,
|
||||
0xd0, 0x15, 0x12, 0xd1, 0x35, 0x59, 0x0b, 0xae, 0xd6, 0x62, 0xe5, 0x0a, 0x73, 0x03, 0x06, 0xe7,
|
||||
0xc2, 0x11, 0xc5, 0xed, 0xe6, 0x8f, 0x16, 0xac, 0xe7, 0x40, 0xee, 0xf6, 0x3f, 0x12,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b1, 0xaa, 0xaa, 0xc4, 0xc1, 0x78,
|
||||
0x54, 0xcb, 0x65, 0x16, 0xef, 0x8e, 0xbe, 0x3f, 0x9b, 0x52, 0x31, 0x4b, 0xdc, 0xb1, 0x17, 0xce,
|
||||
0x27, 0x01, 0x9d, 0xce, 0x04, 0xa3, 0x6c, 0xca, 0x88, 0x58, 0x84, 0xf1, 0xe5, 0x24, 0x60, 0xfe,
|
||||
0x24, 0x60, 0xea, 0xcb, 0x15, 0x47, 0x9e, 0xdb, 0x95, 0xaf, 0xd7, 0xd1, 0x9f, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xdd, 0x33, 0x97, 0x54, 0xdb, 0x06, 0x00, 0x00,
|
||||
// 682 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0x95, 0x1b, 0x12, 0xd2, 0x49, 0xda, 0xa4, 0x1b, 0x5a, 0x19, 0x53, 0x48, 0xf0, 0x29, 0x7c,
|
||||
0x28, 0x11, 0x2d, 0x48, 0x9c, 0x2a, 0xda, 0x42, 0x2b, 0x24, 0x90, 0x22, 0x17, 0x04, 0xe2, 0x80,
|
||||
0xb5, 0xb1, 0xb7, 0x89, 0x55, 0x7b, 0xed, 0x7a, 0xd7, 0x4d, 0xf2, 0xa3, 0xf8, 0x19, 0xfc, 0x00,
|
||||
0xfe, 0x0d, 0x47, 0xe4, 0xf5, 0xda, 0xb1, 0x1b, 0x47, 0x1c, 0xe0, 0x16, 0xcf, 0x7b, 0xfb, 0x3c,
|
||||
0x7e, 0xf3, 0x32, 0x0b, 0xda, 0x8c, 0x5b, 0xae, 0x43, 0x28, 0x0f, 0x03, 0x6b, 0x98, 0xfe, 0x1e,
|
||||
0x04, 0xa1, 0xcf, 0x7d, 0xd4, 0xc8, 0x61, 0xfa, 0x29, 0xb4, 0x8e, 0x6d, 0xfb, 0x93, 0x3f, 0x23,
|
||||
0xa1, 0x41, 0xae, 0x23, 0xc2, 0x38, 0xda, 0x83, 0x5a, 0x10, 0x8d, 0xaf, 0xc8, 0x42, 0x55, 0x7a,
|
||||
0x4a, 0xbf, 0x69, 0xc8, 0x27, 0xa4, 0xc2, 0x5d, 0x6c, 0xdb, 0x21, 0x61, 0x4c, 0xdd, 0xe8, 0x29,
|
||||
0xfd, 0x4d, 0x23, 0x7d, 0xd4, 0x11, 0xb4, 0x97, 0x22, 0x2c, 0xf0, 0x29, 0x23, 0xfa, 0x19, 0x20,
|
||||
0x83, 0x78, 0xfe, 0x0d, 0xf9, 0x47, 0xed, 0x5d, 0xe8, 0x14, 0x74, 0xa4, 0xfc, 0x57, 0xe8, 0x9c,
|
||||
0x13, 0x2e, 0x6a, 0xef, 0xe9, 0xa5, 0xff, 0x37, 0xfd, 0x27, 0xd0, 0x76, 0xa8, 0xe5, 0x46, 0x36,
|
||||
0x31, 0x19, 0x61, 0xcc, 0xf1, 0x69, 0xf2, 0xa2, 0xba, 0xd1, 0x92, 0xf5, 0x0b, 0x59, 0xd6, 0x7f,
|
||||
0x28, 0xd0, 0x14, 0xba, 0xb2, 0x82, 0xba, 0xd0, 0xa0, 0x91, 0x67, 0x8e, 0xb1, 0x75, 0x15, 0x05,
|
||||
0x4c, 0x08, 0x6f, 0x19, 0x40, 0x23, 0xef, 0x24, 0xa9, 0xa0, 0x01, 0x74, 0x62, 0x42, 0x40, 0xa8,
|
||||
0xed, 0xd0, 0x49, 0x46, 0xdc, 0x10, 0xc4, 0x1d, 0x1a, 0x79, 0xa3, 0x04, 0x49, 0xf9, 0x5d, 0x68,
|
||||
0x78, 0x78, 0x9e, 0xf1, 0x2a, 0x89, 0xa0, 0x87, 0xe7, 0x29, 0xe1, 0x19, 0x20, 0x36, 0x23, 0x24,
|
||||
0x30, 0x19, 0xe6, 0x66, 0x40, 0x42, 0x73, 0xbc, 0xe0, 0x44, 0xbd, 0x23, 0x78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2d, 0xa7, 0xd0, 0xc9, 0x4d, 0xe1,
|
||||
0x58, 0x42, 0xe8, 0x25, 0xec, 0x15, 0xce, 0x90, 0xf9, 0x14, 0x47, 0x8c, 0x13, 0x5b, 0xad, 0x8a,
|
||||
0x43, 0xf7, 0x72, 0x87, 0xde, 0xa5, 0x98, 0xde, 0x82, 0xad, 0x91, 0xef, 0x3a, 0xd6, 0x22, 0xf5,
|
||||
0xe2, 0x3b, 0x6c, 0xa7, 0x85, 0xa5, 0x17, 0x71, 0xa2, 0xa3, 0x20, 0xce, 0x45, 0xe6, 0x85, 0x87,
|
||||
0xe7, 0x9f, 0x93, 0xca, 0x9a, 0x44, 0x6f, 0x94, 0x26, 0xfa, 0xe0, 0x67, 0x05, 0xda, 0x5f, 0x30,
|
||||
0xb7, 0xa6, 0x62, 0x16, 0xa7, 0x62, 0x42, 0xe8, 0x1c, 0xea, 0xe9, 0x8e, 0x41, 0xfb, 0x85, 0xc1,
|
||||
0xdd, 0xda, 0x5f, 0xda, 0xc3, 0x35, 0xa8, 0xec, 0x75, 0x04, 0x8d, 0xdc, 0x42, 0x41, 0xdd, 0x02,
|
||||
0x7b, 0x75, 0x65, 0x69, 0xbd, 0xf5, 0x04, 0xa9, 0xf8, 0x11, 0x60, 0x99, 0x36, 0xf4, 0xa8, 0xc0,
|
||||
0x5f, 0x89, 0xb1, 0xd6, 0x5d, 0x8b, 0x4b, 0xb9, 0xb7, 0xd0, 0xcc, 0xaf, 0x36, 0x54, 0x6c, 0xa0,
|
||||
0x64, 0xeb, 0x69, 0x25, 0x41, 0x46, 0x47, 0x50, 0x15, 0x79, 0x45, 0xc5, 0x3f, 0x5c, 0x3e, 0xd4,
|
||||
0x9a, 0x56, 0x06, 0xc9, 0x2e, 0x8e, 0xa1, 0x96, 0x0c, 0x19, 0x15, 0x59, 0x85, 0x28, 0x68, 0x0f,
|
||||
0x4a, 0xb1, 0x44, 0xe2, 0xe4, 0xf0, 0xdb, 0x8b, 0x89, 0xc3, 0xa7, 0xd1, 0x78, 0x60, 0xf9, 0xde,
|
||||
0xd0, 0x75, 0x26, 0x53, 0x4e, 0x1d, 0x3a, 0xa1, 0x84, 0xcf, 0xfc, 0xf0, 0x6a, 0xe8, 0x52, 0x7b,
|
||||
0xe8, 0xd2, 0xfc, 0x05, 0x15, 0x06, 0xd6, 0xb8, 0x26, 0x2e, 0xa9, 0xc3, 0x3f, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0x5d, 0xba, 0x03, 0x17, 0xc2, 0x06, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
|
@ -6,10 +6,10 @@ option go_package = "github.com/lightningnetwork/lnd/lnrpc/wtclientrpc";
|
||||
|
||||
message AddTowerRequest {
|
||||
// The identifying public key of the watchtower to add.
|
||||
bytes pubkey = 1 [json_name = "pubkey"];
|
||||
bytes pubkey = 1;
|
||||
|
||||
// A network address the watchtower is reachable over.
|
||||
string address = 2 [json_name = "address"];
|
||||
string address = 2;
|
||||
}
|
||||
|
||||
message AddTowerResponse {
|
||||
@ -17,14 +17,14 @@ message AddTowerResponse {
|
||||
|
||||
message RemoveTowerRequest {
|
||||
// The identifying public key of the watchtower to remove.
|
||||
bytes pubkey = 1 [json_name = "pubkey"];
|
||||
bytes pubkey = 1;
|
||||
|
||||
/*
|
||||
If set, then the record for this address will be removed, indicating that is
|
||||
is stale. Otherwise, the watchtower will no longer be used for future
|
||||
session negotiations and backups.
|
||||
*/
|
||||
string address = 2 [json_name = "address"];
|
||||
string address = 2;
|
||||
}
|
||||
|
||||
message RemoveTowerResponse {
|
||||
@ -32,10 +32,10 @@ message RemoveTowerResponse {
|
||||
|
||||
message GetTowerInfoRequest {
|
||||
// The identifying public key of the watchtower to retrieve information for.
|
||||
bytes pubkey = 1 [json_name = "pubkey"];
|
||||
bytes pubkey = 1;
|
||||
|
||||
// Whether we should include sessions with the watchtower in the response.
|
||||
bool include_sessions = 2 [json_name = "include_sessions"];
|
||||
bool include_sessions = 2;
|
||||
}
|
||||
|
||||
message TowerSession {
|
||||
@ -43,49 +43,49 @@ message TowerSession {
|
||||
The total number of successful backups that have been made to the
|
||||
watchtower session.
|
||||
*/
|
||||
uint32 num_backups = 1 [json_name = "num_backups"];
|
||||
uint32 num_backups = 1;
|
||||
|
||||
/*
|
||||
The total number of backups in the session that are currently pending to be
|
||||
acknowledged by the watchtower.
|
||||
*/
|
||||
uint32 num_pending_backups = 2 [json_name = "num_pending_backups"];
|
||||
uint32 num_pending_backups = 2;
|
||||
|
||||
// The maximum number of backups allowed by the watchtower session.
|
||||
uint32 max_backups = 3 [json_name = "max_backups"];
|
||||
uint32 max_backups = 3;
|
||||
|
||||
/*
|
||||
The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
the justice transaction in the event of a channel breach.
|
||||
*/
|
||||
uint32 sweep_sat_per_byte = 4 [json_name = "sweep_sat_per_byte"];
|
||||
uint32 sweep_sat_per_byte = 4;
|
||||
}
|
||||
|
||||
message Tower {
|
||||
// The identifying public key of the watchtower.
|
||||
bytes pubkey = 1 [json_name = "pubkey"];
|
||||
bytes pubkey = 1;
|
||||
|
||||
// The list of addresses the watchtower is reachable over.
|
||||
repeated string addresses = 2 [json_name = "addresses"];
|
||||
repeated string addresses = 2;
|
||||
|
||||
// Whether the watchtower is currently a candidate for new sessions.
|
||||
bool active_session_candidate = 3 [json_name = "active_session_candidate"];
|
||||
bool active_session_candidate = 3;
|
||||
|
||||
// The number of sessions that have been negotiated with the watchtower.
|
||||
uint32 num_sessions = 4 [json_name = "num_sessions"];
|
||||
uint32 num_sessions = 4;
|
||||
|
||||
// The list of sessions that have been negotiated with the watchtower.
|
||||
repeated TowerSession sessions = 5 [json_name = "sessions"];
|
||||
repeated TowerSession sessions = 5;
|
||||
}
|
||||
|
||||
message ListTowersRequest {
|
||||
// Whether we should include sessions with the watchtower in the response.
|
||||
bool include_sessions = 1 [json_name = "include_sessions"];
|
||||
bool include_sessions = 1;
|
||||
}
|
||||
|
||||
message ListTowersResponse {
|
||||
// The list of watchtowers available for new backups.
|
||||
repeated Tower towers = 1 [json_name = "towers"];
|
||||
repeated Tower towers = 1;
|
||||
}
|
||||
|
||||
message StatsRequest {
|
||||
@ -96,25 +96,25 @@ message StatsResponse {
|
||||
The total number of backups made to all active and exhausted watchtower
|
||||
sessions.
|
||||
*/
|
||||
uint32 num_backups = 1 [json_name = "num_backups"];
|
||||
uint32 num_backups = 1;
|
||||
|
||||
/*
|
||||
The total number of backups that are pending to be acknowledged by all
|
||||
active and exhausted watchtower sessions.
|
||||
*/
|
||||
uint32 num_pending_backups = 2 [json_name = "num_pending_backups"];
|
||||
uint32 num_pending_backups = 2;
|
||||
|
||||
/*
|
||||
The total number of backups that all active and exhausted watchtower
|
||||
sessions have failed to acknowledge.
|
||||
*/
|
||||
uint32 num_failed_backups = 3 [json_name = "num_failed_backups"];
|
||||
uint32 num_failed_backups = 3;
|
||||
|
||||
// The total number of new sessions made to watchtowers.
|
||||
uint32 num_sessions_acquired = 4 [json_name = "num_sessions_acquired"];
|
||||
uint32 num_sessions_acquired = 4;
|
||||
|
||||
// The total number of watchtower sessions that have been exhausted.
|
||||
uint32 num_sessions_exhausted = 5 [json_name = "num_sessions_exhausted"];
|
||||
uint32 num_sessions_exhausted = 5;
|
||||
}
|
||||
|
||||
message PolicyRequest {
|
||||
@ -125,13 +125,13 @@ message PolicyResponse {
|
||||
The maximum number of updates each session we negotiate with watchtowers
|
||||
should allow.
|
||||
*/
|
||||
uint32 max_updates = 1 [json_name = "max_updates"];
|
||||
uint32 max_updates = 1;
|
||||
|
||||
/*
|
||||
The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
justice transactions in response to channel breaches.
|
||||
*/
|
||||
uint32 sweep_sat_per_byte = 2 [json_name = "sweep_sat_per_byte"];
|
||||
uint32 sweep_sat_per_byte = 2;
|
||||
}
|
||||
|
||||
service WatchtowerClient {
|
||||
@ -141,7 +141,7 @@ service WatchtowerClient {
|
||||
any new addresses included will be considered when dialing it for
|
||||
session negotiations and backups.
|
||||
*/
|
||||
rpc AddTower(AddTowerRequest) returns (AddTowerResponse);
|
||||
rpc AddTower (AddTowerRequest) returns (AddTowerResponse);
|
||||
|
||||
/*
|
||||
RemoveTower removes a watchtower from being considered for future session
|
||||
@ -149,17 +149,17 @@ service WatchtowerClient {
|
||||
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);
|
||||
rpc RemoveTower (RemoveTowerRequest) returns (RemoveTowerResponse);
|
||||
|
||||
// ListTowers returns the list of watchtowers registered with the client.
|
||||
rpc ListTowers(ListTowersRequest) returns (ListTowersResponse);
|
||||
rpc ListTowers (ListTowersRequest) returns (ListTowersResponse);
|
||||
|
||||
// GetTowerInfo retrieves information for a registered watchtower.
|
||||
rpc GetTowerInfo(GetTowerInfoRequest) returns (Tower);
|
||||
rpc GetTowerInfo (GetTowerInfoRequest) returns (Tower);
|
||||
|
||||
// Stats returns the in-memory statistics of the client since startup.
|
||||
rpc Stats(StatsRequest) returns (StatsResponse);
|
||||
rpc Stats (StatsRequest) returns (StatsResponse);
|
||||
|
||||
// Policy returns the active watchtower client policy configuration.
|
||||
rpc Policy(PolicyRequest) returns (PolicyResponse);
|
||||
rpc Policy (PolicyRequest) returns (PolicyResponse);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user