Add nostr nip-05 registration with lnd invoices #1
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,7 @@ package lnd
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
b64 "encoding/base64"
|
b64 "encoding/base64"
|
||||||
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -36,13 +37,14 @@ func Request(rKey string, request []byte) (string, error) {
|
||||||
}
|
}
|
||||||
info, err := lndCli.AddInvoice(ctx, &lnrpc.Invoice{
|
info, err := lndCli.AddInvoice(ctx, &lnrpc.Invoice{
|
||||||
Memo: fmt.Sprintf("nostr addr %s", rKey),
|
Memo: fmt.Sprintf("nostr addr %s", rKey),
|
||||||
Expiry: 15 * 60,
|
Expiry: 1 * 60,
|
||||||
Value: addrFee,
|
Value: addrFee,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
l.Fatal().Msg("unable to create lnd invoice")
|
l.Fatal().Msg("unable to create lnd invoice")
|
||||||
}
|
}
|
||||||
spew.Dump(info)
|
spew.Dump(hex.EncodeToString(info.RHash))
|
||||||
|
spew.Dump(info.PaymentRequest)
|
||||||
spew.Dump(request)
|
spew.Dump(request)
|
||||||
return "x", nil
|
return "x", nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue