#pragma once #include #include namespace dragonx { namespace daemon { struct SeedWalletResult { bool ok = false; std::string seedPhrase; // SECRET — the caller must wipe it after use std::string destAddress; // new shielded z-address (the Phase 2 sweep target) std::string tempDatadir; // datadir holding the new wallet.dat (kept iff keepDatadir + ok) std::string error; }; // Mint a fresh BIP39 mnemonic wallet in an ISOLATED throwaway datadir by running a second // dragonxd on its own port with no network, export its seed + a new z-address, then stop it. // // This is the safe first step of "migrate to a seed wallet": it moves no funds and never touches // the main daemon or the real wallet.dat. Blocking — call it on a background thread. // // keepDatadir: keep the temp datadir + its wallet.dat so a later sweep/adopt step can use it, or // delete it immediately (used when only the seed itself is wanted). class SeedWalletCreator { public: static SeedWalletResult create(bool keepDatadir, const std::function& progress = {}); }; } // namespace daemon } // namespace dragonx