Skip to content

Rename project to lightning-terminal and binary to litd #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
app/build
app/coverage
app/node_modules
shushtar-debug
litd-debug
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ https.key
# local environment vars to ignore
.env*.local

shushtar-debug
/shushtar-*
litd-debug
/lightning-terminal-*

# go code generated by statik
/statik/statik.go
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.13-alpine as builder

# Copy in the local repository to build from.
COPY . /go/src/github.com/lightninglabs/shushtar
COPY . /go/src/github.com/lightninglabs/lightning-terminal

# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
# queries required to connect to linked containers succeed.
Expand All @@ -12,7 +12,7 @@ ENV GO111MODULE on

ENV NODE_VERSION=v12.17.0

# Install dependencies and install/build shushtar.
# Install dependencies and install/build lightning-terminal.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
Expand All @@ -27,7 +27,7 @@ RUN apk add --no-cache --update alpine-sdk \
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
&& /bin/bash \
&& . ~/.bashrc \
&& cd /go/src/github.com/lightninglabs/shushtar \
&& cd /go/src/github.com/lightninglabs/lightning-terminal \
&& make install \
&& go install -v -trimpath github.com/lightningnetwork/lnd/cmd/lncli \
&& go install -v -trimpath github.com/lightninglabs/faraday/cmd/frcli \
Expand All @@ -39,11 +39,11 @@ FROM alpine as final
# Define a root volume for data persistence.
VOLUME /root/.lnd

# Expose shushtar and lnd ports (server, rpc).
# Expose lightning-terminal and lnd ports (server, rpc).
EXPOSE 8443 10009 9735

# Copy the binaries and entrypoint from the builder image.
COPY --from=builder /go/bin/shushtar /bin/
COPY --from=builder /go/bin/lightning-terminal /bin/
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/frcli /bin/
COPY --from=builder /go/bin/loop /bin/
Expand All @@ -54,5 +54,5 @@ RUN apk add --no-cache \
jq \
ca-certificates

# Specify the start command and entrypoint as the shushtar daemon.
ENTRYPOINT ["shushtar"]
# Specify the start command and entrypoint as the lightning-terminal daemon.
ENTRYPOINT ["lightning-terminal"]
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG := github.com/lightninglabs/shushtar
ESCPKG := github.com\/lightninglabs\/shushtar
PKG := github.com/lightninglabs/lightning-terminal
ESCPKG := github.com\/lightninglabs\/lightning-terminal
LND_PKG := github.com/lightningnetwork/lnd

LINT_PKG := github.com/golangci/golangci-lint/cmd/golangci-lint
Expand Down Expand Up @@ -41,7 +41,7 @@ include make/release_flags.mk
# We only return the part inside the double quote here to avoid escape issues
# when calling the external release script. The second parameter can be used to
# add additional ldflags if needed (currently only used for the release).
make_ldflags = $(2) -X $(LND_PKG)/build.Commit=shushtar-$(COMMIT) \
make_ldflags = $(2) -X $(LND_PKG)/build.Commit=lightning-terminal-$(COMMIT) \
-X $(LND_PKG)/build.CommitHash=$(COMMIT_HASH) \
-X $(LND_PKG)/build.GoVersion=$(GOVERSION) \
-X $(LND_PKG)/build.RawTags=$(shell echo $(1) | sed -e 's/ /,/g')
Expand Down Expand Up @@ -97,19 +97,19 @@ build: statik-build go-build
install: statik-build go-install

go-build:
@$(call print, "Building shushtar.")
$(GOBUILD) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" -o shushtar-debug $(PKG)/cmd/shushtar
@$(call print, "Building lightning-terminal.")
$(GOBUILD) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" -o litd-debug $(PKG)/cmd/litd

go-install:
@$(call print, "Installing shushtar.")
$(GOINSTALL) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" $(PKG)/cmd/shushtar
@$(call print, "Installing lightning-terminal.")
$(GOINSTALL) -tags="$(LND_RELEASE_TAGS)" -ldflags "$(LDFLAGS)" $(PKG)/cmd/litd

app-build: yarn-install
@$(call print, "Building production app.")
cd app; yarn build

release: statik-build
@$(call print, "Creating release of shushtar.")
@$(call print, "Creating release of lightning-terminal.")
./release.sh build-release "$(VERSION_TAG)" "$(BUILD_SYSTEM)" "$(LND_RELEASE_TAGS)" "$(RELEASE_LDFLAGS)"

scratch: build
Expand Down Expand Up @@ -179,6 +179,6 @@ list:

clean:
@$(call print, "Cleaning source.$(NC)")
$(RM) ./shushtar-debug
$(RM) ./lightning-terminal-debug
$(RM) coverage.txt
$(RM) -r statik
6 changes: 3 additions & 3 deletions cmd/shushtar/main.go → cmd/litd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"os"

"github.com/jessevdk/go-flags"
"github.com/lightninglabs/shushtar"
"github.com/lightninglabs/lightning-terminal"
)

// main starts the shushtar application.
// main starts the lightning-terminal application.
func main() {
err := shushtar.New().Run()
err := terminal.New().Run()
if e, ok := err.(*flags.Error); err != nil &&
(!ok || e.Type != flags.ErrHelp) {

Expand Down
8 changes: 4 additions & 4 deletions config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shushtar
package terminal

import (
"crypto/tls"
Expand Down Expand Up @@ -36,9 +36,9 @@ var (
defaultLetsEncryptDir = "letsencrypt"
)

// Config is the main configuration struct of shushtar. It contains all config
// items of its enveloping subservers, each prefixed with their daemon's short
// name.
// Config is the main configuration struct of lightning-terminal. It contains
// all config items of its enveloping subservers, each prefixed with their
// daemon's short name.
type Config struct {
HTTPSListen string `long:"httpslisten" description:"host:port to listen for incoming HTTP/2 connections on"`
UIPassword string `long:"uipassword" description:"the password that must be entered when using the loop UI. use a strong password to protect your node from unauthorized access through the web UI"`
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/lightninglabs/shushtar
module github.com/lightninglabs/lightning-terminal

require (
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
Expand Down
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
git.schwanenlied.me/yawning/bsaes.git v0.0.0-20180720073208-c0276d75487e h1:F2x1bq7RaNCIuqYpswggh1+c1JmwdnkHNC9wy1KDip0=
git.schwanenlied.me/yawning/bsaes.git v0.0.0-20180720073208-c0276d75487e/go.mod h1:BWqTsj8PgcPriQJGl7el20J/7TuT1d/hSyFDXMEpoEo=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
Expand All @@ -19,6 +20,7 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down Expand Up @@ -86,6 +88,7 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
Expand Down Expand Up @@ -136,6 +139,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.8.6/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.14.3 h1:OCJlWkOUoTnl0neNGlf4fUm3TmbEtguw7vR+nGtnDjY=
github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/improbable-eng/grpc-web v0.12.0 h1:GlCS+lMZzIkfouf7CNqY+qqpowdKuJLSLLcKVfM1oLc=
Expand Down Expand Up @@ -320,6 +324,7 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
Expand All @@ -329,6 +334,7 @@ golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -371,14 +377,17 @@ google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c h1:hrpEMCZ2O7DR5gC1n2AJGVhrwiEjOi35+jxtIuZpTMo=
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion gzip.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shushtar
package terminal

import (
"compress/gzip"
Expand Down
4 changes: 2 additions & 2 deletions log.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shushtar
package terminal

import (
"github.com/btcsuite/btclog"
Expand Down Expand Up @@ -26,7 +26,7 @@ var (

const (
// Subsystem defines the logging code for this subsystem.
Subsystem = "GRUB"
Subsystem = "LITD"

// GrpcLogSubsystem defines the logging code for the gRPC subsystem.
GrpcLogSubsystem = "GRPC"
Expand Down
6 changes: 3 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

set -e

PKG="github.com/lightninglabs/shushtar"
PKG="github.com/lightninglabs/lightning-terminal"
LND_PKG="github.com/lightningnetwork/lnd"
FARADAY_PKG="github.com/lightninglabs/faraday"
LOOP_PKG="github.com/lightninglabs/loop"
PACKAGE=shushtar
PACKAGE=lightning-terminal

# green prints one line of green text (if the terminal supports it).
function green() {
Expand Down Expand Up @@ -68,7 +68,7 @@ function build_release() {
pushd "${dir}"

green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/shushtar
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/litd
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${LND_PKG}/cmd/lncli
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${FARADAY_PKG}/cmd/frcli
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${LOOP_PKG}/cmd/loop
Expand Down
2 changes: 1 addition & 1 deletion subserver_permissions.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shushtar
package terminal

import "gopkg.in/macaroon-bakery.v2/bakery"

Expand Down
30 changes: 15 additions & 15 deletions shushtar.go → terminal.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shushtar
package terminal

import (
"context"
Expand Down Expand Up @@ -42,7 +42,7 @@ import (

// Import generated go package that contains all static files for the
// UI in a compressed format.
_ "github.com/lightninglabs/shushtar/statik"
_ "github.com/lightninglabs/lightning-terminal/statik"
)

const (
Expand All @@ -61,9 +61,9 @@ var (
)
)

// Shushtar is the main grand unified binary instance. Its task is to start an
// lnd node then start and register external subservers to it.
type Shushtar struct {
// LightningTerminal is the main grand unified binary instance. Its task is to
// start an lnd node then start and register external subservers to it.
type LightningTerminal struct {
cfg *Config
lndAddr string
listenerCfg lnd.ListenerCfg
Expand All @@ -84,17 +84,17 @@ type Shushtar struct {
httpServer *http.Server
}

// New creates a new instance of the shushtar daemon.
func New() *Shushtar {
return &Shushtar{
// New creates a new instance of the lightning-terminal daemon.
func New() *LightningTerminal {
return &LightningTerminal{
cfg: defaultConfig(),
lndErrChan: make(chan error, 1),
}
}

// Run starts everything and then blocks until either the application is shut
// down or a critical error happens.
func (g *Shushtar) Run() error {
func (g *LightningTerminal) Run() error {
// Pre-parse the command line options to pick up an alternative config
// file.
_, err := flags.Parse(g.cfg)
Expand All @@ -109,7 +109,7 @@ func (g *Shushtar) Run() error {
return err
}

// Validate the shushtar config options.
// Validate the lightning-terminal config options.
if g.cfg.LetsEncryptDir == "" {
g.cfg.LetsEncryptDir = filepath.Join(
g.cfg.Lnd.LndDir, defaultLetsEncryptDir,
Expand Down Expand Up @@ -253,7 +253,7 @@ func (g *Shushtar) Run() error {
// startSubservers creates an internal connection to lnd and then starts all
// embedded daemons as external subservers that hook into the same gRPC and REST
// servers that lnd started.
func (g *Shushtar) startSubservers(network string) error {
func (g *LightningTerminal) startSubservers(network string) error {
var basicClient lnrpc.LightningClient

// The main RPC listener of lnd might need some time to start, it could
Expand Down Expand Up @@ -344,7 +344,7 @@ func (g *Shushtar) startSubservers(network string) error {
// called once lnd has initialized its main gRPC server instance. It gives the
// daemons (or external subservers) the possibility to register themselves to
// the same server instance.
func (g *Shushtar) RegisterGrpcSubserver(grpcServer *grpc.Server) error {
func (g *LightningTerminal) RegisterGrpcSubserver(grpcServer *grpc.Server) error {
g.lndGrpcServer = grpcServer
frdrpc.RegisterFaradayServerServer(grpcServer, g.faradayServer)
looprpc.RegisterSwapClientServer(grpcServer, g.loopServer)
Expand All @@ -355,7 +355,7 @@ func (g *Shushtar) RegisterGrpcSubserver(grpcServer *grpc.Server) error {
// called once lnd has initialized its main REST server instance. It gives the
// daemons (or external subservers) the possibility to register themselves to
// the same server instance.
func (g *Shushtar) RegisterRestSubserver(ctx context.Context,
func (g *LightningTerminal) RegisterRestSubserver(ctx context.Context,
mux *restProxy.ServeMux, endpoint string,
dialOpts []grpc.DialOption) error {

Expand All @@ -372,7 +372,7 @@ func (g *Shushtar) RegisterRestSubserver(ctx context.Context,
}

// shutdown stops all subservers that were started and attached to lnd.
func (g *Shushtar) shutdown() error {
func (g *LightningTerminal) shutdown() error {
var returnErr error

if g.faradayStarted {
Expand Down Expand Up @@ -422,7 +422,7 @@ func (g *Shushtar) shutdown() error {
// startGrpcWebProxy creates a proxy that speaks gRPC web on one side and native
// gRPC on the other side. This allows gRPC web requests from the browser to be
// forwarded to lnd's native gRPC interface.
func (g *Shushtar) startGrpcWebProxy() error {
func (g *LightningTerminal) startGrpcWebProxy() error {
// Initialize the in-memory file server from the content compiled by
// the statik library.
statikFS, err := fs.New()
Expand Down