Wallet Best Pratices

Recommendations

Dispose When Done

Always use [Symbol.dispose] or call zeroize() when done with a wallet to minimize exposure of private key material in memory.

Use generate() for New Wallets

Prefer Wallet.generate() for new wallets to ensure both classical and quantum keys are properly generated together.

Store Quantum Keys in Base58

Store quantum keys in base58 format via toQuantumBase58() since it includes the chain code and security level, making restoration simpler.

Never Expose Private Keys

Never log or expose private keys in production environments. Use WIF for classical key storage and base58 for quantum key storage.

Prefer Mnemonic for Multiple Accounts

Use the Mnemonic class for deterministic wallets rather than storing individual private keys when managing multiple accounts.