File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,9 @@ class Wallet
256
256
// Return whether private keys enabled.
257
257
virtual bool privateKeysDisabled () = 0;
258
258
259
+ // Return whether the wallet contains a Taproot scriptPubKeyMan
260
+ virtual bool taprootEnabled () = 0;
261
+
259
262
// Return whether wallet uses an external signer.
260
263
virtual bool hasExternalSigner () = 0;
261
264
Original file line number Diff line number Diff line change @@ -461,6 +461,11 @@ class WalletImpl : public Wallet
461
461
bool canGetAddresses () override { return m_wallet->CanGetAddresses (); }
462
462
bool hasExternalSigner () override { return m_wallet->IsWalletFlagSet (WALLET_FLAG_EXTERNAL_SIGNER); }
463
463
bool privateKeysDisabled () override { return m_wallet->IsWalletFlagSet (WALLET_FLAG_DISABLE_PRIVATE_KEYS); }
464
+ bool taprootEnabled () override {
465
+ if (m_wallet->IsLegacy ()) return false ;
466
+ auto spk_man = m_wallet->GetScriptPubKeyMan (OutputType::BECH32M, /* internal=*/ false );
467
+ return spk_man != nullptr ;
468
+ }
464
469
OutputType getDefaultAddressType () override { return m_wallet->m_default_address_type ; }
465
470
CAmount getDefaultMaxTxFee () override { return m_wallet->m_default_max_tx_fee ; }
466
471
void remove () override
You can’t perform that action at this time.
0 commit comments