using NBitcoin; using PalladiumWallet.Core.Chain; namespace PalladiumWallet.Core.Crypto; /// /// Astrazione su tutti i tipi di account wallet (HD da seed, HD da xpub/xprv importata, /// chiavi WIF importate). Consente a WalletSynchronizer e TransactionFactory di operare /// indipendentemente dal tipo di keystore sottostante (blueprint §4.4–§4.5). /// public interface IWalletAccount { ScriptKind Kind { get; } ChainProfile Profile { get; } /// True se l'account non può firmare (assenza di chiavi private). bool IsWatchOnly { get; } BitcoinAddress GetAddress(bool isChange, int index); BitcoinAddress GetReceiveAddress(int index); BitcoinAddress GetChangeAddress(int index); /// Null se la chiave pubblica non è ricavabile dall'account (indirizzi puri watch-only). PubKey? GetPublicKey(bool isChange, int index); /// Null se l'account è watch-only o l'indice è fuori range. Key? GetPrivateKey(bool isChange, int index); /// /// Per gli account con indirizzi fissi (WIF importati) restituisce la lista /// completa da scansionare; null per gli account HD che usano il gap limit. /// IReadOnlyList<(BitcoinAddress Address, bool IsChange, int Index)>? FixedAddresses { get; } }