multi: add p2tr keyspend wallet support
This commit is contained in:
24 files changed
+416
-163
No files matched your search
@@ -1347,6 +1347,9 @@ func marshalWalletAccount(internalScope waddrmgr.KeyScope,
|
||||
case waddrmgr.KeyScopeBIP0084:
|
||||
addrType = AddressType_WITNESS_PUBKEY_HASH
|
||||
|
||||
case waddrmgr.KeyScopeBIP0086:
|
||||
addrType = AddressType_TAPROOT_PUBKEY
|
||||
|
||||
case internalScope:
|
||||
addrType = AddressType_WITNESS_PUBKEY_HASH
|
||||
|
||||
@@ -1405,6 +1408,10 @@ func (w *WalletKit) ListAccounts(ctx context.Context,
|
||||
keyScope := waddrmgr.KeyScopeBIP0049Plus
|
||||
keyScopeFilter = &keyScope
|
||||
|
||||
case AddressType_TAPROOT_PUBKEY:
|
||||
keyScope := waddrmgr.KeyScopeBIP0086
|
||||
keyScopeFilter = &keyScope
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unhandled address type %v", req.AddressType)
|
||||
}
|
||||
@@ -1460,6 +1467,10 @@ func parseAddrType(addrType AddressType,
|
||||
addrTyp := waddrmgr.WitnessPubKey
|
||||
return &addrTyp, nil
|
||||
|
||||
case AddressType_TAPROOT_PUBKEY:
|
||||
addrTyp := waddrmgr.TaprootPubKey
|
||||
return &addrTyp, nil
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("unhandled address type %v", addrType)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user