mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-20 02:27:21 +01:00
75370ce6b4
Add label parameter to PublishTransaction in WalletController interface. A labels package is added to store generic labels that are used for the different types of transactions that are published by lnd. To keep commit size down, the two endpoints that require a label parameter be passed down have a todo added, which will be removed in subsequent commits.
28 lines
1.1 KiB
Go
28 lines
1.1 KiB
Go
package sweep
|
|
|
|
import (
|
|
"github.com/btcsuite/btcd/wire"
|
|
"github.com/lightningnetwork/lnd/lnwallet"
|
|
)
|
|
|
|
// Wallet contains all wallet related functionality required by sweeper.
|
|
type Wallet interface {
|
|
// PublishTransaction performs cursory validation (dust checks, etc) and
|
|
// broadcasts the passed transaction to the Bitcoin network.
|
|
PublishTransaction(tx *wire.MsgTx, label string) error
|
|
|
|
// ListUnspentWitness returns all unspent outputs which are version 0
|
|
// witness programs. The 'minconfirms' and 'maxconfirms' parameters
|
|
// indicate the minimum and maximum number of confirmations an output
|
|
// needs in order to be returned by this method.
|
|
ListUnspentWitness(minconfirms, maxconfirms int32) ([]*lnwallet.Utxo,
|
|
error)
|
|
|
|
// WithCoinSelectLock will execute the passed function closure in a
|
|
// synchronized manner preventing any coin selection operations from
|
|
// proceeding while the closure is executing. This can be seen as the
|
|
// ability to execute a function closure under an exclusive coin
|
|
// selection lock.
|
|
WithCoinSelectLock(f func() error) error
|
|
}
|