mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-19 20:15:48 +01:00
refactor(cdk-redb): feature gate mint and wallet
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
[language-server.rust-analyzer.config]
|
||||
cargo = { features = [ "wallet", "mint", "redb" ] }
|
||||
cargo = { features = [ "wallet", "mint", "redb", "all-nuts" ] }
|
||||
|
||||
@@ -8,10 +8,14 @@ repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[features]
|
||||
default = ["mint", "wallet"]
|
||||
mint = ["cdk/mint"]
|
||||
wallet = ["cdk/wallet"]
|
||||
|
||||
[dependencies]
|
||||
async-trait.workspace = true
|
||||
cdk.workspace = true
|
||||
cdk = { workspace = true, default-features = false }
|
||||
redb = "2.0.0"
|
||||
tokio.workspace = true
|
||||
thiserror.workspace = true
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
pub mod mint_redb;
|
||||
pub mod wallet_redb;
|
||||
#[cfg(feature = "mint")]
|
||||
pub mod mint;
|
||||
#[cfg(feature = "wallet")]
|
||||
pub mod wallet;
|
||||
|
||||
pub use mint_redb::MintRedbDatabase;
|
||||
pub use wallet_redb::RedbWalletDatabase;
|
||||
#[cfg(feature = "mint")]
|
||||
pub use mint::MintRedbDatabase;
|
||||
#[cfg(feature = "wallet")]
|
||||
pub use wallet::RedbWalletDatabase;
|
||||
|
||||
@@ -13,7 +13,9 @@ use crate::secret::Secret;
|
||||
use crate::types::{MeltQuote, MintQuote};
|
||||
use crate::url::UncheckedUrl;
|
||||
|
||||
#[cfg(feature = "mint")]
|
||||
pub mod mint_memory;
|
||||
#[cfg(feature = "wallet")]
|
||||
pub mod wallet_memory;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
||||
Reference in New Issue
Block a user