pub struct VanityGenerator { /* private fields */ }Expand description
High-performance vanity address generator.
VanityGenerator provides a fluent API for searching for addresses
that match specific patterns.
§Example
use rustywallet_vanity::prelude::*;
// Search for an address starting with "1Love"
let result = VanityGenerator::new()
.pattern("1Love")
.search()
.unwrap();
println!("Found: {}", result.address);
println!("Private key: {}", result.private_key.to_wif(rustywallet_keys::prelude::Network::Mainnet));Implementations§
Source§impl VanityGenerator
impl VanityGenerator
Sourcepub fn with_config(config: VanityConfig) -> Self
pub fn with_config(config: VanityConfig) -> Self
Create a vanity generator with a specific configuration.
Sourcepub fn address_type(self, addr_type: AddressType) -> Self
pub fn address_type(self, addr_type: AddressType) -> Self
Set the address type.
Sourcepub fn case_insensitive(self) -> Self
pub fn case_insensitive(self) -> Self
Enable case-insensitive matching.
Sourcepub fn max_attempts(self, max: u64) -> Self
pub fn max_attempts(self, max: u64) -> Self
Set maximum attempts.
Sourcepub fn batch_size(self, size: usize) -> Self
pub fn batch_size(self, size: usize) -> Self
Set batch size.
Sourcepub fn estimate_difficulty(&self) -> Vec<DifficultyEstimate>
pub fn estimate_difficulty(&self) -> Vec<DifficultyEstimate>
Estimate difficulty for the configured patterns.
Sourcepub fn search(&self) -> Result<VanityResult, VanityError>
pub fn search(&self) -> Result<VanityResult, VanityError>
Search for a matching address (single-threaded).
Sourcepub fn search_parallel(&self) -> Result<VanityResult, VanityError>
pub fn search_parallel(&self) -> Result<VanityResult, VanityError>
Search for a matching address with parallel processing.
Sourcepub fn search_with_progress<F>(
&self,
callback: F,
) -> Result<VanityResult, VanityError>
pub fn search_with_progress<F>( &self, callback: F, ) -> Result<VanityResult, VanityError>
Search with a progress callback.
Trait Implementations§
Source§impl Clone for VanityGenerator
impl Clone for VanityGenerator
Source§fn clone(&self) -> VanityGenerator
fn clone(&self) -> VanityGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VanityGenerator
impl Debug for VanityGenerator
Auto Trait Implementations§
impl Freeze for VanityGenerator
impl RefUnwindSafe for VanityGenerator
impl Send for VanityGenerator
impl Sync for VanityGenerator
impl Unpin for VanityGenerator
impl UnwindSafe for VanityGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more