Expand description
§rustywallet-import
Import private keys from various wallet formats.
§Supported Formats
- WIF - Wallet Import Format (compressed/uncompressed)
- Hex - Raw 64-character hex string
- Mini Key - Casascius mini private key (22 or 30 chars)
- Mnemonic - BIP39 mnemonic phrase with BIP44/49/84 derivation
- BIP38 - Password-encrypted private key
§Quick Start
use rustywallet_import::{import_any, import_wif, import_hex};
// Auto-detect format
let result = import_any("5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ");
assert!(result.is_ok());
// Import WIF directly
let (key, network, compressed) = import_wif("5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ").unwrap();
// Import hex
let key = import_hex("0c28fca386c7a227600b2fe50b7cae11ec86d3bf1fbe471be89827e19d72aa1d").unwrap();Re-exports§
pub use error::ImportError;pub use error::Result;pub use types::ImportFormat;pub use types::ImportResult;pub use types::ImportMetadata;
Modules§
- error
- Error types for import operations.
- paths
- Default derivation paths for different address types.
- prelude
- Prelude module for convenient imports.
- types
- Types for import results.
Structs§
- Mnemonic
Import - Configuration for mnemonic import.
Functions§
- detect_
format - Detect the format of an input string.
- import_
any - Import a private key from any supported format.
- import_
bip38 - Import a private key from BIP38 encrypted format.
- import_
hex - Import a private key from hex format.
- import_
mini_ key - Import a private key from mini key format.
- import_
mnemonic - Import a private key from a mnemonic phrase.
- import_
wif - Import a private key from WIF format.