Skip to content

Commit

Permalink
Merge pull request #9029 from tlindi/admin-macaroon-recreate-sample
Browse files Browse the repository at this point in the history
update macaroons/README.md
  • Loading branch information
guggero authored Aug 23, 2024
2 parents 306695c + b59ced6 commit dcd921a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions macaroons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,23 @@ The macaroon created by this call would only be allowed to call the `GetInfo` an
`GetVersion` methods instead of all methods that have similar permissions (like
`info:read` for example).

If you need a macaroon file with rights similar to `admin.macaroon` for a
custom use case, you can create one as shown in the following example.
Note that a macaroon created in this way will have extensive rights, allowing
it to create macaroons with more permissions than the original one.
```shell
$ lncli bakemacaroon --save_to lnbits.macaroon \
address:read address:write \
info:read info:write \
invoices:read invoices:write \
macaroon:generate macaroon:read macaroon:write \
message:read message:write \
offchain:read offchain:write \
onchain:read onchain:write \
peers:read peers:write \
signer:generate signer:read
```

A full list of available entity/action pairs and RPC method URIs can be queried
by using the `lncli listpermissions` command.

Expand Down

0 comments on commit dcd921a

Please sign in to comment.