mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-26 01:46:23 +02:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user