lnwallet+lntest+mod: bump btcwallet to export ScriptForOutput

This commit is contained in:
Oliver Gugger committed 2022-01-06 13:24:30 +01:00
1 parent 1902ad724e
commit 8c77829c46
5 files changed
+27 -3

No files matched your search

+9
View File
@@ -44,6 +44,15 @@ func (b *BtcWallet) FetchInputInfo(prevOut *wire.OutPoint) (*lnwallet.Utxo, erro
}, nil
}
// ScriptForOutput returns the address, witness program and redeem script for a
// given UTXO. An error is returned if the UTXO does not belong to our wallet or
// it is not a managed pubKey address.
func (b *BtcWallet) ScriptForOutput(output *wire.TxOut) (
waddrmgr.ManagedPubKeyAddress, []byte, []byte, error) {
return b.wallet.ScriptForOutput(output)
}
// deriveFromKeyLoc attempts to derive a private key using a fully specified
// KeyLocator.
func deriveFromKeyLoc(scopedMgr *waddrmgr.ScopedKeyManager,
+6
View File
@@ -158,6 +158,12 @@ type WalletController interface {
// a non-nil error value of ErrNotMine should be returned instead.
FetchInputInfo(prevOut *wire.OutPoint) (*Utxo, error)
// ScriptForOutput returns the address, witness program and redeem
// script for a given UTXO. An error is returned if the UTXO does not
// belong to our wallet or it is not a managed pubKey address.
ScriptForOutput(output *wire.TxOut) (waddrmgr.ManagedPubKeyAddress,
[]byte, []byte, error)
// ConfirmedBalance returns the sum of all the wallet's unspent outputs
// that have at least confs confirmations. If confs is set to zero,
// then all unspent outputs, including those currently in the mempool