multi: add IsBlinded to lnrpc.Invoice for nicer UX
The BlindedPathConfig struct is nice for invoice creation but when we use the Invoice message for viewing an invoice, it would be nicer to see an "is_blinded" field.
This commit is contained in:
9 files changed
+1226
-1175
No files matched your search
@@ -607,9 +607,13 @@
|
||||
"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]:"
|
||||
},
|
||||
"is_blinded": {
|
||||
"type": "boolean",
|
||||
"description": "Signals that the invoice should include blinded paths to hide the true\nidentity of the recipient."
|
||||
},
|
||||
"blinded_path_config": {
|
||||
"$ref": "#/definitions/lnrpcBlindedPathConfig",
|
||||
"description": "Signals that the invoice should include blinded paths to hide the true\nidentity of the recipient."
|
||||
"description": "Config values to use when creating blinded paths for this invoice. These\ncan be used to override the defaults config values provided in by the\nglobal config. This field is only used if is_blinded is true."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -176,6 +176,7 @@ func CreateRPCInvoice(invoice *invoices.Invoice,
|
||||
IsKeysend: invoice.IsKeysend(),
|
||||
PaymentAddr: invoice.Terms.PaymentAddr[:],
|
||||
IsAmp: invoice.IsAMP(),
|
||||
IsBlinded: invoice.IsBlinded(),
|
||||
}
|
||||
|
||||
rpcInvoice.AmpInvoiceState = make(map[string]*lnrpc.AMPInvoiceState)
|
||||
|
||||
+1175
-1162
File diff suppressed because it is too large.
Load diff
@@ -3843,7 +3843,14 @@ message Invoice {
|
||||
Signals that the invoice should include blinded paths to hide the true
|
||||
identity of the recipient.
|
||||
*/
|
||||
BlindedPathConfig blinded_path_config = 29;
|
||||
bool is_blinded = 29;
|
||||
|
||||
/*
|
||||
Config values to use when creating blinded paths for this invoice. These
|
||||
can be used to override the defaults config values provided in by the
|
||||
global config. This field is only used if is_blinded is true.
|
||||
*/
|
||||
BlindedPathConfig blinded_path_config = 30;
|
||||
}
|
||||
|
||||
message BlindedPathConfig {
|
||||
|
||||
@@ -5519,9 +5519,13 @@
|
||||
"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]:"
|
||||
},
|
||||
"is_blinded": {
|
||||
"type": "boolean",
|
||||
"description": "Signals that the invoice should include blinded paths to hide the true\nidentity of the recipient."
|
||||
},
|
||||
"blinded_path_config": {
|
||||
"$ref": "#/definitions/lnrpcBlindedPathConfig",
|
||||
"description": "Signals that the invoice should include blinded paths to hide the true\nidentity of the recipient."
|
||||
"description": "Config values to use when creating blinded paths for this invoice. These\ncan be used to override the defaults config values provided in by the\nglobal config. This field is only used if is_blinded is true."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user