Skip to content

Commit b59ced6

Browse files
update macaroons/README.md
Provide sample of command to create macaroon with similar rights as admin.macaroon to be used with 3rd party applications. Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 6377f98 commit b59ced6

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)