Skip to content

Commit 3288490

Browse files
committed
lnrpc: Clarify payment_addr and payment_secret
Fix #7438, adding clarification statements in lnrpc proto files. Originally proposed by daredevil3435 in PR #7873 and PR #7885.
1 parent 4855faf commit 3288490

File tree

9 files changed

+47
-31
lines changed

9 files changed

+47
-31
lines changed

lnrpc/invoicesrpc/invoices.pb.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lnrpc/invoicesrpc/invoices.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ message AddHoldInvoiceResp {
138138
uint64 add_index = 2;
139139

140140
/*
141-
The payment address of the generated invoice. This value should be used
142-
in all payments for this invoice as we require it for end to end
141+
The payment address of the generated invoice. This is also called
142+
the payment secret in specifications (e.g. BOLT 11). This value should
143+
be used in all payments for this invoice as we require it for end to end
143144
security.
144145
*/
145146
bytes payment_addr = 3;

lnrpc/invoicesrpc/invoices.swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@
300300
"payment_addr": {
301301
"type": "string",
302302
"format": "byte",
303-
"description": "The payment address of the generated invoice. This value should be used\nin all payments for this invoice as we require it for end to end\nsecurity."
303+
"description": "The payment address of the generated invoice. This is also called\nthe payment secret in specifications (e.g. BOLT 11). This value should\nbe used in all payments for this invoice as we require it for end to end\nsecurity."
304304
}
305305
}
306306
},
@@ -565,7 +565,7 @@
565565
"payment_addr": {
566566
"type": "string",
567567
"format": "byte",
568-
"description": "The payment address of this invoice. This value will be used in MPP\npayments, and also for newer invoices that always require the MPP payload\nfor added end-to-end security.\nNote: Output only, don't specify for creating an invoice."
568+
"description": "The payment address of this invoice. This is also called payment secret in\nspecifications (e.g. BOLT 11). This value will be used in MPP payments, and\nalso for newer invoices that always require the MPP payload for added\nend-to-end security.\nNote: Output only, don't specify for creating an invoice."
569569
},
570570
"is_amp": {
571571
"type": "boolean",

lnrpc/lightning.pb.go

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lnrpc/lightning.proto

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,8 @@ message SendRequest {
884884
repeated FeatureBit dest_features = 15;
885885

886886
/*
887-
The payment address of the generated invoice.
887+
The payment address of the generated invoice. This is also called
888+
payment secret in specifications (e.g. BOLT 11).
888889
*/
889890
bytes payment_addr = 16;
890891
}
@@ -3197,7 +3198,8 @@ message MPPRecord {
31973198
A unique, random identifier used to authenticate the sender as the intended
31983199
payer of a multi-path payment. The payment_addr must be the same for all
31993200
subpayments, and match the payment_addr provided in the receiver's invoice.
3200-
The same payment_addr must be used on all subpayments.
3201+
The same payment_addr must be used on all subpayments. This is also called
3202+
payment secret in specifications (e.g. BOLT 11).
32013203
*/
32023204
bytes payment_addr = 11;
32033205

@@ -3776,9 +3778,10 @@ message Invoice {
37763778
bool is_keysend = 25;
37773779

37783780
/*
3779-
The payment address of this invoice. This value will be used in MPP
3780-
payments, and also for newer invoices that always require the MPP payload
3781-
for added end-to-end security.
3781+
The payment address of this invoice. This is also called payment secret in
3782+
specifications (e.g. BOLT 11). This value will be used in MPP payments, and
3783+
also for newer invoices that always require the MPP payload for added
3784+
end-to-end security.
37823785
Note: Output only, don't specify for creating an invoice.
37833786
*/
37843787
bytes payment_addr = 26;
@@ -3883,9 +3886,9 @@ message AddInvoiceResponse {
38833886
uint64 add_index = 16;
38843887

38853888
/*
3886-
The payment address of the generated invoice. This value should be used
3887-
in all payments for this invoice as we require it for end to end
3888-
security.
3889+
The payment address of the generated invoice. This is also called
3890+
payment secret in specifications (e.g. BOLT 11). This value should be used
3891+
in all payments for this invoice as we require it for end to end security.
38893892
*/
38903893
bytes payment_addr = 17;
38913894
}

lnrpc/lightning.swagger.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,7 @@
32503250
"payment_addr": {
32513251
"type": "string",
32523252
"format": "byte",
3253-
"description": "The payment address of the generated invoice. This value should be used\nin all payments for this invoice as we require it for end to end\nsecurity."
3253+
"description": "The payment address of the generated invoice. This is also called\npayment secret in specifications (e.g. BOLT 11). This value should be used\nin all payments for this invoice as we require it for end to end security."
32543254
}
32553255
}
32563256
},
@@ -5407,7 +5407,7 @@
54075407
"payment_addr": {
54085408
"type": "string",
54095409
"format": "byte",
5410-
"description": "The payment address of this invoice. This value will be used in MPP\npayments, and also for newer invoices that always require the MPP payload\nfor added end-to-end security.\nNote: Output only, don't specify for creating an invoice."
5410+
"description": "The payment address of this invoice. This is also called payment secret in\nspecifications (e.g. BOLT 11). This value will be used in MPP payments, and\nalso for newer invoices that always require the MPP payload for added\nend-to-end security.\nNote: Output only, don't specify for creating an invoice."
54115411
},
54125412
"is_amp": {
54135413
"type": "boolean",
@@ -5715,7 +5715,7 @@
57155715
"payment_addr": {
57165716
"type": "string",
57175717
"format": "byte",
5718-
"description": "A unique, random identifier used to authenticate the sender as the intended\npayer of a multi-path payment. The payment_addr must be the same for all\nsubpayments, and match the payment_addr provided in the receiver's invoice.\nThe same payment_addr must be used on all subpayments."
5718+
"description": "A unique, random identifier used to authenticate the sender as the intended\npayer of a multi-path payment. The payment_addr must be the same for all\nsubpayments, and match the payment_addr provided in the receiver's invoice.\nThe same payment_addr must be used on all subpayments. This is also called\npayment secret in specifications (e.g. BOLT 11)."
57195719
},
57205720
"total_amt_msat": {
57215721
"type": "string",
@@ -7052,7 +7052,7 @@
70527052
"payment_addr": {
70537053
"type": "string",
70547054
"format": "byte",
7055-
"description": "The payment address of the generated invoice."
7055+
"description": "The payment address of the generated invoice. This is also called\npayment secret in specifications (e.g. BOLT 11)."
70567056
}
70577057
}
70587058
},

lnrpc/routerrpc/router.pb.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lnrpc/routerrpc/router.proto

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,10 @@ message SendPaymentRequest {
306306
*/
307307
repeated uint64 outgoing_chan_ids = 19;
308308

309-
// An optional payment addr to be included within the last hop of the route.
309+
/*
310+
An optional payment addr to be included within the last hop of the route.
311+
This is also called payment secret in specifications (e.g. BOLT 11).
312+
*/
310313
bytes payment_addr = 20;
311314

312315
/*
@@ -659,7 +662,10 @@ message BuildRouteRequest {
659662
*/
660663
repeated bytes hop_pubkeys = 4;
661664

662-
// An optional payment addr to be included within the last hop of the route.
665+
/*
666+
An optional payment addr to be included within the last hop of the route.
667+
This is also called payment secret in specifications (e.g. BOLT 11).
668+
*/
663669
bytes payment_addr = 5;
664670
}
665671

lnrpc/routerrpc/router.swagger.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@
927927
"payment_addr": {
928928
"type": "string",
929929
"format": "byte",
930-
"description": "A unique, random identifier used to authenticate the sender as the intended\npayer of a multi-path payment. The payment_addr must be the same for all\nsubpayments, and match the payment_addr provided in the receiver's invoice.\nThe same payment_addr must be used on all subpayments."
930+
"description": "A unique, random identifier used to authenticate the sender as the intended\npayer of a multi-path payment. The payment_addr must be the same for all\nsubpayments, and match the payment_addr provided in the receiver's invoice.\nThe same payment_addr must be used on all subpayments. This is also called\npayment secret in specifications (e.g. BOLT 11)."
931931
},
932932
"total_amt_msat": {
933933
"type": "string",
@@ -1173,7 +1173,7 @@
11731173
"payment_addr": {
11741174
"type": "string",
11751175
"format": "byte",
1176-
"description": "An optional payment addr to be included within the last hop of the route."
1176+
"description": "An optional payment addr to be included within the last hop of the route.\nThis is also called payment secret in specifications (e.g. BOLT 11)."
11771177
}
11781178
}
11791179
},
@@ -1774,7 +1774,7 @@
17741774
"payment_addr": {
17751775
"type": "string",
17761776
"format": "byte",
1777-
"description": "An optional payment addr to be included within the last hop of the route."
1777+
"description": "An optional payment addr to be included within the last hop of the route.\nThis is also called payment secret in specifications (e.g. BOLT 11)."
17781778
},
17791779
"max_shard_size_msat": {
17801780
"type": "string",

0 commit comments

Comments
 (0)