Expand description
Encrypted on-device storage primitives for WalletKit.
The crate provides building blocks shared by walletkit-core::storage and
sibling SDKs (e.g. OrbKit’s OrbPcpStore):
Connection,Transaction,Statement,cipher— encryptedSQLite(sqlite3mc) wrapper with safe Rust types.Vault— encrypted-database wrapper around a caller-supplied schema, exposing the underlyingConnection.blobs— content-addressed blob storage (ensure_schema,put,get),ContentId, andcompute_content_id.init_or_open_envelope_key— sealed intermediate key persisted viaAtomicBlobStore.Lock/LockGuard— cross-process exclusive lock (flock/LockFileExnative, no-op on WASM).Keystore/AtomicBlobStore— plain-Rust trait surface for consumer-supplied platform integrations. Consumers that need FFI define their own annotated traits and adapt to these.
Consumers own their schemas, FFI surfaces, and storage policy on top of these primitives.
Re-exports§
pub use blobs::compute_content_id;pub use blobs::ContentId;
Modules§
- blobs
- Content-addressed blob storage shared across consumer vaults.
- cipher
sqlite3mcencryption configuration.
Macros§
- params
- Convenience macro for building parameter lists.
Structs§
- Connection
- A
SQLitedatabase connection. - DbError
- Error returned by database operations.
- Lock
- File-backed cross-process exclusive lock. See the module docs for what it’s for (and what it isn’t).
- Lock
Guard - Guard that holds an exclusive lock for its lifetime.
- Row
- A guard that represents the current row for a statement.
- Statement
- A prepared
SQLitestatement. - Transaction
- An open database transaction.
- Vault
- Open encrypted database wrapper.
Enums§
- Step
Result - Result of a single
sqlite3_stepcall. - Store
Error - Errors raised by the storage primitives (vault, blobs, envelope, lock).
- Value
- A value that can be bound to a prepared statement parameter or read from a result column.
Traits§
- Atomic
Blob Store - Atomic blob store for small binary files (e.g. sealed key envelopes).
- Keystore
- Device keystore for sealing and opening secrets under a device-bound key.
Functions§
- init_
or_ open_ envelope_ key - Initialize or open the envelope-sealed intermediate key.
Type Aliases§
- DbResult
- Result alias for
Error. - Store
Result - Result alias for
StoreError.