pub struct ShadowAddressManager { /* private fields */ }Expand description
Shadow address manager for comprehensive address lifecycle
Implementations§
Source§impl ShadowAddressManager
impl ShadowAddressManager
Sourcepub async fn new(network: NetworkType, master_seed: [u8; 32]) -> Self
pub async fn new(network: NetworkType, master_seed: [u8; 32]) -> Self
Create a new shadow address manager.
Sourcepub async fn create_temporary_address(
&self,
ttl: Duration,
) -> Result<ShadowAddress, ShadowAddressError>
pub async fn create_temporary_address( &self, ttl: Duration, ) -> Result<ShadowAddress, ShadowAddressError>
Create a new temporary address with auto-expiry.
Sourcepub async fn create_stealth_address(
&self,
recipient_view_key: &[u8],
recipient_spend_key: &[u8],
) -> Result<ShadowAddress, ShadowAddressError>
pub async fn create_stealth_address( &self, recipient_view_key: &[u8], recipient_spend_key: &[u8], ) -> Result<ShadowAddress, ShadowAddressError>
Create a stealth address.
Sourcepub async fn create_address_pool(
&self,
pool_id: String,
size: usize,
ttl: Option<Duration>,
) -> Result<(), ShadowAddressError>
pub async fn create_address_pool( &self, pool_id: String, size: usize, ttl: Option<Duration>, ) -> Result<(), ShadowAddressError>
Create an address pool for rotation.
Sourcepub async fn get_pool_address(&self, pool_id: &str) -> Option<ShadowAddress>
pub async fn get_pool_address(&self, pool_id: &str) -> Option<ShadowAddress>
Get a random address from pool.
Sourcepub async fn rotate_pool(&self, pool_id: &str) -> Result<(), ShadowAddressError>
pub async fn rotate_pool(&self, pool_id: &str) -> Result<(), ShadowAddressError>
Rotate addresses in a pool.
Sourcepub async fn mark_address_used(&self, address: &mut ShadowAddress)
pub async fn mark_address_used(&self, address: &mut ShadowAddress)
Mark address as used.
Auto Trait Implementations§
impl Freeze for ShadowAddressManager
impl !RefUnwindSafe for ShadowAddressManager
impl Send for ShadowAddressManager
impl Sync for ShadowAddressManager
impl Unpin for ShadowAddressManager
impl !UnwindSafe for ShadowAddressManager
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