2018-12-20 13:42:28 +03:00
|
|
|
// +build invoicesrpc
|
|
|
|
|
|
|
|
package invoicesrpc
|
|
|
|
|
|
|
|
import (
|
2019-01-03 21:15:14 +03:00
|
|
|
"github.com/btcsuite/btcd/chaincfg"
|
2018-12-20 13:42:28 +03:00
|
|
|
"github.com/lightningnetwork/lnd/invoices"
|
2019-01-03 21:15:14 +03:00
|
|
|
"github.com/lightningnetwork/lnd/macaroons"
|
2018-12-20 13:42:28 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
// Config is the primary configuration struct for the invoices RPC server. It
|
|
|
|
// contains all the items required for the 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 {
|
2019-01-03 21:15:14 +03:00
|
|
|
// NetworkDir is the main network directory wherein the invoices rpc
|
|
|
|
// server will find the macaroon named DefaultInvoicesMacFilename.
|
|
|
|
NetworkDir string
|
|
|
|
|
|
|
|
// MacService is the main macaroon service that we'll use to handle
|
|
|
|
// authentication for the invoices rpc server.
|
|
|
|
MacService *macaroons.Service
|
|
|
|
|
|
|
|
// InvoiceRegistry is a central registry of all the outstanding invoices
|
|
|
|
// created by the daemon.
|
2018-12-20 13:42:28 +03:00
|
|
|
InvoiceRegistry *invoices.InvoiceRegistry
|
2019-01-03 21:15:14 +03:00
|
|
|
|
|
|
|
// ChainParams are required to properly decode invoice payment requests
|
|
|
|
// that are marshalled over rpc.
|
|
|
|
ChainParams *chaincfg.Params
|
2018-12-20 13:42:28 +03:00
|
|
|
}
|