Skip to content

Commit 13e8c29

Browse files
authored
Merge pull request #730 from starius/s-lsat-l402
multi: replace occurrences of "LSAT" to "L402"
2 parents cd5dc90 + 5a1f795 commit 13e8c29

33 files changed

+1060
-992
lines changed

client.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/btcsuite/btcd/btcec/v2"
1313
"github.com/btcsuite/btcd/btcec/v2/schnorr"
1414
"github.com/btcsuite/btcd/btcutil"
15-
"github.com/lightninglabs/aperture/lsat"
15+
"github.com/lightninglabs/aperture/l402"
1616
"github.com/lightninglabs/lndclient"
1717
"github.com/lightninglabs/loop/loopdb"
1818
"github.com/lightninglabs/loop/swap"
@@ -56,8 +56,8 @@ var (
5656

5757
// globalCallTimeout is the maximum time any call of the client to the
5858
// server is allowed to take, including the time it may take to get
59-
// and pay for an LSAT token.
60-
globalCallTimeout = serverRPCTimeout + lsat.PaymentTimeout
59+
// and pay for an L402 token.
60+
globalCallTimeout = serverRPCTimeout + l402.PaymentTimeout
6161

6262
// probeTimeout is the maximum time until a probe is allowed to take.
6363
probeTimeout = 3 * time.Minute
@@ -111,13 +111,13 @@ type ClientConfig struct {
111111
// Lnd is an instance of the lnd proxy.
112112
Lnd *lndclient.LndServices
113113

114-
// MaxLsatCost is the maximum price we are willing to pay to the server
114+
// MaxL402Cost is the maximum price we are willing to pay to the server
115115
// for the token.
116-
MaxLsatCost btcutil.Amount
116+
MaxL402Cost btcutil.Amount
117117

118-
// MaxLsatFee is the maximum that we are willing to pay in routing fees
118+
// MaxL402Fee is the maximum that we are willing to pay in routing fees
119119
// to obtain the token.
120-
MaxLsatFee btcutil.Amount
120+
MaxL402Fee btcutil.Amount
121121

122122
// LoopOutMaxParts defines the maximum number of parts that may be used
123123
// for a loop out swap. When greater than one, a multi-part payment may
@@ -138,12 +138,12 @@ func NewClient(dbDir string, loopDB loopdb.SwapStore,
138138
sweeperDb sweepbatcher.BatcherStore, cfg *ClientConfig) (
139139
*Client, func(), error) {
140140

141-
lsatStore, err := lsat.NewFileStore(dbDir)
141+
l402Store, err := l402.NewFileStore(dbDir)
142142
if err != nil {
143143
return nil, nil, err
144144
}
145145

146-
swapServerClient, err := newSwapServerClient(cfg, lsatStore)
146+
swapServerClient, err := newSwapServerClient(cfg, l402Store)
147147
if err != nil {
148148
return nil, nil, err
149149
}
@@ -153,7 +153,7 @@ func NewClient(dbDir string, loopDB loopdb.SwapStore,
153153
Server: swapServerClient,
154154
Store: loopDB,
155155
Conn: swapServerClient.conn,
156-
LsatStore: lsatStore,
156+
L402Store: l402Store,
157157
CreateExpiryTimer: func(d time.Duration) <-chan time.Time {
158158
return time.NewTimer(d).C
159159
},

cmd/loop/lsat.go renamed to cmd/loop/l402.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ type printableToken struct {
2626

2727
var listAuthCommand = cli.Command{
2828
Name: "listauth",
29-
Usage: "list all LSAT tokens",
30-
Description: "Shows a list of all LSAT tokens that loopd has paid for",
29+
Usage: "list all L402 tokens",
30+
Description: "Shows a list of all L402 tokens that loopd has paid for",
3131
Action: listAuth,
3232
}
3333

@@ -38,7 +38,7 @@ func listAuth(ctx *cli.Context) error {
3838
}
3939
defer cleanup()
4040

41-
resp, err := client.GetLsatTokens(
41+
resp, err := client.GetL402Tokens(
4242
context.Background(), &looprpc.TokensRequest{},
4343
)
4444
if err != nil {

config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package loop
33
import (
44
"time"
55

6-
"github.com/lightninglabs/aperture/lsat"
6+
"github.com/lightninglabs/aperture/l402"
77
"github.com/lightninglabs/lndclient"
88
"github.com/lightninglabs/loop/loopdb"
99
"google.golang.org/grpc"
@@ -15,7 +15,7 @@ type clientConfig struct {
1515
Server swapServerClient
1616
Conn *grpc.ClientConn
1717
Store loopdb.SwapStore
18-
LsatStore lsat.Store
18+
L402Store l402.Store
1919
CreateExpiryTimer func(expiry time.Duration) <-chan time.Time
2020
LoopOutMaxParts uint32
2121
}

go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ require (
1919
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
2020
github.com/jessevdk/go-flags v1.4.0
2121
github.com/lib/pq v1.10.7
22-
github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030
22+
github.com/lightninglabs/aperture v0.3.2-beta
2323
github.com/lightninglabs/lndclient v0.17.4-1
2424
github.com/lightninglabs/loop/swapserverrpc v1.0.5
2525
github.com/lightningnetwork/lnd v0.17.4-beta
@@ -33,7 +33,7 @@ require (
3333
github.com/urfave/cli v1.22.9
3434
golang.org/x/net v0.23.0
3535
google.golang.org/grpc v1.59.0
36-
google.golang.org/protobuf v1.31.0
36+
google.golang.org/protobuf v1.33.0
3737
gopkg.in/macaroon-bakery.v2 v2.1.0
3838
gopkg.in/macaroon.v2 v2.1.0
3939
modernc.org/sqlite v1.29.5
@@ -78,7 +78,7 @@ require (
7878
github.com/go-logr/stdr v1.2.2 // indirect
7979
github.com/gogo/protobuf v1.3.2 // indirect
8080
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
81-
github.com/golang/protobuf v1.5.3 // indirect
81+
github.com/golang/protobuf v1.5.4 // indirect
8282
github.com/golang/snappy v0.0.4 // indirect
8383
github.com/google/btree v1.0.1 // indirect
8484
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
@@ -161,14 +161,14 @@ require (
161161
go.etcd.io/etcd/pkg/v3 v3.5.7 // indirect
162162
go.etcd.io/etcd/raft/v3 v3.5.7 // indirect
163163
go.etcd.io/etcd/server/v3 v3.5.7 // indirect
164-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect
165-
go.opentelemetry.io/otel v1.20.0 // indirect
164+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
165+
go.opentelemetry.io/otel v1.21.0 // indirect
166166
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 // indirect
167167
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0 // indirect
168168
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0 // indirect
169-
go.opentelemetry.io/otel/metric v1.20.0 // indirect
170-
go.opentelemetry.io/otel/sdk v1.3.0 // indirect
171-
go.opentelemetry.io/otel/trace v1.20.0 // indirect
169+
go.opentelemetry.io/otel/metric v1.21.0 // indirect
170+
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
171+
go.opentelemetry.io/otel/trace v1.21.0 // indirect
172172
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
173173
go.uber.org/atomic v1.7.0 // indirect
174174
go.uber.org/multierr v1.6.0 // indirect
@@ -200,7 +200,7 @@ require (
200200

201201
// We want to format raw bytes as hex instead of base64. The forked version
202202
// allows us to specify that as an option.
203-
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display
203+
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display
204204

205205
replace github.com/lightninglabs/loop/swapserverrpc => ./swapserverrpc
206206

go.sum

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
873873
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
874874
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
875875
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
876-
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
877876
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
877+
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
878+
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
878879
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
879880
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
880881
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
@@ -1094,8 +1095,8 @@ github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
10941095
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
10951096
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
10961097
github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
1097-
github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030 h1:q/BBO2awQdy/dCILXXZbBsstQ+1DpSQ/c8B8EgKqg+g=
1098-
github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030/go.mod h1:Jvoen+fgoaGQZIHdchiGigu0Lwuwz8S5u5wad9IhVDU=
1098+
github.com/lightninglabs/aperture v0.3.2-beta h1:J2GQwBmSHxpr5VOatXbgrTogF/qN2l6UWLPHfIowq10=
1099+
github.com/lightninglabs/aperture v0.3.2-beta/go.mod h1:M/5dPzHjHvuYXQuxzicqaGiCclHUvKW6N0ay1t/HGiM=
10991100
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc=
11001101
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk=
11011102
github.com/lightninglabs/lndclient v0.17.4-1 h1:uCLBYf1f1nOoagHuiPK9anERA86dNSlYK9/QGb410RQ=
@@ -1104,8 +1105,8 @@ github.com/lightninglabs/neutrino v0.16.0 h1:YNTQG32fPR/Zg0vvJVI65OBH8l3U18LSXXt
11041105
github.com/lightninglabs/neutrino v0.16.0/go.mod h1:x3OmY2wsA18+Kc3TSV2QpSUewOCiscw2mKpXgZv2kZk=
11051106
github.com/lightninglabs/neutrino/cache v1.1.1 h1:TllWOSlkABhpgbWJfzsrdUaDH2fBy/54VSIB4vVqV8M=
11061107
github.com/lightninglabs/neutrino/cache v1.1.1/go.mod h1:XJNcgdOw1LQnanGjw8Vj44CvguYA25IMKjWFZczwZuo=
1107-
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wleRN1L2fJXd6ZoQ9ZegVFTAb2bOQfruJPKcY=
1108-
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
1108+
github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display h1:Y2WiPkBS/00EiEg0qp0FhehxnQfk3vv8U6Xt3nN+rTY=
1109+
github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
11091110
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f h1:Pua7+5TcFEJXIIZ1I2YAUapmbcttmLj4TTi786bIi3s=
11101111
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
11111112
github.com/lightningnetwork/lnd v0.17.4-beta h1:BXYbETYZWtcNrYcAosGGXnWsq4Nr5R9PRqlRuEA9AUs=
@@ -1347,24 +1348,25 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
13471348
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
13481349
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
13491350
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
1350-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M=
1351-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M=
1351+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE=
1352+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE=
13521353
go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs=
1353-
go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc=
1354-
go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs=
1354+
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
1355+
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
13551356
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 h1:R/OBkMoGgfy2fLhs2QhkCI1w4HLEQX92GCcJB6SSdNk=
13561357
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4=
13571358
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0 h1:giGm8w67Ja7amYNfYMdme7xSp2pIxThWopw8+QP51Yk=
13581359
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0/go.mod h1:hO1KLR7jcKaDDKDkvI9dP/FIhpmna5lkqPUQdEjFAM8=
13591360
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0 h1:VQbUHoJqytHHSJ1OZodPH9tvZZSVzUHjPHpkO85sT6k=
13601361
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY=
1361-
go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA=
1362-
go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM=
1363-
go.opentelemetry.io/otel/sdk v1.3.0 h1:3278edCoH89MEJ0Ky8WQXVmDQv3FX4ZJ3Pp+9fJreAI=
1362+
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
1363+
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
13641364
go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs=
1365+
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
1366+
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
13651367
go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk=
1366-
go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ=
1367-
go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU=
1368+
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
1369+
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
13681370
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
13691371
go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ=
13701372
go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=

instantout/reservation/manager.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/btcsuite/btcd/btcec/v2"
1111
"github.com/btcsuite/btcd/btcutil"
12-
1312
"github.com/lightninglabs/loop/fsm"
1413
reservationrpc "github.com/lightninglabs/loop/swapserverrpc"
1514
)
@@ -186,7 +185,7 @@ func (m *Manager) fetchL402(ctx context.Context) {
186185
func (m *Manager) RegisterReservationNotifications(
187186
reservationChan chan *reservationrpc.ServerReservationNotification) error {
188187

189-
// In order to create a valid lsat we first are going to call
188+
// In order to create a valid l402 we first are going to call
190189
// the FetchL402 method. As a client might not have outbound capacity
191190
// yet, we'll retry until we get a valid response.
192191
if !m.hasL402 {

liquidity/liquidity.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import (
4646
"github.com/lightninglabs/loop"
4747
"github.com/lightninglabs/loop/labels"
4848
"github.com/lightninglabs/loop/loopdb"
49+
clientrpc "github.com/lightninglabs/loop/looprpc"
4950
"github.com/lightninglabs/loop/swap"
5051
"github.com/lightningnetwork/lnd/clock"
5152
"github.com/lightningnetwork/lnd/funding"
@@ -55,8 +56,6 @@ import (
5556
"github.com/lightningnetwork/lnd/routing/route"
5657
"github.com/lightningnetwork/lnd/ticker"
5758
"google.golang.org/protobuf/proto"
58-
59-
clientrpc "github.com/lightninglabs/loop/looprpc"
6059
)
6160

6261
const (

liquidity/parameters.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ import (
88

99
"github.com/btcsuite/btcd/btcutil"
1010
"github.com/lightninglabs/lndclient"
11+
clientrpc "github.com/lightninglabs/loop/looprpc"
1112
"github.com/lightninglabs/loop/swap"
1213
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
1314
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
1415
"github.com/lightningnetwork/lnd/lnwire"
1516
"github.com/lightningnetwork/lnd/routing/route"
16-
17-
clientrpc "github.com/lightninglabs/loop/looprpc"
1817
)
1918

2019
var (

loopd/config.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/btcsuite/btcd/btcutil"
13-
"github.com/lightninglabs/aperture/lsat"
13+
"github.com/lightninglabs/aperture/l402"
1414
"github.com/lightninglabs/loop/loopdb"
1515
"github.com/lightningnetwork/lnd/cert"
1616
"github.com/lightningnetwork/lnd/lncfg"
@@ -160,8 +160,10 @@ type Config struct {
160160
MaxLogFileSize int `long:"maxlogfilesize" description:"Maximum logfile size in MB."`
161161

162162
DebugLevel string `long:"debuglevel" description:"Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems -- Use show to list available subsystems"`
163-
MaxLSATCost uint32 `long:"maxlsatcost" description:"Maximum cost in satoshis that loopd is going to pay for an LSAT token automatically. Does not include routing fees."`
164-
MaxLSATFee uint32 `long:"maxlsatfee" description:"Maximum routing fee in satoshis that we are willing to pay while paying for an LSAT token."`
163+
MaxLSATCost uint32 `long:"maxlsatcost" hidden:"true"`
164+
MaxLSATFee uint32 `long:"maxlsatfee" hidden:"true"`
165+
MaxL402Cost uint32 `long:"maxl402cost" description:"Maximum cost in satoshis that loopd is going to pay for an L402 token automatically. Does not include routing fees."`
166+
MaxL402Fee uint32 `long:"maxl402fee" description:"Maximum routing fee in satoshis that we are willing to pay while paying for an L402 token."`
165167

166168
LoopOutMaxParts uint32 `long:"loopoutmaxparts" description:"The maximum number of payment parts that may be used for a loop out swap."`
167169

@@ -206,8 +208,8 @@ func DefaultConfig() Config {
206208
TLSKeyPath: DefaultTLSKeyPath,
207209
TLSValidity: DefaultAutogenValidity,
208210
MacaroonPath: DefaultMacaroonPath,
209-
MaxLSATCost: lsat.DefaultMaxCostSats,
210-
MaxLSATFee: lsat.DefaultMaxRoutingFeeSats,
211+
MaxL402Cost: l402.DefaultMaxCostSats,
212+
MaxL402Fee: l402.DefaultMaxRoutingFeeSats,
211213
LoopOutMaxParts: defaultLoopOutMaxParts,
212214
TotalPaymentTimeout: defaultTotalPaymentTimeout,
213215
MaxPaymentRetries: defaultMaxPaymentRetries,

loopd/daemon.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ import (
1717
"github.com/lightninglabs/lndclient"
1818
"github.com/lightninglabs/loop"
1919
"github.com/lightninglabs/loop/instantout"
20+
"github.com/lightninglabs/loop/instantout/reservation"
2021
"github.com/lightninglabs/loop/loopd/perms"
2122
"github.com/lightninglabs/loop/loopdb"
22-
"github.com/lightninglabs/loop/sweepbatcher"
23-
24-
"github.com/lightninglabs/loop/instantout/reservation"
2523
loop_looprpc "github.com/lightninglabs/loop/looprpc"
26-
2724
loop_swaprpc "github.com/lightninglabs/loop/swapserverrpc"
25+
"github.com/lightninglabs/loop/sweepbatcher"
2826
"github.com/lightningnetwork/lnd/clock"
2927
"github.com/lightningnetwork/lnd/lntypes"
3028
"github.com/lightningnetwork/lnd/macaroons"

loopd/log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package loopd
22

33
import (
44
"github.com/btcsuite/btclog"
5-
"github.com/lightninglabs/aperture/lsat"
5+
"github.com/lightninglabs/aperture/l402"
66
"github.com/lightninglabs/lndclient"
77
"github.com/lightninglabs/loop"
88
"github.com/lightninglabs/loop/fsm"
@@ -37,7 +37,7 @@ func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) {
3737
lnd.AddSubLogger(root, "SWEEP", intercept, sweepbatcher.UseLogger)
3838
lnd.AddSubLogger(root, "LNDC", intercept, lndclient.UseLogger)
3939
lnd.AddSubLogger(root, "STORE", intercept, loopdb.UseLogger)
40-
lnd.AddSubLogger(root, lsat.Subsystem, intercept, lsat.UseLogger)
40+
lnd.AddSubLogger(root, l402.Subsystem, intercept, l402.UseLogger)
4141
lnd.AddSubLogger(
4242
root, liquidity.Subsystem, intercept, liquidity.UseLogger,
4343
)

loopd/perms/perms.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ var RequiredPermissions = map[string][]bakery.Op{
6969
Entity: "loop",
7070
Action: "in",
7171
}},
72+
"/looprpc.SwapClient/GetL402Tokens": {{
73+
Entity: "auth",
74+
Action: "read",
75+
}},
7276
"/looprpc.SwapClient/GetLsatTokens": {{
7377
Entity: "auth",
7478
Action: "read",

0 commit comments

Comments
 (0)