mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-01-06 06:26:15 +01:00
Setup lnd grpc client
This commit is contained in:
11
main.go
11
main.go
@@ -2,6 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/bumi/lndhub.go/lib/grpc"
|
||||
"github.com/bumi/lndhub.go/lnd"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -93,6 +95,15 @@ func main() {
|
||||
logrus.Fatalf("failed to run migrations: %v", err)
|
||||
}
|
||||
|
||||
lndClient, err := lnd.NewLNDclient(lnd.LNDoptions{
|
||||
Address: "",
|
||||
CertFile: "",
|
||||
CertHex: "",
|
||||
MacaroonFile: "",
|
||||
MacaroonHex: "",
|
||||
})
|
||||
e.Use(grpc.LNDClient(&lndClient))
|
||||
|
||||
e.Use(middleware.Logger())
|
||||
e.Use(middleware.Recover())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user