mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
lntest+lnwallet: add AddressInfo to WalletController
We need to be able to query the watch-only wallet about a public key when trying to sign with a key that we don't know the family or index of. The easiest way to do that is to leverage the wallet's address index to query the derivation path for a public key. To give the RPC wallet access to that functionality, we need to expose the method on the WalletController interface.
This commit is contained in:
@@ -543,6 +543,16 @@ func (b *BtcWallet) IsOurAddress(a btcutil.Address) bool {
|
||||
return result && (err == nil)
|
||||
}
|
||||
|
||||
// AddressInfo returns the information about an address, if it's known to this
|
||||
// wallet.
|
||||
//
|
||||
// NOTE: This is a part of the WalletController interface.
|
||||
func (b *BtcWallet) AddressInfo(a btcutil.Address) (waddrmgr.ManagedAddress,
|
||||
error) {
|
||||
|
||||
return b.wallet.AddressInfo(a)
|
||||
}
|
||||
|
||||
// ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
// name and key scope filter can be provided to filter through all of the wallet
|
||||
// accounts and return only those matching.
|
||||
|
Reference in New Issue
Block a user