Expand description
Persistence abstractions for Bark wallets.
This module defines the BarkPersister trait and related data models used by the wallet to store and retrieve state. Implementors can provide their own storage backends (e.g., SQLite, PostgreSQL, in-memory, mobile key/value stores) by implementing the BarkPersister trait.
Design goals
- Clear separation between wallet logic and storage.
- Transactional semantics where appropriate (round state transitions, movement recording).
- Portability across different platforms and environments.
Typical usage
- Applications construct a concrete persister (for example, a SQLite-backed client) and pass it to the crate::Wallet. The crate::Wallet only depends on this trait for reads/writes.
- Custom wallet implementations can reuse this trait to remain compatible with Bark storage expectations without depending on a specific database.
- A default rusqlite implementation is provided by sqlite::SqliteClient.
Modules§
Structs§
- Round
State Id - Identifier for a stored RoundState.
- Stored
Round State
Traits§
- Bark
Persister - Storage interface for Bark wallets.