lnwallet/interface: add CreateSimpleTx to wallet interface
This commit is contained in:
1 file changed
+14
@@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||||
"github.com/btcsuite/btcd/wire"
|
"github.com/btcsuite/btcd/wire"
|
||||||
"github.com/btcsuite/btcutil"
|
"github.com/btcsuite/btcutil"
|
||||||
|
"github.com/btcsuite/btcwallet/wallet/txauthor"
|
||||||
"github.com/lightningnetwork/lnd/lntypes"
|
"github.com/lightningnetwork/lnd/lntypes"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -169,6 +170,19 @@ type WalletController interface {
|
|||||||
SendOutputs(outputs []*wire.TxOut,
|
SendOutputs(outputs []*wire.TxOut,
|
||||||
feeRate SatPerKWeight) (*wire.MsgTx, error)
|
feeRate SatPerKWeight) (*wire.MsgTx, error)
|
||||||
|
|
||||||
|
// CreateSimpleTx creates a Bitcoin transaction paying to the specified
|
||||||
|
// outputs. The transaction is not broadcasted to the network. In the
|
||||||
|
// case the wallet has insufficient funds, or the outputs are
|
||||||
|
// non-standard, an error should be returned. This method also takes
|
||||||
|
// the target fee expressed in sat/kw that should be used when crafting
|
||||||
|
// the transaction.
|
||||||
|
//
|
||||||
|
// NOTE: The dryRun argument can be set true to create a tx that
|
||||||
|
// doesn't alter the database. A tx created with this set to true
|
||||||
|
// SHOULD NOT be broadcasted.
|
||||||
|
CreateSimpleTx(outputs []*wire.TxOut, feeRate SatPerKWeight,
|
||||||
|
dryRun bool) (*txauthor.AuthoredTx, error)
|
||||||
|
|
||||||
// ListUnspentWitness returns all unspent outputs which are version 0
|
// ListUnspentWitness returns all unspent outputs which are version 0
|
||||||
// witness programs. The 'minconfirms' and 'maxconfirms' parameters
|
// witness programs. The 'minconfirms' and 'maxconfirms' parameters
|
||||||
// indicate the minimum and maximum number of confirmations an output
|
// indicate the minimum and maximum number of confirmations an output
|
||||||
|
|||||||
Reference in new issue
Block a user