feat(cdk): add generic key-value store functionality for mint databases (#1022)

* feat(cdk): add generic key-value store functionality for mint databases

Implements a comprehensive KV store system with transaction support,
namespace-based organization, and validation for mint databases.

- Add KVStoreDatabase and KVStoreTransaction traits for generic storage
- Include namespace and key validation with ASCII character restrictions
- Add database migrations for kv_store table in SQLite and PostgreSQL
- Implement comprehensive test suite for KV store functionality
- Integrate KV store traits into existing Database and Transaction bounds
This commit is contained in:
thesimplekid
2025-09-05 13:58:48 +01:00
committed by GitHub
parent ce3d25dfb9
commit c6cff3f6f4
15 changed files with 796 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
#[cfg(feature = "fake")]
use std::collections::{HashMap, HashSet};
use std::collections::HashSet;
use std::env;
use std::path::PathBuf;
#[cfg(any(feature = "cln", feature = "lnd", feature = "fake"))]
@@ -110,6 +110,9 @@ async fn main() -> anyhow::Result<()> {
}
#[cfg(feature = "fake")]
"FAKEWALLET" => {
use std::collections::HashMap;
use std::sync::Arc;
let fee_reserve = FeeReserve {
min_fee_reserve: 1.into(),
percent_fee_reserve: 0.0,