1
1
mirror of https://github.com/bumi/lntip synced 2026-02-25 01:50:51 +00:00

add private routing hints for invoices

This commit is contained in:
ziggie
2023-01-23 10:08:26 +01:00
parent c6dc9308c3
commit 23a134b28e
2 changed files with 5 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ type LNDclient struct {
}
// AddInvoice generates an invoice with the given price and memo.
func (c LNDclient) AddInvoice(value int64, memo string, descriptionHash []byte) (Invoice, error) {
func (c LNDclient) AddInvoice(value int64, memo string, descriptionHash []byte, private bool) (Invoice, error) {
result := Invoice{}
stdOutLogger.Printf("Adding invoice: memo=%s value=%v", memo, value)
@@ -55,6 +55,7 @@ func (c LNDclient) AddInvoice(value int64, memo string, descriptionHash []byte)
Memo: memo,
DescriptionHash: descriptionHash,
Value: value,
Private: private,
}
res, err := c.lndClient.AddInvoice(c.ctx, &invoice)
if err != nil {