lntest+lnwallet: add ImportTaprootScript to wallet interface

This commit is contained in:
Oliver Gugger 2022-07-29 18:20:05 +02:00
parent 3a66a09d9d
commit 0d6e791042
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
2 changed files with 16 additions and 0 deletions

View File

@ -132,6 +132,13 @@ func (w *WalletController) ImportPublicKey(*btcec.PublicKey,
return nil
}
// ImportTaprootScript currently returns a dummy value.
func (w *WalletController) ImportTaprootScript(waddrmgr.KeyScope,
*waddrmgr.Tapscript) (waddrmgr.ManagedAddress, error) {
return nil, nil
}
// SendOutputs currently returns dummy values.
func (w *WalletController) SendOutputs([]*wire.TxOut,
chainfee.SatPerKWeight, int32, string) (*wire.MsgTx, error) {

View File

@ -316,6 +316,15 @@ type WalletController interface {
ImportPublicKey(pubKey *btcec.PublicKey,
addrType waddrmgr.AddressType) error
// ImportTaprootScript imports a user-provided taproot script into the
// wallet. The imported script will act as a pay-to-taproot address.
//
// NOTE: Taproot keys imported through this RPC currently _cannot_ be
// used for funding PSBTs. Only tracking the balance and UTXOs is
// currently supported.
ImportTaprootScript(scope waddrmgr.KeyScope,
tapscript *waddrmgr.Tapscript) (waddrmgr.ManagedAddress, error)
// SendOutputs funds, signs, and broadcasts a Bitcoin transaction paying
// out to the specified outputs. In the case the wallet has insufficient
// funds, or the outputs are non-standard, an error should be returned.