Expand description
§FnzSafe
A Solana key management library with authenticated password keystores.
§Features
- Simple Encryption: Password-based encryption for Solana private keys
- Triple-Factor Authentication: Hardware fingerprint + master password + security question
- 2FA Support: TOTP-based two-factor authentication
- Cross-Platform: Works on macOS, Linux, and Windows
§Quick Start
use fnzero_safe::{KeyManager, EncryptionResult};
// Generate a new Solana keypair
let keypair = KeyManager::generate_keypair();
// Encrypt with password
let encrypted = KeyManager::encrypt_with_password(
&keypair.to_base58_string(),
"my_strong_password"
).unwrap();
// Decrypt with password
let decrypted = KeyManager::decrypt_with_password(
&encrypted,
"my_strong_password"
).unwrap();Modules§
- bot_
helper - Bot Helper Module
- interactive
- Interactive Menu Module
- operations
- Solana Operations Interactive Menu
Structs§
- KeyManager
- Main interface for key management operations
- Keypair
- A vanilla Ed25519 key pair
- Pubkey
- The address of a Solana account.
Enums§
Constants§
- KEYSTORE_
V2_ VERSION - KEYSTORE_
V3_ VERSION - MAX_
KEYSTORE_ JSON_ BYTES - MAX_
PASSWORD_ LENGTH - Maximum password size accepted by v2 operations, measured in UTF-8 bytes.
- MIN_
PASSWORD_ LENGTH - Minimum password length for encryption/decryption
Traits§
- Signer
- The
Signertrait declares operations that all digital signature providers must support. It is the primary interface by which signers are specified inTransactionsigning interfaces
Functions§
- decrypt_
key - Decrypt a base64-encoded legacy encrypted string with a 32-byte key.
- decrypt_
key_ to_ bytes - Decrypt to raw bytes (used when plaintext may be base58 string or 64-byte keypair).
- encrypt_
key - Encrypt a string with the legacy unauthenticated format.
- generate_
encryption_ key_ simple - Derive the legacy v1 key. New password keystores use Argon2id instead.
Type Aliases§
- Encryption
Result - Result type for encryption operations