multi: let blinded path invoice options be set per addinvoice call

Extend the configurability of blinded paths in invoices by adding the
ability to change the global config options on a per-RPC basis.
This commit is contained in:
Elle Mouton committed 2024-08-07 17:02:55 +02:00
1 parent ca91e17115
commit 3de6c5415a
7 files changed
+2101 -1821

No files matched your search

+22 -2
View File
@@ -395,6 +395,26 @@
}
}
},
"lnrpcBlindedPathConfig": {
"type": "object",
"properties": {
"min_num_real_hops": {
"type": "integer",
"format": "int64",
"description": "The minimum number of real hops to include in a blinded path. This doesn't\ninclude our node, so if the minimum is 1, then the path will contain at\nminimum our node along with an introduction node hop. If it is zero then\nthe shortest path will use our node as an introduction node."
},
"num_hops": {
"type": "integer",
"format": "int64",
"description": "The number of hops to include in a blinded path. This doesn't include our\nnode, so if it is 1, then the path will contain our node along with an\nintroduction node or dummy node hop. If paths shorter than NumHops is\nfound, then they will be padded using dummy hops."
},
"max_num_paths": {
"type": "integer",
"format": "int64",
"description": "The maximum number of blinded paths to select and add to an invoice."
}
}
},
"lnrpcFeature": {
"type": "object",
"properties": {
@@ -579,8 +599,8 @@
"description": "Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the\ngiven set ID. This field is always populated for AMP invoices, and can be\nused along side LookupInvoice to obtain the HTLC information related to a\ngiven sub-invoice.\nNote: Output only, don't specify for creating an invoice.",
"title": "[EXPERIMENTAL]:"
},
"blind": {
"type": "boolean",
"blinded_path_config": {
"$ref": "#/definitions/lnrpcBlindedPathConfig",
"description": "Signals that the invoice should include blinded paths to hide the true\nidentity of the recipient."
}
}
+1854 -1752
View File
File diff suppressed because it is too large. Load diff
+24 -1
View File
@@ -3843,7 +3843,30 @@ message Invoice {
Signals that the invoice should include blinded paths to hide the true
identity of the recipient.
*/
bool blind = 29;
BlindedPathConfig blinded_path_config = 29;
}
message BlindedPathConfig {
/*
The minimum number of real hops to include in a blinded path. This doesn't
include our node, so if the minimum is 1, then the path will contain at
minimum our node along with an introduction node hop. If it is zero then
the shortest path will use our node as an introduction node.
*/
optional uint32 min_num_real_hops = 1;
/*
The number of hops to include in a blinded path. This doesn't include our
node, so if it is 1, then the path will contain our node along with an
introduction node or dummy node hop. If paths shorter than NumHops is
found, then they will be padded using dummy hops.
*/
optional uint32 num_hops = 2;
/*
The maximum number of blinded paths to select and add to an invoice.
*/
optional uint32 max_num_paths = 3;
}
enum InvoiceHTLCState {
+22 -2
View File
@@ -3544,6 +3544,26 @@
}
}
},
"lnrpcBlindedPathConfig": {
"type": "object",
"properties": {
"min_num_real_hops": {
"type": "integer",
"format": "int64",
"description": "The minimum number of real hops to include in a blinded path. This doesn't\ninclude our node, so if the minimum is 1, then the path will contain at\nminimum our node along with an introduction node hop. If it is zero then\nthe shortest path will use our node as an introduction node."
},
"num_hops": {
"type": "integer",
"format": "int64",
"description": "The number of hops to include in a blinded path. This doesn't include our\nnode, so if it is 1, then the path will contain our node along with an\nintroduction node or dummy node hop. If paths shorter than NumHops is\nfound, then they will be padded using dummy hops."
},
"max_num_paths": {
"type": "integer",
"format": "int64",
"description": "The maximum number of blinded paths to select and add to an invoice."
}
}
},
"lnrpcBlindedPaymentPath": {
"type": "object",
"properties": {
@@ -5491,8 +5511,8 @@
"description": "Maps a 32-byte hex-encoded set ID to the sub-invoice AMP state for the\ngiven set ID. This field is always populated for AMP invoices, and can be\nused along side LookupInvoice to obtain the HTLC information related to a\ngiven sub-invoice.\nNote: Output only, don't specify for creating an invoice.",
"title": "[EXPERIMENTAL]:"
},
"blind": {
"type": "boolean",
"blinded_path_config": {
"$ref": "#/definitions/lnrpcBlindedPathConfig",
"description": "Signals that the invoice should include blinded paths to hide the true\nidentity of the recipient."
}
}