docs: update path to where macaroons are stored

Co-Authored-By: Karl Ranna <karl@karlranna.com>
This commit is contained in:
Wilmer PaulinoandKarl Ranna authored and Olaoluwa Osuntokun committed 2018-08-23 18:05:00 -07:00
1 parent 856500dc43
commit dc3db4bf62
7 files changed
+40 -29

No files matched your search

+7 -6
View File
@@ -86,11 +86,12 @@ it won't be checked for validity.
Since `lnd` requires macaroons by default in order to call RPC methods, `lncli`
now reads a macaroon and provides it in the RPC call. Unless the path is
changed by the `--macaroonpath` option, `lncli` tries to read the macaroon from
`~/.lnd/admin.macaroon` by default and will error if that file doesn't exist
unless provided the `--no-macaroons` option. Keep this in mind when running
`lnd` with `--no-macaroons`, as `lncli` will error out unless called the same
way **or** `lnd` has generated a macaroon on a previous run without this
option.
the network directory of `lnd`'s currently active network (e.g. for simnet
`lnddir/data/chain/bitcoin/simnet/admin.macaroon`) by default and will error if
that file doesn't exist unless provided the `--no-macaroons` option. Keep this
in mind when running `lnd` with `--no-macaroons`, as `lncli` will error out
unless called the same way **or** `lnd` has generated a macaroon on a previous
run without this option.
`lncli` also adds a caveat which makes it valid for only 60 seconds by default
to help prevent replay in case the macaroon is somehow intercepted in
@@ -114,7 +115,7 @@ Where `<macaroon>` is the hex encoded binary data from the macaroon file itself.
A very simple example using `curl` may look something like this:
curl --insecure --header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $HOME/.lnd/admin.macaroon)" https://localhost:8080/v1/getinfo
curl --insecure --header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 $HOME/.lnd/data/chain/bitcoin/simnet/admin.macaroon)" https://localhost:8080/v1/getinfo
Have a look at the [Java GRPC example](/docs/grpc/java.md) for programmatic usage details.