mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
lnwallet+lntest+mod: bump btcwallet to export ScriptForOutput
This commit is contained in:
parent
1902ad724e
commit
8c77829c46
5 changed files with 27 additions and 3 deletions
2
go.mod
2
go.mod
|
@ -9,7 +9,7 @@ require (
|
|||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
|
||||
github.com/btcsuite/btcutil v1.0.3-0.20210527170813-e2ba6805a890
|
||||
github.com/btcsuite/btcutil/psbt v1.0.3-0.20210527170813-e2ba6805a890
|
||||
github.com/btcsuite/btcwallet v0.13.0
|
||||
github.com/btcsuite/btcwallet v0.13.1-0.20211201210108-79de92f527dc
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.1.0
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.1.0
|
||||
github.com/btcsuite/btcwallet/walletdb v1.3.6-0.20210803004036-eebed51155ec
|
||||
|
|
4
go.sum
4
go.sum
|
@ -97,8 +97,8 @@ github.com/btcsuite/btcutil v1.0.3-0.20210527170813-e2ba6805a890/go.mod h1:0DVlH
|
|||
github.com/btcsuite/btcutil/psbt v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:LVveMu4VaNSkIRTZu2+ut0HDBRuYjqGocxDMNS1KuGQ=
|
||||
github.com/btcsuite/btcutil/psbt v1.0.3-0.20210527170813-e2ba6805a890 h1:0xUNvvwJ7RjzBs4nCF+YrK28S5P/b4uHkpPxY1ovGY4=
|
||||
github.com/btcsuite/btcutil/psbt v1.0.3-0.20210527170813-e2ba6805a890/go.mod h1:LVveMu4VaNSkIRTZu2+ut0HDBRuYjqGocxDMNS1KuGQ=
|
||||
github.com/btcsuite/btcwallet v0.13.0 h1:gtLWwueRm27KQiHJpycybv3uMdK1eo87JexfTfzvEhk=
|
||||
github.com/btcsuite/btcwallet v0.13.0/go.mod h1:iLN1lG1MW0eREm+SikmPO8AZPz5NglBTEK/ErqkjGpo=
|
||||
github.com/btcsuite/btcwallet v0.13.1-0.20211201210108-79de92f527dc h1:lAbAEAp4eWvsSwJfcpdHXpKz78X2sVF9aDK4nJveXmY=
|
||||
github.com/btcsuite/btcwallet v0.13.1-0.20211201210108-79de92f527dc/go.mod h1:iLN1lG1MW0eREm+SikmPO8AZPz5NglBTEK/ErqkjGpo=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.0.0/go.mod h1:VufDts7bd/zs3GV13f/lXc/0lXrPnvxD/NvmpG/FEKU=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.1.0 h1:8pO0pvPX1rFRfRiol4oV6kX7dY5y4chPwhfVwUfvwtk=
|
||||
github.com/btcsuite/btcwallet/wallet/txauthor v1.1.0/go.mod h1:ktYuJyumYtwG+QQ832Q+kqvxWJRAei3Nqs5qhSn4nww=
|
||||
|
|
|
@ -53,6 +53,15 @@ func (w *WalletController) FetchInputInfo(
|
|||
return utxo, 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 (w *WalletController) ScriptForOutput(*wire.TxOut) (
|
||||
waddrmgr.ManagedPubKeyAddress, []byte, []byte, error) {
|
||||
|
||||
return nil, nil, nil, nil
|
||||
}
|
||||
|
||||
// ConfirmedBalance currently returns dummy values.
|
||||
func (w *WalletController) ConfirmedBalance(int32, string) (btcutil.Amount,
|
||||
error) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue