Files
cdk/crates/cdk-common/Cargo.toml
Cesar Rodas abdde307c6 Fix race conditions with proof state updates.
Add a strict set of updates to prevent incorrect state changes and correct
usage. Supporting the transaction at the trait level prevented some cases, but
having a strict set of state change flows is better.

This bug was found while developing the signatory. The keys are read from
memory, triggering race conditions at the database, and some `Pending` states
are selected (instead of just selecting `Unspent`).

This PR also introduces a set of generic database tests to be executed for all
database implementations, this test suite will make sure writing and
maintaining new database drivers
2025-04-19 18:15:42 -03:00

46 lines
1.2 KiB
TOML

[package]
name = "cdk-common"
version.workspace = true
authors = ["CDK Developers"]
description = "CDK common types and traits"
homepage = "https://github.com/cashubtc/cdk"
repository = "https://github.com/cashubtc/cdk.git"
edition.workspace = true
rust-version.workspace = true # MSRV
license.workspace = true
readme = "README.md"
[features]
default = ["mint", "wallet"]
swagger = ["dep:utoipa", "cashu/swagger"]
test = []
bench = []
wallet = ["cashu/wallet"]
mint = ["cashu/mint", "dep:uuid"]
auth = ["cashu/auth"]
[dependencies]
async-trait.workspace = true
bitcoin.workspace = true
cashu.workspace = true
cbor-diag.workspace = true
ciborium.workspace = true
serde.workspace = true
lightning-invoice.workspace = true
thiserror.workspace = true
tracing.workspace = true
url.workspace = true
uuid = { workspace = true, optional = true }
utoipa = { workspace = true, optional = true }
futures.workspace = true
anyhow.workspace = true
serde_json.workspace = true
serde_with.workspace = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
instant = { workspace = true, features = ["wasm-bindgen", "inaccurate"] }
[dev-dependencies]
rand.workspace = true
bip39.workspace = true