pub struct Wollet { /* private fields */ }
Expand description
A Watch-Only wallet, wrapper over lwk_wollet::Wollet
Implementations§
source§impl Wollet
impl Wollet
pub fn inner_wollet( &self ) -> Result<MutexGuard<'_, Wollet>, PoisonError<MutexGuard<'_, Wollet>>>
source§impl Wollet
impl Wollet
sourcepub fn with_custom_persister(
network: &Network,
descriptor: &WolletDescriptor,
persister: Arc<ForeignPersisterLink>
) -> Result<Arc<Self>, LwkError>
pub fn with_custom_persister( network: &Network, descriptor: &WolletDescriptor, persister: Arc<ForeignPersisterLink> ) -> Result<Arc<Self>, LwkError>
Construct a Watch-Only wallet object with a caller provided persister
sourcepub fn new(
network: &Network,
descriptor: &WolletDescriptor,
datadir: Option<String>
) -> Result<Arc<Self>, LwkError>
pub fn new( network: &Network, descriptor: &WolletDescriptor, datadir: Option<String> ) -> Result<Arc<Self>, LwkError>
Construct a Watch-Only wallet object
pub fn descriptor(&self) -> Result<Arc<WolletDescriptor>, LwkError>
pub fn address( &self, index: Option<u32> ) -> Result<Arc<AddressResult>, LwkError>
pub fn apply_update(&self, update: &Update) -> Result<(), LwkError>
pub fn balance(&self) -> Result<HashMap<AssetId, u64>, LwkError>
pub fn transactions(&self) -> Result<Vec<Arc<WalletTx>>, LwkError>
pub fn finalize(&self, pset: &Pset) -> Result<Arc<Pset>, LwkError>
sourcepub fn wait_for_tx(
&self,
txid: &Txid,
client: &ElectrumClient
) -> Result<Arc<WalletTx>, LwkError>
pub fn wait_for_tx( &self, txid: &Txid, client: &ElectrumClient ) -> Result<Arc<WalletTx>, LwkError>
Note this a test method but we are not feature gating in test because we need it in destination language examples
Trait Implementations§
source§impl<T> LowerReturn<T> for Wollet
impl<T> LowerReturn<T> for Wollet
§type ReturnType = <Wollet as FfiConverterArc<UniFfiTag>>::FfiType
type ReturnType = <Wollet 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 = _
Auto Trait Implementations§
impl !Freeze for Wollet
impl RefUnwindSafe for Wollet
impl Send for Wollet
impl Sync for Wollet
impl Unpin for Wollet
impl UnwindSafe for Wollet
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> 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