multi: add p2tr keyspend wallet support

This commit is contained in:
Oliver Gugger committed 2022-03-24 18:02:38 +01:00
1 parent f130eddb92
commit c73cf03a55
24 files changed
+416 -163

No files matched your search

+8 -1
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]
}