-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathlndkrpc.proto
More file actions
168 lines (144 loc) · 3.99 KB
/
lndkrpc.proto
File metadata and controls
168 lines (144 loc) · 3.99 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
syntax = "proto3";
package lndkrpc;
import "external/google/rpc/error_details.proto";
service Offers {
rpc PayOffer (PayOfferRequest) returns (PayOfferResponse);
rpc PayHumanReadableAddress (PayHumanReadableAddressRequest) returns (PayOfferResponse);
rpc GetInvoice (GetInvoiceRequest) returns (GetInvoiceResponse);
rpc DecodeInvoice (DecodeInvoiceRequest) returns (Bolt12InvoiceContents);
rpc PayInvoice (PayInvoiceRequest) returns (PayInvoiceResponse);
rpc CreateOffer (CreateOfferRequest) returns (CreateOfferResponse);
}
message PayOfferRequest {
string offer = 1;
optional uint64 amount = 2;
optional string payer_note = 3;
optional uint32 response_invoice_timeout = 4;
optional uint32 fee_limit = 5;
optional uint32 fee_limit_percent = 6;
}
message PayHumanReadableAddressRequest {
string name = 1;
optional uint64 amount = 2;
optional string payer_note = 3;
optional uint32 response_invoice_timeout = 4;
optional uint32 fee_limit = 5;
optional uint32 fee_limit_percent = 6;
}
message PayOfferResponse {
string payment_preimage = 2;
}
message GetInvoiceRequest {
string offer = 1;
optional uint64 amount = 2;
optional string payer_note = 3;
optional uint32 response_invoice_timeout = 4;
}
message DecodeInvoiceRequest {
string invoice = 1;
}
message GetInvoiceResponse {
string invoice_hex_str = 1;
Bolt12InvoiceContents invoice_contents = 2;
}
message PayInvoiceRequest {
string invoice = 1;
optional uint64 amount = 2;
optional uint32 fee_limit = 3;
optional uint32 fee_limit_percent = 4;
}
message PayInvoiceResponse {
string payment_preimage = 1;
}
message Bolt12InvoiceContents {
string chain = 1;
optional uint64 quantity = 2;
uint64 amount_msats = 3;
optional string description = 4;
PaymentHash payment_hash = 5;
repeated PaymentPaths payment_paths = 6;
int64 created_at = 7;
uint64 relative_expiry = 8;
PublicKey node_id = 9;
string signature = 10;
repeated FeatureBit features = 11;
optional string payer_note = 12;
}
message PaymentHash {
bytes hash = 1;
}
message PublicKey {
bytes key = 1;
}
message BlindedPayInfo {
uint32 fee_base_msat = 1;
uint32 fee_proportional_millionths = 2;
uint32 cltv_expiry_delta = 3;
uint64 htlc_minimum_msat = 4;
uint64 htlc_maximum_msat = 5;
repeated FeatureBit features = 6;
}
message BlindedHop {
PublicKey blinded_node_id = 1;
bytes encrypted_payload = 2;
}
message BlindedPath {
IntroductionNode introduction_node = 1;
PublicKey blinding_point = 2;
repeated BlindedHop blinded_hops = 3;
}
message PaymentPaths {
BlindedPayInfo blinded_pay_info = 1;
BlindedPath blinded_path = 2;
}
message IntroductionNode {
optional PublicKey node_id = 1;
optional DirectedShortChannelId directed_short_channel_id = 2;
}
message DirectedShortChannelId {
Direction direction = 1;
uint64 scid = 2;
}
enum Direction {
NODE_ONE = 0;
NODE_TWO = 1;
}
enum FeatureBit {
DATALOSS_PROTECT_REQ = 0;
DATALOSS_PROTECT_OPT = 1;
INITIAL_ROUING_SYNC = 3;
UPFRONT_SHUTDOWN_SCRIPT_REQ = 4;
UPFRONT_SHUTDOWN_SCRIPT_OPT = 5;
GOSSIP_QUERIES_REQ = 6;
GOSSIP_QUERIES_OPT = 7;
TLV_ONION_REQ = 8;
TLV_ONION_OPT = 9;
EXT_GOSSIP_QUERIES_REQ = 10;
EXT_GOSSIP_QUERIES_OPT = 11;
STATIC_REMOTE_KEY_REQ = 12;
STATIC_REMOTE_KEY_OPT = 13;
PAYMENT_ADDR_REQ = 14;
PAYMENT_ADDR_OPT = 15;
MPP_REQ = 16;
MPP_OPT = 17;
WUMBO_CHANNELS_REQ = 18;
WUMBO_CHANNELS_OPT = 19;
ANCHORS_REQ = 20;
ANCHORS_OPT = 21;
ANCHORS_ZERO_FEE_HTLC_REQ = 22;
ANCHORS_ZERO_FEE_HTLC_OPT = 23;
ROUTE_BLINDING_REQUIRED = 24;
ROUTE_BLINDING_OPTIONAL = 25;
AMP_REQ = 30;
AMP_OPT = 31;
}
message CreateOfferRequest {
optional uint64 amount = 1;
optional string description = 2;
optional string issuer = 3;
optional uint64 quantity = 4;
optional uint64 expiry = 5;
}
message CreateOfferResponse {
string offer = 1;
}