github.com/decred/dcrlnd@v0.7.6/lnrpc/invoicesrpc/config_active.go (about) 1 //go:build !no_invoicesrpc 2 // +build !no_invoicesrpc 3 4 package invoicesrpc 5 6 import ( 7 "github.com/decred/dcrd/chaincfg/v3" 8 "github.com/decred/dcrlnd/channeldb" 9 "github.com/decred/dcrlnd/invoices" 10 "github.com/decred/dcrlnd/lnwire" 11 "github.com/decred/dcrlnd/macaroons" 12 "github.com/decred/dcrlnd/netann" 13 ) 14 15 // Config is the primary configuration struct for the invoices RPC server. It 16 // contains all the items required for the rpc server to carry out its 17 // duties. The fields with struct tags are meant to be parsed as normal 18 // configuration options, while if able to be populated, the latter fields MUST 19 // also be specified. 20 type Config struct { 21 // NetworkDir is the main network directory wherein the invoices rpc 22 // server will find the macaroon named DefaultInvoicesMacFilename. 23 NetworkDir string 24 25 // MacService is the main macaroon service that we'll use to handle 26 // authentication for the invoices rpc server. 27 MacService *macaroons.Service 28 29 // InvoiceRegistry is a central registry of all the outstanding invoices 30 // created by the daemon. 31 InvoiceRegistry *invoices.InvoiceRegistry 32 33 // IsChannelActive is used to generate valid hop hints. 34 IsChannelActive func(chanID lnwire.ChannelID) bool 35 36 // ChainParams are required to properly decode invoice payment requests 37 // that are marshalled over rpc. 38 ChainParams *chaincfg.Params 39 40 // NodeSigner is an implementation of the MessageSigner implementation 41 // that's backed by the identity private key of the running lnd node. 42 NodeSigner *netann.NodeSigner 43 44 // DefaultCLTVExpiry is the default invoice expiry if no values is 45 // specified. 46 DefaultCLTVExpiry uint32 47 48 // GraphDB is a global database instance which is needed to access the 49 // channel graph. 50 GraphDB *channeldb.ChannelGraph 51 52 // ChanStateDB is a possibly replicated db instance which contains the 53 // channel state 54 ChanStateDB *channeldb.ChannelStateDB 55 56 // GenInvoiceFeatures returns a feature containing feature bits that 57 // should be advertised on freshly generated invoices. 58 GenInvoiceFeatures func() *lnwire.FeatureVector 59 60 // GenAmpInvoiceFeatures returns a feature containing feature bits that 61 // should be advertised on freshly generated AMP invoices. 62 GenAmpInvoiceFeatures func() *lnwire.FeatureVector 63 }