2015-12-26 09:11:39 +03:00
|
|
|
package lnwallet
|
2015-12-30 01:04:23 +03:00
|
|
|
|
2017-07-30 05:02:38 +03:00
|
|
|
import (
|
|
|
|
"github.com/lightningnetwork/lnd/chainntnfs"
|
|
|
|
"github.com/lightningnetwork/lnd/channeldb"
|
|
|
|
"github.com/roasbeef/btcd/chaincfg"
|
|
|
|
)
|
|
|
|
|
2016-10-15 16:45:51 +03:00
|
|
|
// Config is a struct which houses configuration parameters which modify the
|
|
|
|
// behaviour of LightningWallet.
|
2017-07-30 05:02:38 +03:00
|
|
|
//
|
|
|
|
// NOTE: The passed channeldb, and ChainNotifier should already be fully
|
|
|
|
// initialized/started before being passed as a function argument.
|
2015-12-30 01:04:23 +03:00
|
|
|
type Config struct {
|
2017-07-30 05:02:38 +03:00
|
|
|
// Database is a wrapper around a namespace within boltdb reserved for
|
|
|
|
// ln-based wallet metadata. See the 'channeldb' package for further
|
|
|
|
// information.
|
|
|
|
Database *channeldb.DB
|
|
|
|
|
|
|
|
// Notifier is used by in order to obtain notifications about funding
|
|
|
|
// transaction reaching a specified confirmation depth, and to catch
|
|
|
|
// counterparty's broadcasting revoked commitment states.
|
|
|
|
Notifier chainntnfs.ChainNotifier
|
|
|
|
|
|
|
|
// WalletController is the core wallet, all non Lightning Network
|
|
|
|
// specific interaction is proxied to the internal wallet.
|
|
|
|
WalletController WalletController
|
|
|
|
|
|
|
|
// Signer is the wallet's current Signer implementation. This Signer is
|
|
|
|
// used to generate signature for all inputs to potential funding
|
|
|
|
// transactions, as well as for spends from the funding transaction to
|
|
|
|
// update the commitment state.
|
|
|
|
Signer Signer
|
|
|
|
|
|
|
|
// FeeEstimator is the implementation that the wallet will use for the
|
|
|
|
// calculation of on-chain transaction fees.
|
|
|
|
FeeEstimator FeeEstimator
|
|
|
|
|
|
|
|
// ChainIO is an instance of the BlockChainIO interface. ChainIO is
|
|
|
|
// used to lookup the existence of outputs within the UTXO set.
|
|
|
|
ChainIO BlockChainIO
|
|
|
|
|
|
|
|
// DefaultConstraints is the set of default constraints that will be
|
|
|
|
// used for any incoming or outgoing channel reservation requests.
|
|
|
|
DefaultConstraints channeldb.ChannelConstraints
|
|
|
|
|
|
|
|
// NetParams is the set of parameters that tells the wallet which chain
|
|
|
|
// it will be operating on.
|
|
|
|
NetParams chaincfg.Params
|
2015-12-30 01:04:23 +03:00
|
|
|
}
|