Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/vanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct VanityOptions {
pub pattern: String,
pub pattern_type: PatternType,
pub case_sensitive: bool,
#[allow(dead_code)]
pub max_attempts: u64,
pub max_time: Duration,
}
Expand All @@ -53,6 +54,7 @@ impl VanityGenerator {
}

/// Generate a single vanity address
#[allow(dead_code)]
pub async fn generate_single(&self, options: &VanityOptions) -> Result<Option<VanityResult>> {
let start_time = Instant::now();
let mut attempts = 0u64;
Expand Down Expand Up @@ -196,6 +198,7 @@ impl VanityGenerator {
}

/// Check if a public key matches the specified pattern
#[allow(dead_code)]
fn matches_pattern(&self, public_key: &str, pattern: &str, pattern_type: &PatternType, case_sensitive: bool) -> bool {
Self::matches_pattern_static(public_key, pattern, pattern_type, case_sensitive)
}
Expand Down Expand Up @@ -292,6 +295,7 @@ impl VanityGenerator {
}

/// Validate that a pattern only contains valid Base58 characters
#[allow(dead_code)]
pub fn is_valid_base58_pattern(pattern: &str) -> bool {
// Base58 excludes: 0, O, I, l
let invalid_chars = ['0', 'O', 'I', 'l'];
Expand All @@ -314,6 +318,7 @@ pub fn validate_base58_pattern(pattern: &str) -> Result<(), Vec<char>> {
}

/// Get all valid Base58 characters as a string
#[allow(dead_code)]
pub fn get_valid_base58_chars() -> &'static str {
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
}
Expand Down