pub struct SqliteStore { /* private fields */ }Expand description
Represents a pool of connections with an SQLite database. The pool is used to interact
concurrently with the underlying database in a safe and efficient manner.
Current table definitions can be found at store.sql migration file.
Implementations§
Source§impl SqliteStore
impl SqliteStore
pub fn upsert_foreign_account_code( conn: &mut Connection, account_id: AccountId, code: &AccountCode, ) -> Result<(), StoreError>
pub fn get_foreign_account_code( conn: &mut Connection, account_ids: Vec<AccountId>, ) -> Result<BTreeMap<AccountId, AccountCode>, StoreError>
Sourcepub fn get_account_vault(
conn: &Connection,
account_id: AccountId,
) -> Result<AssetVault, StoreError>
pub fn get_account_vault( conn: &Connection, account_id: AccountId, ) -> Result<AssetVault, StoreError>
Retrieves the full asset vault for a specific account.
Sourcepub fn get_account_storage(
conn: &Connection,
account_id: AccountId,
) -> Result<AccountStorage, StoreError>
pub fn get_account_storage( conn: &Connection, account_id: AccountId, ) -> Result<AccountStorage, StoreError>
Retrieves the full storage for a specific account.
Source§impl SqliteStore
impl SqliteStore
pub fn insert_partial_blockchain_nodes( conn: &mut Connection, nodes: &[(InOrderIndex, Word)], ) -> Result<(), StoreError>
Sourcepub fn prune_irrelevant_blocks(conn: &mut Connection) -> Result<(), StoreError>
pub fn prune_irrelevant_blocks(conn: &mut Connection) -> Result<(), StoreError>
Removes block headers that do not contain any client notes and aren’t the genesis or last block.
Source§impl SqliteStore
impl SqliteStore
Sourcepub fn get_transactions(
conn: &mut Connection,
filter: &TransactionFilter,
) -> Result<Vec<TransactionRecord>, StoreError>
pub fn get_transactions( conn: &mut Connection, filter: &TransactionFilter, ) -> Result<Vec<TransactionRecord>, StoreError>
Retrieves tracked transactions, filtered by TransactionFilter.
Sourcepub fn apply_transaction(
conn: &mut Connection,
merkle_store: &Arc<RwLock<MerkleStore>>,
tx_update: &TransactionStoreUpdate,
) -> Result<(), StoreError>
pub fn apply_transaction( conn: &mut Connection, merkle_store: &Arc<RwLock<MerkleStore>>, tx_update: &TransactionStoreUpdate, ) -> Result<(), StoreError>
Inserts a transaction and updates the current state based on the tx_result changes.
Source§impl SqliteStore
impl SqliteStore
Trait Implementations§
Source§impl Store for SqliteStore
impl Store for SqliteStore
Source§fn get_current_timestamp(&self) -> Option<u64>
fn get_current_timestamp(&self) -> Option<u64>
Returns the current timestamp tracked by the store, measured in non-leap seconds since
Unix epoch. If the store implementation is incapable of tracking time, it should return
None. Read moreReturns the note tag records that the client is interested in.
Returns the unique note tags (without source) that the client is interested in.
Source§fn add_note_tag<'life0, 'async_trait>(
&'life0 self,
tag: NoteTagRecord,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_note_tag<'life0, 'async_trait>(
&'life0 self,
tag: NoteTagRecord,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Adds a note tag to the list of tags that the client is interested in. Read more
Source§fn remove_note_tag<'life0, 'async_trait>(
&'life0 self,
tag: NoteTagRecord,
) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_note_tag<'life0, 'async_trait>(
&'life0 self,
tag: NoteTagRecord,
) -> Pin<Box<dyn Future<Output = Result<usize, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes a note tag from the list of tags that the client is interested in. Read more
Source§fn get_sync_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockNumber, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_sync_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockNumber, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the block number of the last state sync block.
Source§fn apply_state_sync<'life0, 'async_trait>(
&'life0 self,
state_sync_update: StateSyncUpdate,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_state_sync<'life0, 'async_trait>(
&'life0 self,
state_sync_update: StateSyncUpdate,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Applies the state sync update to the store. An update involves: Read more
Source§fn get_transactions<'life0, 'async_trait>(
&'life0 self,
transaction_filter: TransactionFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
transaction_filter: TransactionFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves stored transactions, filtered by
TransactionFilter.Source§fn apply_transaction<'life0, 'async_trait>(
&'life0 self,
tx_update: TransactionStoreUpdate,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_transaction<'life0, 'async_trait>(
&'life0 self,
tx_update: TransactionStoreUpdate,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Applies a transaction, atomically updating the current state based on the
TransactionStoreUpdate. Read moreSource§fn get_input_notes<'life0, 'async_trait>(
&'life0 self,
filter: NoteFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<InputNoteRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_input_notes<'life0, 'async_trait>(
&'life0 self,
filter: NoteFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<InputNoteRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the input notes from the store.
Source§fn get_output_notes<'life0, 'async_trait>(
&'life0 self,
note_filter: NoteFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutputNoteRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_output_notes<'life0, 'async_trait>(
&'life0 self,
note_filter: NoteFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutputNoteRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the output notes from the store.
Source§fn upsert_input_notes<'life0, 'life1, 'async_trait>(
&'life0 self,
notes: &'life1 [InputNoteRecord],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_input_notes<'life0, 'life1, 'async_trait>(
&'life0 self,
notes: &'life1 [InputNoteRecord],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts the provided input notes into the database. If a note with the same ID already
exists, it will be replaced.
Source§fn get_note_script<'life0, 'async_trait>(
&'life0 self,
script_root: Word,
) -> Pin<Box<dyn Future<Output = Result<NoteScript, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_note_script<'life0, 'async_trait>(
&'life0 self,
script_root: Word,
) -> Pin<Box<dyn Future<Output = Result<NoteScript, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the note script associated with the given root.
Source§fn upsert_note_scripts<'life0, 'life1, 'async_trait>(
&'life0 self,
note_scripts: &'life1 [NoteScript],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upsert_note_scripts<'life0, 'life1, 'async_trait>(
&'life0 self,
note_scripts: &'life1 [NoteScript],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts the provided note scripts into the database. If a script with the same root already
exists, it will be replaced.
Source§fn insert_block_header<'life0, 'life1, 'async_trait>(
&'life0 self,
block_header: &'life1 BlockHeader,
partial_blockchain_peaks: MmrPeaks,
has_client_notes: bool,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_block_header<'life0, 'life1, 'async_trait>(
&'life0 self,
block_header: &'life1 BlockHeader,
partial_blockchain_peaks: MmrPeaks,
has_client_notes: bool,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts a block header into the store, alongside peaks information at the block’s height. Read more
Source§fn prune_irrelevant_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prune_irrelevant_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes block headers that do not contain any client notes and aren’t the genesis or last
block.
Source§fn get_block_headers<'life0, 'life1, 'async_trait>(
&'life0 self,
block_numbers: &'life1 BTreeSet<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(BlockHeader, BlockRelevance)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_headers<'life0, 'life1, 'async_trait>(
&'life0 self,
block_numbers: &'life1 BTreeSet<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(BlockHeader, BlockRelevance)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves a vector of
BlockHeaders filtered by the provided block numbers. Read moreSource§fn get_tracked_block_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHeader>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tracked_block_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockHeader>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a list of
BlockHeader that include relevant notes to the client.Source§fn get_partial_blockchain_nodes<'life0, 'async_trait>(
&'life0 self,
filter: PartialBlockchainFilter,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<InOrderIndex, Word>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_partial_blockchain_nodes<'life0, 'async_trait>(
&'life0 self,
filter: PartialBlockchainFilter,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<InOrderIndex, Word>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves all MMR authentication nodes based on
PartialBlockchainFilter.Source§fn insert_partial_blockchain_nodes<'life0, 'life1, 'async_trait>(
&'life0 self,
nodes: &'life1 [(InOrderIndex, Word)],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_partial_blockchain_nodes<'life0, 'life1, 'async_trait>(
&'life0 self,
nodes: &'life1 [(InOrderIndex, Word)],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inserts blockchain MMR authentication nodes. Read more
Source§fn get_partial_blockchain_peaks_by_block_num<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<MmrPeaks, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_partial_blockchain_peaks_by_block_num<'life0, 'async_trait>(
&'life0 self,
block_num: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<MmrPeaks, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns peaks information from the blockchain by a specific block number. Read more
Source§fn insert_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 Account,
initial_address: Address,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 Account,
initial_address: Address,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn update_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 Account,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_account<'life0, 'life1, 'async_trait>(
&'life0 self,
account: &'life1 Account,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_account_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AccountId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AccountId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the account IDs of all accounts stored in the database.
Source§fn get_account_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(AccountHeader, AccountStatus)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(AccountHeader, AccountStatus)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a list of
AccountHeader of all accounts stored in the database along with their
statuses. Read moreSource§fn get_account_header<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<Option<(AccountHeader, AccountStatus)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_header<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<Option<(AccountHeader, AccountStatus)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves an
AccountHeader object for the specified AccountId along with its status.
Returns None if the account is not found. Read moreSource§fn get_account_header_by_commitment<'life0, 'async_trait>(
&'life0 self,
account_commitment: Word,
) -> Pin<Box<dyn Future<Output = Result<Option<AccountHeader>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_header_by_commitment<'life0, 'async_trait>(
&'life0 self,
account_commitment: Word,
) -> Pin<Box<dyn Future<Output = Result<Option<AccountHeader>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns an
AccountHeader corresponding to the stored account state that matches the
given commitment. If no account state matches the provided commitment, None is returned.Source§fn get_account<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<Option<AccountRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<Option<AccountRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a full
AccountRecord object, this contains the account’s latest state along
with its status. Returns None if the account is not found.Source§fn upsert_foreign_account_code<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
code: AccountCode,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_foreign_account_code<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
code: AccountCode,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upserts the account code for a foreign account. This value will be used as a cache of known
script roots and added to the
GetForeignAccountCode request.Source§fn get_foreign_account_code<'life0, 'async_trait>(
&'life0 self,
account_ids: Vec<AccountId>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<AccountId, AccountCode>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_foreign_account_code<'life0, 'async_trait>(
&'life0 self,
account_ids: Vec<AccountId>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<AccountId, AccountCode>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the cached account code for various foreign accounts.
Source§fn set_setting<'life0, 'async_trait>(
&'life0 self,
key: String,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_setting<'life0, 'async_trait>(
&'life0 self,
key: String,
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Adds a value to the
settings table.Source§fn get_setting<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_setting<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a value from the
settings table.Source§fn remove_setting<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_setting<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes a value from the
settings table.Source§fn list_setting_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_setting_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all the keys from the
settings table.Source§fn get_unspent_input_note_nullifiers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Nullifier>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_unspent_input_note_nullifiers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Nullifier>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the nullifiers of all unspent input notes. Read more
Source§fn get_account_vault<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AssetVault, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_vault<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AssetVault, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the asset vault for a specific account.
Source§fn get_account_asset<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
faucet_id_prefix: AccountIdPrefix,
) -> Pin<Box<dyn Future<Output = Result<Option<(Asset, AssetWitness)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_asset<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
faucet_id_prefix: AccountIdPrefix,
) -> Pin<Box<dyn Future<Output = Result<Option<(Asset, AssetWitness)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a specific asset from the account’s vault along with its Merkle witness. Read more
Source§fn get_account_storage<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AccountStorage, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_storage<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<AccountStorage, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the storage for a specific account.
Source§fn get_account_map_item<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
index: u8,
key: Word,
) -> Pin<Box<dyn Future<Output = Result<(Word, StorageMapWitness), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account_map_item<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
index: u8,
key: Word,
) -> Pin<Box<dyn Future<Output = Result<(Word, StorageMapWitness), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a specific item from the account’s storage map along with its Merkle proof. Read more
Source§fn get_addresses_by_account_id<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_addresses_by_account_id<'life0, 'async_trait>(
&'life0 self,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves all
Address objects that correspond to the provided account ID.Source§fn insert_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn remove_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
account_id: AccountId,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_block_header_by_num<'life0, 'async_trait>(
&'life0 self,
block_number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<(BlockHeader, BlockRelevance)>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_header_by_num<'life0, 'async_trait>(
&'life0 self,
block_number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<(BlockHeader, BlockRelevance)>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Retrieves a
BlockHeader corresponding to the provided block number and a boolean value
that represents whether the block contains notes relevant to the client. Returns None if
the block is not found. Read moreSource§fn get_note_transport_cursor<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NoteTransportCursor, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_note_transport_cursor<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NoteTransportCursor, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Gets the note transport cursor. Read more
Source§fn update_note_transport_cursor<'life0, 'async_trait>(
&'life0 self,
cursor: NoteTransportCursor,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn update_note_transport_cursor<'life0, 'async_trait>(
&'life0 self,
cursor: NoteTransportCursor,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Updates the note transport cursor. Read more
Source§fn get_current_partial_mmr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PartialMmr, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_current_partial_mmr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PartialMmr, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Builds the current view of the chain’s
PartialMmr. Because we want to add all new
authentication nodes that could come from applying the MMR updates, we need to track all
known leaves thus far. Read moreAuto Trait Implementations§
impl Freeze for SqliteStore
impl !RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl !UnwindSafe for SqliteStore
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 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>
Wrap the input message
T in a tonic::RequestSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Set the foreground color generically Read more
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Set the background color generically. Read more
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Change the foreground color to black
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Change the background color to black
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Change the foreground color to red
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Change the background color to red
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Change the foreground color to green
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Change the background color to green
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Change the foreground color to yellow
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Change the background color to yellow
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Change the foreground color to blue
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Change the background color to blue
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Change the foreground color to magenta
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to magenta
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Change the foreground color to purple
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Change the background color to purple
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Change the foreground color to cyan
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Change the background color to cyan
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Change the foreground color to white
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Change the background color to white
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Change the foreground color to the terminal default
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Change the background color to the terminal default
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Change the foreground color to bright black
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Change the background color to bright black
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Change the foreground color to bright red
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Change the background color to bright red
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Change the foreground color to bright green
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Change the background color to bright green
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Change the foreground color to bright yellow
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Change the background color to bright yellow
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Change the foreground color to bright blue
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Change the background color to bright blue
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright magenta
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright magenta
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Change the foreground color to bright purple
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Change the background color to bright purple
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Change the foreground color to bright cyan
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Change the background color to bright cyan
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Change the foreground color to bright white
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Change the background color to bright white
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Make the text bold
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Make the text dim
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Make the text italicized
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Make the text underlined
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Make the text blink
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Make the text blink (but fast!)
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Swap the foreground and background colors
Hide the text
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Cross out the text
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
Set the foreground color at runtime. Only use if you do not know which color will be used at
compile-time. If the color is constant, use either
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
Set the background color at runtime. Only use if you do not know what color to use at
compile-time. If the color is constant, use either
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the background color to a specific RGB value.
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Sets the foreground color to an RGB value.
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.