multi: expand SendOutputs and CreateSimpleTx to take utxos
This commit updates the interface methods from `lnwallet.WalletController` to take optional input set which can be used to create the tx.
This commit is contained in:
1 parent
468ca87499
commit
99339f706f
8 files changed
+66
-38
No files matched your search
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcwallet/waddrmgr"
|
||||
basewallet "github.com/btcsuite/btcwallet/wallet"
|
||||
"github.com/lightningnetwork/lnd/fn"
|
||||
"github.com/lightningnetwork/lnd/input"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lncfg"
|
||||
@@ -120,12 +121,13 @@ func (r *RPCKeyRing) NewAddress(addrType lnwallet.AddressType, change bool,
|
||||
// NOTE: This is a part of the WalletController interface.
|
||||
//
|
||||
// NOTE: This method only signs with BIP49/84 keys.
|
||||
func (r *RPCKeyRing) SendOutputs(outputs []*wire.TxOut,
|
||||
feeRate chainfee.SatPerKWeight, minConfs int32, label string,
|
||||
func (r *RPCKeyRing) SendOutputs(inputs fn.Set[wire.OutPoint],
|
||||
outputs []*wire.TxOut, feeRate chainfee.SatPerKWeight,
|
||||
minConfs int32, label string,
|
||||
strategy basewallet.CoinSelectionStrategy) (*wire.MsgTx, error) {
|
||||
|
||||
tx, err := r.WalletController.SendOutputs(
|
||||
outputs, feeRate, minConfs, label, strategy,
|
||||
inputs, outputs, feeRate, minConfs, label, strategy,
|
||||
)
|
||||
if err != nil && err != basewallet.ErrTxUnsigned {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user