Skip to content

Commit ad0336a

Browse files
committed
litcli: expose new stateless init option to cli bakesupermacaroon command
1 parent 20504ed commit ad0336a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cmd/litcli/proxy.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ var litCommands = []cli.Command{
3232
"specified as a hex string using a " +
3333
"maximum of 8 characters.",
3434
},
35+
cli.BoolFlag{
36+
Name: "stateless_init",
37+
Usage: "When set, it will be assumed that " +
38+
"the provided macaroon is one " +
39+
"created by LND. It is required " +
40+
"that the macaroon has the " +
41+
"permissions required to bake a " +
42+
"macaroon via LND. This option may " +
43+
"only be set if LND is running in " +
44+
"stateless-init mode within LiT.",
45+
},
3546
cli.StringFlag{
3647
Name: "save_to",
3748
Usage: "Save returned admin macaroon to " +
@@ -125,6 +136,7 @@ func bakeSuperMacaroon(ctx *cli.Context) error {
125136
resp, err := client.BakeSuperMacaroon(
126137
ctxb, &litrpc.BakeSuperMacaroonRequest{
127138
RootKeyIdSuffix: suffix,
139+
StatelessInit: ctx.IsSet("stateless_init"),
128140
},
129141
)
130142
if err != nil {

0 commit comments

Comments
 (0)