* more scaffolding code from delphi.market * we now read environment from .env * we now try to init db and lnd but in a non-blocking way * we now set "render context" to have access to environment during template render * frontend can now read commit from HTML attribute
23 lines
388 B
Go
23 lines
388 B
Go
package lightning
|
|
|
|
import (
|
|
"github.com/lightninglabs/lndclient"
|
|
)
|
|
|
|
type LNDClient struct {
|
|
*lndclient.GrpcLndServices
|
|
}
|
|
|
|
type LNDConfig = lndclient.LndServicesConfig
|
|
|
|
func New(config *LNDConfig) (*LNDClient, error) {
|
|
rcpLndServices, err := lndclient.NewLndServices(config)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
lnd := &LNDClient{GrpcLndServices: rcpLndServices}
|
|
|
|
return lnd, nil
|
|
}
|