mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 08:55:59 +01:00
lnrpc: include payment addr in main Invoice proto
With this change ListInvoices will return the payment addr, and the response to AddInvoice will as well.
This commit is contained in:
parent
d996607470
commit
43fc84919e
6 changed files with 829 additions and 773 deletions
|
@ -427,6 +427,11 @@
|
|||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Indicates if this invoice was a spontaneous payment that arrived via keysend\n[EXPERIMENTAL]."
|
||||
},
|
||||
"payment_addr": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The payment address of this invoice. This value will be used in MPP\npayments, and also for newer invoies that always require the MPP paylaod\nfor added end-to-end security."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -148,6 +148,7 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
|
|||
Htlcs: rpcHtlcs,
|
||||
Features: CreateRPCFeatures(invoice.Terms.Features),
|
||||
IsKeysend: len(invoice.PaymentRequest) == 0,
|
||||
PaymentAddr: invoice.Terms.PaymentAddr[:],
|
||||
}
|
||||
|
||||
if preimage != nil {
|
||||
|
|
1571
lnrpc/rpc.pb.go
1571
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load diff
|
@ -2897,6 +2897,13 @@ message Invoice {
|
|||
[EXPERIMENTAL].
|
||||
*/
|
||||
bool is_keysend = 25;
|
||||
|
||||
/*
|
||||
The payment address of this invoice. This value will be used in MPP
|
||||
payments, and also for newer invoies that always require the MPP paylaod
|
||||
for added end-to-end security.
|
||||
*/
|
||||
bytes payment_addr = 26;
|
||||
}
|
||||
|
||||
enum InvoiceHTLCState {
|
||||
|
@ -2955,6 +2962,13 @@ message AddInvoiceResponse {
|
|||
invoices with an add_index greater than this one.
|
||||
*/
|
||||
uint64 add_index = 16;
|
||||
|
||||
/*
|
||||
The payment address of the generated invoice. This value should be used
|
||||
in all payments for this invoice as we require it for end to end
|
||||
security.
|
||||
*/
|
||||
bytes payment_addr = 17;
|
||||
}
|
||||
message PaymentHash {
|
||||
/*
|
||||
|
|
|
@ -2461,6 +2461,11 @@
|
|||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "The \"add\" index of this invoice. Each newly created invoice will increment\nthis index making it monotonically increasing. Callers to the\nSubscribeInvoices call can use this to instantly get notified of all added\ninvoices with an add_index greater than this one."
|
||||
},
|
||||
"payment_addr": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4083,6 +4088,11 @@
|
|||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Indicates if this invoice was a spontaneous payment that arrived via keysend\n[EXPERIMENTAL]."
|
||||
},
|
||||
"payment_addr": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The payment address of this invoice. This value will be used in MPP\npayments, and also for newer invoies that always require the MPP paylaod\nfor added end-to-end security."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4766,6 +4766,7 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
|
|||
AddIndex: dbInvoice.AddIndex,
|
||||
PaymentRequest: string(dbInvoice.PaymentRequest),
|
||||
RHash: hash[:],
|
||||
PaymentAddr: dbInvoice.Terms.PaymentAddr[:],
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue