mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-30 10:15:40 +01:00
* feat(cdk-integration-tests): refactor regtest setup and mintd integration - Replace shell-based regtest setup with Rust binary (start_regtest_mints) - Add cdk-mintd crate to workspace and integration tests - Improve environment variable handling for test configurations - Update integration tests to use proper temp directory management - Remove deprecated start_regtest.rs binary - Enhance CLN client connection with retry logic - Simplify regtest shell script (itests.sh) to use new binary - Fix tracing filters and improve error handling in setup - Update dependencies and configurations for integration tests fix: killing chore: comment tests for ci debugging chore: compile Revert "chore: comment tests for ci debugging" This reverts commit bfc594c11cf37caeaa6445cb854ae5567d2da6bd. * chore: sql cipher * fix: removal of sqlite cipher * fix: auth password * refactor(cdk-mintd): improve database password handling and function signatures - Pass database password as parameter instead of parsing CLI args in setup_database - Update function signatures for run_mintd and run_mintd_with_shutdown to accept db_password - Remove direct CLI parsing from database setup logic - Fix auth database initialization to use correct type when sqlcipher feature enabled
43 lines
1.0 KiB
Rust
43 lines
1.0 KiB
Rust
//! CDK MINTD
|
|
#![warn(missing_docs)]
|
|
#![warn(rustdoc::bare_urls)]
|
|
|
|
// Ensure at least one lightning backend is enabled at compile time
|
|
#[cfg(not(any(
|
|
feature = "cln",
|
|
feature = "lnbits",
|
|
feature = "lnd",
|
|
feature = "fakewallet",
|
|
feature = "grpc-processor"
|
|
)))]
|
|
compile_error!(
|
|
"At least one lightning backend feature must be enabled: cln, lnbits, lnd, fakewallet, or grpc-processor"
|
|
);
|
|
|
|
use anyhow::Result;
|
|
use cdk_mintd::cli::CLIArgs;
|
|
use cdk_mintd::{get_work_directory, load_settings, setup_tracing};
|
|
use clap::Parser;
|
|
use tokio::main;
|
|
|
|
#[main]
|
|
async fn main() -> Result<()> {
|
|
let args = CLIArgs::parse();
|
|
|
|
if args.enable_logging {
|
|
setup_tracing();
|
|
}
|
|
|
|
let work_dir = get_work_directory(&args).await?;
|
|
|
|
let settings = load_settings(&work_dir, args.config)?;
|
|
|
|
#[cfg(feature = "sqlcipher")]
|
|
let password = Some(CLIArgs::parse().password);
|
|
|
|
#[cfg(not(feature = "sqlcipher"))]
|
|
let password = None;
|
|
|
|
cdk_mintd::run_mintd(&work_dir, &settings, password).await
|
|
}
|