multi: add p2tr keyspend wallet support

This commit is contained in:
Oliver Gugger
2022-03-18 18:37:46 +01:00
parent f130eddb92
commit c73cf03a55
24 changed files with 416 additions and 163 deletions

View File

@ -1112,7 +1112,14 @@ func importWatchOnlyAccounts(wallet *wallet.Wallet,
for _, scope := range scopes {
addrSchema := waddrmgr.ScopeAddrMap[waddrmgr.KeyScopeBIP0084]
if scope.Scope.Purpose == waddrmgr.KeyScopeBIP0049Plus.Purpose {
// We want witness pubkey hash by default, except for BIP49
// where we want mixed and BIP86 where we want taproot address
// formats.
switch scope.Scope.Purpose {
case waddrmgr.KeyScopeBIP0049Plus.Purpose,
waddrmgr.KeyScopeBIP0086.Purpose:
addrSchema = waddrmgr.ScopeAddrMap[scope.Scope]
}