Skip to content

Commit 9eb11e2

Browse files
authored
Merge pull request #858 from ellemouton/bakeSuperMacInStatelessV2
multi: bake super macaroon during stateless init mode (V2)
2 parents 7140714 + a38837d commit 9eb11e2

29 files changed

+664
-298
lines changed

app/src/types/generated/proxy_pb.d.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/types/generated/proxy_pb.js

Lines changed: 31 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/litcli/proxy.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ var litCommands = []cli.Command{
3232
"specified as a hex string using a " +
3333
"maximum of 8 characters.",
3434
},
35+
cli.BoolFlag{
36+
Name: "read_only",
37+
Usage: "Whether the macaroon should " +
38+
"only contain read permissions.",
39+
},
3540
cli.StringFlag{
3641
Name: "save_to",
3742
Usage: "Save returned admin macaroon to " +
@@ -125,6 +130,7 @@ func bakeSuperMacaroon(ctx *cli.Context) error {
125130
resp, err := client.BakeSuperMacaroon(
126131
ctxb, &litrpc.BakeSuperMacaroonRequest{
127132
RootKeyIdSuffix: suffix,
133+
ReadOnly: ctx.Bool("read_only"),
128134
},
129135
)
130136
if err != nil {

config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ type Config struct {
224224
poolRemote bool
225225
tapRemote bool
226226

227+
// statelessInitMode is true if LND and LiT are running in stateless
228+
// init mode, meaning that no macaroon files are persisted to disk.
229+
statelessInitMode bool
230+
227231
// lndAdminMacaroon is the admin macaroon that is given to us by lnd
228232
// over an in-memory connection on startup. This is only set in
229233
// integrated lnd mode.

docs/release-notes/release-notes-0.13.5.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@
44

55
### Lightning Terminal
66

7-
- [Fixed a bug due to google-protobuf where a channel with SCID aliases on would cause terminal frontend
8-
to be unable to call the `ListChannels` RPC](https://github.com/lightninglabs/lightning-terminal/pull/850).
7+
* [Fixed a bug](https://github.com/lightninglabs/lightning-terminal/pull/850)
8+
due to google-protobuf where a channel with SCID aliases on would cause
9+
terminal frontend to be unable to call the `ListChannels` RPC].
10+
11+
* Add a new [`litcli bakesupermacaroon`](https://github.com/lightninglabs/lightning-terminal/pull/858)
12+
helper command. This new command can be used either with a LiT macaroon which
13+
has the appropriate permissions or with an LND macaroon which has the
14+
permissions required to call the LND `BakeMacaroon` call. This later case is
15+
especially useful in stateless-init mode where users will not have access to
16+
a LiT macaroon to perform this call with.
917

1018
- [Convert litrpc package into a module](https://github.com/lightninglabs/lightning-terminal/pull/823).
1119

@@ -24,5 +32,5 @@
2432
# Contributors (Alphabetical Order)
2533

2634
* Andras Banki-Horvath
27-
35+
* Elle Mouton
2836
* Kevin Cai

0 commit comments

Comments
 (0)