detect_format

Function detect_format 

Source
pub fn detect_format(input: &str) -> Option<ImportFormat>
Expand description

Detect the format of an input string.

ยงExample

use rustywallet_import::{detect_format, ImportFormat};

assert_eq!(detect_format("5HueCGU8rMjxEXxiPuD5BDku4MkFqeZyd4dZ1jvhTVqvbTLvyTJ"), Some(ImportFormat::Wif));
assert_eq!(detect_format("0c28fca386c7a227600b2fe50b7cae11ec86d3bf1fbe471be89827e19d72aa1d"), Some(ImportFormat::Hex));