github.com/decred/dcrlnd@v0.7.6/lnrpc/signrpc/config_active.go (about)

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