pub struct Network { /* private fields */ }
Expand description
Wrapper over lwk_wollet::ElementsNetwork
Implementations§
source§impl Network
impl Network
pub fn mainnet() -> Arc<Network>
pub fn testnet() -> Arc<Network>
pub fn regtest(policy_asset: AssetId) -> Arc<Network>
pub fn regtest_default() -> Arc<Network>
pub fn default_electrum_client(&self) -> Result<Arc<ElectrumClient>, LwkError>
pub fn default_esplora_client(&self) -> Arc<EsploraClient>
pub fn is_mainnet(&self) -> bool
pub fn policy_asset(&self) -> AssetId
pub fn tx_builder(&self) -> Arc<TxBuilder>
Trait Implementations§
source§impl From<ElementsNetwork> for Network
impl From<ElementsNetwork> for Network
source§fn from(inner: ElementsNetwork) -> Self
fn from(inner: ElementsNetwork) -> Self
Converts to this type from the input type.
source§impl From<Network> for ElementsNetwork
impl From<Network> for ElementsNetwork
source§impl<T> LowerReturn<T> for Network
impl<T> LowerReturn<T> for Network
§type ReturnType = <Network as FfiConverterArc<UniFfiTag>>::FfiType
type ReturnType = <Network as FfiConverterArc<UniFfiTag>>::FfiType
The type that should be returned by scaffolding functions for this type. Read more
source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
Lower this value for scaffolding function return Read more
const TYPE_ID_META: MetadataBuffer = _
source§impl PartialEq for Network
impl PartialEq for Network
impl Copy for Network
impl Eq for Network
impl StructuralPartialEq for Network
Auto Trait Implementations§
impl Freeze for Network
impl RefUnwindSafe for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnwindSafe for Network
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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