Struct grin_wallet_impls::LMDBBackend
source · pub struct LMDBBackend<'ck, C, K>where
C: NodeClient + 'ck,
K: Keychain + 'ck,{
pub keychain: Option<K>,
pub master_checksum: Box<Option<Blake2bResult>>,
/* private fields */
}
Fields§
§keychain: Option<K>
Keychain
master_checksum: Box<Option<Blake2bResult>>
Check value for XORed keychain seed
Implementations§
source§impl<'ck, C, K> LMDBBackend<'ck, C, K>where
C: NodeClient + 'ck,
K: Keychain + 'ck,
impl<'ck, C, K> LMDBBackend<'ck, C, K>where
C: NodeClient + 'ck,
K: Keychain + 'ck,
Trait Implementations§
source§impl<'ck, C, K> WalletBackend<'ck, C, K> for LMDBBackend<'ck, C, K>where
C: NodeClient + 'ck,
K: Keychain + 'ck,
impl<'ck, C, K> WalletBackend<'ck, C, K> for LMDBBackend<'ck, C, K>where
C: NodeClient + 'ck,
K: Keychain + 'ck,
source§fn set_keychain(
&mut self,
k: Box<K>,
mask: bool,
use_test_rng: bool
) -> Result<Option<SecretKey>, Error>
fn set_keychain( &mut self, k: Box<K>, mask: bool, use_test_rng: bool ) -> Result<Option<SecretKey>, Error>
Set the keychain, which should already have been opened
source§fn keychain(&self, mask: Option<&SecretKey>) -> Result<K, Error>
fn keychain(&self, mask: Option<&SecretKey>) -> Result<K, Error>
Return the keychain being used, cloned with XORed token value for temporary use
source§fn w2n_client(&mut self) -> &mut C
fn w2n_client(&mut self) -> &mut C
Return the node client being used
source§fn calc_commit_for_cache(
&mut self,
keychain_mask: Option<&SecretKey>,
amount: u64,
id: &Identifier
) -> Result<Option<String>, Error>
fn calc_commit_for_cache( &mut self, keychain_mask: Option<&SecretKey>, amount: u64, id: &Identifier ) -> Result<Option<String>, Error>
return the version of the commit for caching
source§fn set_parent_key_id_by_name(&mut self, label: &str) -> Result<(), Error>
fn set_parent_key_id_by_name(&mut self, label: &str) -> Result<(), Error>
Set parent path by account name
source§fn set_parent_key_id(&mut self, id: Identifier)
fn set_parent_key_id(&mut self, id: Identifier)
set parent path
source§fn parent_key_id(&mut self) -> Identifier
fn parent_key_id(&mut self) -> Identifier
return the parent path
source§fn get(
&self,
id: &Identifier,
mmr_index: &Option<u64>
) -> Result<OutputData, Error>
fn get( &self, id: &Identifier, mmr_index: &Option<u64> ) -> Result<OutputData, Error>
Get output data by id
source§fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = OutputData> + 'a>
fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = OutputData> + 'a>
Iterate over all output data stored by the backend
source§fn get_tx_log_entry(&self, u: &Uuid) -> Result<Option<TxLogEntry>, Error>
fn get_tx_log_entry(&self, u: &Uuid) -> Result<Option<TxLogEntry>, Error>
Get an (Optional) tx log entry by uuid
source§fn tx_log_iter<'a>(&'a self) -> Box<dyn Iterator<Item = TxLogEntry> + 'a>
fn tx_log_iter<'a>(&'a self) -> Box<dyn Iterator<Item = TxLogEntry> + 'a>
Iterate over all output data stored by the backend
source§fn get_private_context(
&mut self,
keychain_mask: Option<&SecretKey>,
slate_id: &[u8]
) -> Result<Context, Error>
fn get_private_context( &mut self, keychain_mask: Option<&SecretKey>, slate_id: &[u8] ) -> Result<Context, Error>
Retrieves the private context associated with a given slate id
source§fn acct_path_iter<'a>(
&'a self
) -> Box<dyn Iterator<Item = AcctPathMapping> + 'a>
fn acct_path_iter<'a>( &'a self ) -> Box<dyn Iterator<Item = AcctPathMapping> + 'a>
Iterate over all stored account paths
source§fn get_acct_path(&self, label: String) -> Result<Option<AcctPathMapping>, Error>
fn get_acct_path(&self, label: String) -> Result<Option<AcctPathMapping>, Error>
Gets an account path for a given label
source§fn get_stored_tx(&self, uuid: &str) -> Result<Option<Transaction>, Error>
fn get_stored_tx(&self, uuid: &str) -> Result<Option<Transaction>, Error>
Retrieves a stored transaction from a TxLogEntry
source§fn batch<'a>(
&'a mut self,
keychain_mask: Option<&SecretKey>
) -> Result<Box<dyn WalletOutputBatch<K> + 'a>, Error>
fn batch<'a>( &'a mut self, keychain_mask: Option<&SecretKey> ) -> Result<Box<dyn WalletOutputBatch<K> + 'a>, Error>
Create a new write batch to update or remove output data
source§fn batch_no_mask<'a>(
&'a mut self
) -> Result<Box<dyn WalletOutputBatch<K> + 'a>, Error>
fn batch_no_mask<'a>( &'a mut self ) -> Result<Box<dyn WalletOutputBatch<K> + 'a>, Error>
Batch for use when keychain isn’t available or required
source§fn current_child_index<'a>(
&mut self,
parent_key_id: &Identifier
) -> Result<u32, Error>
fn current_child_index<'a>( &mut self, parent_key_id: &Identifier ) -> Result<u32, Error>
Return the current child Index
source§fn next_child<'a>(
&mut self,
keychain_mask: Option<&SecretKey>
) -> Result<Identifier, Error>
fn next_child<'a>( &mut self, keychain_mask: Option<&SecretKey> ) -> Result<Identifier, Error>
Next child ID when we want to create a new output, based on current parent
source§fn last_confirmed_height<'a>(&mut self) -> Result<u64, Error>
fn last_confirmed_height<'a>(&mut self) -> Result<u64, Error>
last verified height of outputs directly descending from the given parent key
source§fn last_scanned_block<'a>(&mut self) -> Result<ScannedBlockInfo, Error>
fn last_scanned_block<'a>(&mut self) -> Result<ScannedBlockInfo, Error>
last block scanned during scan or restore
source§fn init_status<'a>(&mut self) -> Result<WalletInitStatus, Error>
fn init_status<'a>(&mut self) -> Result<WalletInitStatus, Error>
Flag whether the wallet needs a full UTXO scan on next update attempt
Auto Trait Implementations§
impl<'ck, C, K> Freeze for LMDBBackend<'ck, C, K>
impl<'ck, C, K> !RefUnwindSafe for LMDBBackend<'ck, C, K>
impl<'ck, C, K> Send for LMDBBackend<'ck, C, K>
impl<'ck, C, K> Sync for LMDBBackend<'ck, C, K>
impl<'ck, C, K> Unpin for LMDBBackend<'ck, C, K>
impl<'ck, C, K> !UnwindSafe for LMDBBackend<'ck, C, K>
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> 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