forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 24
/
config_active.go
39 lines (32 loc) · 1.41 KB
/
config_active.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//go:build !no_signrpc
// +build !no_signrpc
package signrpc
import (
"github.com/decred/dcrlnd/input"
"github.com/decred/dcrlnd/keychain"
"github.com/decred/dcrlnd/macaroons"
)
// Config is the primary configuration struct for the signer RPC server. It
// contains all the items required for the signer rpc server to carry out its
// duties. The fields with struct tags are meant to be parsed as normal
// configuration options, while if able to be populated, the latter fields MUST
// also be specified.
type Config struct {
// SignerMacPath is the path for the signer macaroon. If unspecified
// then we assume that the macaroon will be found under the network
// directory, named DefaultSignerMacFilename.
SignerMacPath string `long:"signermacaroonpath" description:"Path to the signer macaroon"`
// NetworkDir is the main network directory wherein the signer rpc
// server will find the macaroon named DefaultSignerMacFilename.
NetworkDir string
// MacService is the main macaroon service that we'll use to handle
// authentication for the signer rpc server.
MacService *macaroons.Service
// Signer is the signer instance that backs the signer RPC server. The
// job of the signer RPC server is simply to proxy valid requests to
// the active signer instance.
Signer input.Signer
// KeyRing is an interface that the signer will use to derive any keys
// for signing messages.
KeyRing keychain.SecretKeyRing
}