pub struct DefaultShadowAddressHandler { /* private fields */ }Expand description
Default implementation of shadow address generation and resolution.
Implementations§
Source§impl DefaultShadowAddressHandler
impl DefaultShadowAddressHandler
Sourcepub fn new(network: NetworkType, master_seed: [u8; 32]) -> Self
pub fn new(network: NetworkType, master_seed: [u8; 32]) -> Self
Create a new shadow address handler.
Trait Implementations§
Source§impl ShadowAddressGenerator for DefaultShadowAddressHandler
impl ShadowAddressGenerator for DefaultShadowAddressHandler
Source§fn generate_address(
&self,
network: NetworkType,
) -> Result<ShadowAddress, ShadowAddressError>
fn generate_address( &self, network: NetworkType, ) -> Result<ShadowAddress, ShadowAddressError>
Generate a new shadow address.
Source§fn generate_temporary_address(
&self,
network: NetworkType,
ttl: Duration,
) -> Result<ShadowAddress, ShadowAddressError>
fn generate_temporary_address( &self, network: NetworkType, ttl: Duration, ) -> Result<ShadowAddress, ShadowAddressError>
Generate a temporary shadow address with TTL.
Source§fn generate_stealth_address(
&self,
network: NetworkType,
recipient_view_key: &[u8],
recipient_spend_key: &[u8],
) -> Result<ShadowAddress, ShadowAddressError>
fn generate_stealth_address( &self, network: NetworkType, recipient_view_key: &[u8], recipient_spend_key: &[u8], ) -> Result<ShadowAddress, ShadowAddressError>
Generate a stealth address.
Source§fn derive_address(
&self,
base: &ShadowAddress,
) -> Result<ShadowAddress, ShadowAddressError>
fn derive_address( &self, base: &ShadowAddress, ) -> Result<ShadowAddress, ShadowAddressError>
Derive a one-time address from a shadow address.
Source§fn derive_from_master(
&self,
master_key: &[u8],
index: u32,
) -> Result<ShadowAddress, ShadowAddressError>
fn derive_from_master( &self, master_key: &[u8], index: u32, ) -> Result<ShadowAddress, ShadowAddressError>
Derive address from master key using index.
Source§fn validate_address(
&self,
address: &ShadowAddress,
) -> Result<bool, ShadowAddressError>
fn validate_address( &self, address: &ShadowAddress, ) -> Result<bool, ShadowAddressError>
Validate a shadow address.
Source§impl ShadowAddressResolver for DefaultShadowAddressHandler
impl ShadowAddressResolver for DefaultShadowAddressHandler
Source§fn resolve_address(
&self,
address: &ShadowAddress,
) -> Result<Vec<u8>, ShadowAddressError>
fn resolve_address( &self, address: &ShadowAddress, ) -> Result<Vec<u8>, ShadowAddressError>
Resolve a shadow address to its one-time address.
Source§fn check_address(
&self,
shadow: &ShadowAddress,
onetime: &[u8],
) -> Result<bool, ShadowAddressError>
fn check_address( &self, shadow: &ShadowAddress, onetime: &[u8], ) -> Result<bool, ShadowAddressError>
Check if a one-time address belongs to a shadow address.
Auto Trait Implementations§
impl !Freeze for DefaultShadowAddressHandler
impl !RefUnwindSafe for DefaultShadowAddressHandler
impl Send for DefaultShadowAddressHandler
impl Sync for DefaultShadowAddressHandler
impl Unpin for DefaultShadowAddressHandler
impl !UnwindSafe for DefaultShadowAddressHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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