Skip to content

Commit dcd921a

Browse files
authored
Merge pull request #9029 from tlindi/admin-macaroon-recreate-sample
update macaroons/README.md
2 parents 306695c + b59ced6 commit dcd921a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

macaroons/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,23 @@ The macaroon created by this call would only be allowed to call the `GetInfo` an
114114
`GetVersion` methods instead of all methods that have similar permissions (like
115115
`info:read` for example).
116116

117+
If you need a macaroon file with rights similar to `admin.macaroon` for a
118+
custom use case, you can create one as shown in the following example.
119+
Note that a macaroon created in this way will have extensive rights, allowing
120+
it to create macaroons with more permissions than the original one.
121+
```shell
122+
$ lncli bakemacaroon --save_to lnbits.macaroon \
123+
address:read address:write \
124+
info:read info:write \
125+
invoices:read invoices:write \
126+
macaroon:generate macaroon:read macaroon:write \
127+
message:read message:write \
128+
offchain:read offchain:write \
129+
onchain:read onchain:write \
130+
peers:read peers:write \
131+
signer:generate signer:read
132+
```
133+
117134
A full list of available entity/action pairs and RPC method URIs can be queried
118135
by using the `lncli listpermissions` command.
119136

0 commit comments

Comments
 (0)