forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
peers.proto
94 lines (74 loc) · 2.45 KB
/
peers.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
syntax = "proto3";
import "lightning.proto";
package peersrpc;
option go_package = "github.com/lightningnetwork/lnd/lnrpc/peersrpc";
// Peers is a service that can be used to get information and interact
// with the other nodes of the network.
service Peers {
/* lncli: peers updatenodeannouncement
UpdateNodeAnnouncement allows the caller to update the node parameters
and broadcasts a new version of the node announcement to its peers.
*/
rpc UpdateNodeAnnouncement (NodeAnnouncementUpdateRequest)
returns (NodeAnnouncementUpdateResponse);
}
// UpdateAction is used to determine the kind of action we are referring to.
enum UpdateAction {
// ADD indicates this is an "insertion" kind of action.
ADD = 0;
// REMOVE indicates this is a "deletion" kind of action.
REMOVE = 1;
}
enum FeatureSet {
/*
SET_INIT identifies features that should be sent in an Init message to
a remote peer.
*/
SET_INIT = 0;
/*
SET_LEGACY_GLOBAL identifies features that should be set in the legacy
GlobalFeatures field of an Init message, which maintains backwards
compatibility with nodes that haven't implemented flat features.
*/
SET_LEGACY_GLOBAL = 1;
/*
SET_NODE_ANN identifies features that should be advertised on node
announcements.
*/
SET_NODE_ANN = 2;
/*
SET_INVOICE identifies features that should be advertised on invoices
generated by the daemon.
*/
SET_INVOICE = 3;
/*
SET_INVOICE_AMP identifies the features that should be advertised on
AMP invoices generated by the daemon.
*/
SET_INVOICE_AMP = 4;
}
message UpdateAddressAction {
// Determines the kind of action.
UpdateAction action = 1;
// The address used to apply the update action.
string address = 2;
}
message UpdateFeatureAction {
// Determines the kind of action.
UpdateAction action = 1;
// The feature bit used to apply the update action.
lnrpc.FeatureBit feature_bit = 2;
}
message NodeAnnouncementUpdateRequest {
// Set of changes for the features that the node supports.
repeated UpdateFeatureAction feature_updates = 1;
// Color is the node's color in hex code format.
string color = 2;
// Alias or nick name of the node.
string alias = 3;
// Set of changes for the node's known addresses.
repeated UpdateAddressAction address_updates = 4;
}
message NodeAnnouncementUpdateResponse {
repeated lnrpc.Op ops = 1;
}