Add post-quantum support for descriptor wallets

This commit is contained in:
Capri 2026-09-04 22:08:16 +00:00
commit 302a94e1a5
Signed by: VextaProject
SSH key fingerprint: SHA256:739BZv8LvIDY2tR7lXLy/IQ6MaGTQtYcG9GNvCjmpVM
7 changed files with 253 additions and 28 deletions

View file

@ -570,6 +570,25 @@ public:
bool GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const override { return m_spk_man.GetKeyOrigin(keyid, info); }
};
/**
* Post-quantum key manager used alongside descriptor wallets.
*
* Standard EC destinations remain managed by DescriptorScriptPubKeyMan.
* This manager owns deterministic ML-DSA / SLH-DSA receive keys only.
*/
class DescriptorPQScriptPubKeyMan final : public LegacyScriptPubKeyMan
{
public:
using LegacyScriptPubKeyMan::LegacyScriptPubKeyMan;
uint256 GetID() const override;
bool SetupGeneration(bool force = false) override;
bool GetNewDestination(const OutputType type, CTxDestination& dest, std::string& error) override;
bool TopUp(unsigned int size = 0) override { return true; }
bool CanGetAddresses(bool internal = false) const override;
};
class DescriptorScriptPubKeyMan : public ScriptPubKeyMan
{
private: