pub trait ZeldStore {
// Required methods
fn get(&mut self, key: &UtxoKey) -> Amount;
fn pop(&mut self, key: &UtxoKey) -> Amount;
fn set(&mut self, key: UtxoKey, value: Amount);
}Expand description
Abstraction over the persistence layer used by ZeldProtocol.
Any backend that can read and write ZELD balances using the provided key can be used. Higher-level lifecycle management (transactions, staging, etc.) is left to concrete implementations.
Required Methods§
Sourcefn get(&mut self, key: &UtxoKey) -> Amount
fn get(&mut self, key: &UtxoKey) -> Amount
Fetches the ZELD balance attached to a given UTXO key.