pub struct Util { /* private fields */ }
Implementations§
source§impl Util
impl Util
sourcepub fn decode_data(&self, data: String) -> Result<DecodedData, DecodeDataError>
pub fn decode_data(&self, data: String) -> Result<DecodedData, DecodeDataError>
Decode a user-provided string (usually obtained from QR-code or pasted).
Requires network: yes
sourcepub fn query_wallet_pubkey_id(&self) -> Result<String>
pub fn query_wallet_pubkey_id(&self) -> Result<String>
Get the wallet UUID v5 from the wallet pubkey
If the auth flow has never succeeded in this Auth instance, this method will require network access.
Requires network: yes
sourcepub fn derive_payment_uuid(&self, payment_hash: String) -> Result<String>
pub fn derive_payment_uuid(&self, payment_hash: String) -> Result<String>
Get the payment UUID v5 from the payment hash
Returns a UUID v5 derived from the payment hash. This will always return the same output given the same input.
Parameters:
payment_hash
- a payment hash represented in hex
Requires network: no
sourcepub fn get_node_info(&self) -> Result<NodeInfo>
pub fn get_node_info(&self) -> Result<NodeInfo>
Request some basic info about the node
Requires network: no
sourcepub fn get_exchange_rate(&self) -> Option<ExchangeRate>
pub fn get_exchange_rate(&self) -> Option<ExchangeRate>
Get exchange rate on the BTC/default currency pair Please keep in mind that this method doesn’t make any network calls. It simply retrieves previously fetched values that are frequently updated by a background task.
The fetched exchange rates will be persisted across restarts to alleviate the consequences of a slow or unresponsive exchange rate service.
The return value is an optional to deal with the possibility of no exchange rate values being known.
Requires network: no
sourcepub fn log_debug_info(&self) -> Result<()>
pub fn log_debug_info(&self) -> Result<()>
Prints additional debug information to the logs.
Throws an error in case that the necessary information can’t be retrieved.
Requires network: yes
sourcepub fn query_health_status(&self) -> Result<BreezHealthCheckStatus>
pub fn query_health_status(&self) -> Result<BreezHealthCheckStatus>
Returns the health check status of Breez and Greenlight services.
Requires network: yes
Auto Trait Implementations§
impl Freeze for Util
impl !RefUnwindSafe for Util
impl Send for Util
impl Sync for Util
impl Unpin for Util
impl !UnwindSafe for Util
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request