You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,17 +32,25 @@ Faraday connects to a single instance of lnd. It requires access to macaroons fo
32
32
By default, faraday runs on mainnet. The `--network` flag can be used to run in
33
33
test environments.
34
34
35
-
## Transport security
35
+
## Authentication and transport security
36
36
37
-
The gRPC and REST connections of `faraday` are encrypted with TLS the same way
38
-
`lnd` is.
37
+
The gRPC and REST connections of `faraday` are encrypted with TLS and secured
38
+
with macaroon authentication the same way `lnd` is.
39
39
40
-
If no custom loop directory is set then the TLS certificate is stored in
41
-
`~/.faraday/<network>/tls.cert`.
40
+
If no custom faraday directory is set then the TLS certificate is stored in
41
+
`~/.faraday/<network>/tls.cert` and the base macaroon in
42
+
`~/.faraday/<network>/faraday.macaroon`.
42
43
43
-
The `frcli` command will pick up the file automatically on mainnet if no custom
44
-
loop directory is used. For other networks it should be sufficient to add the
45
-
`--network` flag to tell the CLI in what sub directory to look for the files.
44
+
The `frcli` command will pick up these file automatically on mainnet if no
45
+
custom faraday directory is used. For other networks it should be sufficient to
46
+
add the `--network` flag to tell the CLI in what sub directory to look for the
47
+
files.
48
+
49
+
For more information on macaroons,
50
+
[see the macaroon documentation of lnd.](https://github.com/lightningnetwork/lnd/blob/master/docs/macaroons.md)
51
+
52
+
**NOTE**: Faraday's macaroons are independent from `lnd`'s. The same macaroon
53
+
cannot be used for both `faraday` and `lnd`.
46
54
47
55
### Chain Backend
48
56
Faraday offers node accounting services which require access to a Bitcoin node with `--txindex` set so that it can perform transaction lookup. Currently the `CloseReport` endpoint requires this connection, and will fail if it is not present. It is *strongly recommended* to provide this connection when utilizing the `NodeAudit` endpoint, but it is not required. This connection is *optional*, and all other endpoints will function if it is not configured.
@@ -78,7 +86,7 @@ type Config struct { //nolint:maligned
78
86
Lnd*LndConfig`group:"lnd" namespace:"lnd"`
79
87
80
88
// FaradayDir is the main directory where faraday stores all its data.
81
-
FaradayDirstring`long:"faradaydir" description:"The directory for all of faraday's data. If set, this option overwrites --tlscertpath and --tlskeypath."`
89
+
FaradayDirstring`long:"faradaydir" description:"The directory for all of faraday's data. If set, this option overwrites --macaroonpath, --tlscertpath and --tlskeypath."`
82
90
83
91
// ChainConn specifies whether to attempt connecting to a bitcoin backend.
84
92
ChainConnbool`long:"connect_bitcoin" description:"Whether to attempt to connect to a backing bitcoin node. Some endpoints will not be available if this option is not enabled."`
@@ -102,6 +110,8 @@ type Config struct { //nolint:maligned
102
110
TLSAutoRefreshbool`long:"tlsautorefresh" description:"Re-generate TLS certificate and key if the IPs or domains are changed."`
103
111
TLSDisableAutofillbool`long:"tlsdisableautofill" description:"Do not include the interface IPs or the system hostname in TLS certificate, use first --tlsextradomain as Common Name instead, if set."`
104
112
113
+
MacaroonPathstring`long:"macaroonpath" description:"Path to write the macaroon for faraday's RPC and REST services if it doesn't exist."`
114
+
105
115
// RPCListen is the listen address for the faraday rpc server.
106
116
RPCListenstring`long:"rpclisten" description:"Address to listen on for gRPC clients."`
0 commit comments