Cargo.toml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. [package]
  2. name = "cdk"
  3. version.workspace = true
  4. edition.workspace = true
  5. authors = ["CDK Developers"]
  6. description = "Core Cashu Development Kit library implementing the Cashu protocol"
  7. homepage = "https://github.com/cashubtc/cdk"
  8. repository = "https://github.com/cashubtc/cdk.git"
  9. rust-version.workspace = true # MSRV
  10. license.workspace = true
  11. [features]
  12. default = ["mint", "wallet", "auth", "nostr", "bip353"]
  13. wallet = ["dep:futures", "cdk-common/wallet", "cdk-common/http", "dep:rustls"]
  14. nostr = ["wallet", "dep:nostr-sdk", "cdk-common/nostr"]
  15. npubcash = ["wallet", "nostr", "dep:cdk-npubcash"]
  16. mint = ["dep:futures", "cdk-common/mint", "cdk-common/http", "cdk-signatory"]
  17. auth = ["dep:jsonwebtoken", "cdk-common/auth", "cdk-common/auth"]
  18. bip353 = ["dep:hickory-resolver"]
  19. # We do not commit to a MSRV with swagger enabled
  20. swagger = ["mint", "dep:utoipa", "cdk-common/swagger"]
  21. bench = []
  22. http_subscription = []
  23. tor = [
  24. "wallet",
  25. "dep:arti-client",
  26. "dep:arti-hyper",
  27. "dep:hyper",
  28. "dep:http",
  29. "dep:rustls",
  30. "dep:tor-rtcompat",
  31. "dep:tls-api",
  32. "dep:tls-api-native-tls",
  33. ]
  34. prometheus = ["dep:cdk-prometheus"]
  35. [dependencies]
  36. arc-swap = "1.7.1"
  37. cdk-common.workspace = true
  38. cbor-diag.workspace = true
  39. async-trait.workspace = true
  40. anyhow.workspace = true
  41. bitcoin.workspace = true
  42. ciborium.workspace = true
  43. lightning.workspace = true
  44. lightning-invoice.workspace = true
  45. regex.workspace = true
  46. serde.workspace = true
  47. serde_json.workspace = true
  48. serde_with.workspace = true
  49. tracing.workspace = true
  50. thiserror.workspace = true
  51. futures = { workspace = true, optional = true, features = ["alloc"] }
  52. url.workspace = true
  53. utoipa = { workspace = true, optional = true }
  54. uuid.workspace = true
  55. jsonwebtoken = { workspace = true, optional = true }
  56. nostr-sdk = { workspace = true, optional = true }
  57. cdk-npubcash = { workspace = true, optional = true }
  58. cdk-prometheus = {workspace = true, optional = true}
  59. web-time.workspace = true
  60. zeroize = "1"
  61. tokio-util.workspace = true
  62. [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
  63. hickory-resolver = { version = "0.25.2", optional = true, features = ["dnssec-ring"] }
  64. tokio = { workspace = true, features = [
  65. "rt-multi-thread",
  66. "time",
  67. "macros",
  68. "sync",
  69. ] }
  70. getrandom = { version = "0.2" }
  71. cdk-signatory = { workspace = true, features = ["grpc"], optional = true }
  72. tokio-tungstenite = { workspace = true, features = [
  73. "rustls",
  74. "rustls-tls-native-roots",
  75. "connect"
  76. ] }
  77. # Tor dependencies (optional; enabled by feature "tor")
  78. hyper = { version = "0.14", optional = true, features = ["client", "http1", "http2"] }
  79. http = { version = "0.2", optional = true }
  80. arti-client = { version = "0.19.0", optional = true, default-features = false, features = ["tokio", "rustls"] }
  81. arti-hyper = { version = "0.19.0", optional = true }
  82. rustls = { workspace = true, optional = true }
  83. tor-rtcompat = { version = "0.19.0", optional = true, features = ["tokio", "rustls"] }
  84. tls-api = { version = "0.9", optional = true }
  85. tls-api-native-tls = { version = "0.9", optional = true }
  86. [target.'cfg(target_arch = "wasm32")'.dependencies]
  87. tokio = { workspace = true, features = ["rt", "macros", "sync", "time"] }
  88. cdk-signatory = { workspace = true, default-features = false }
  89. getrandom = { version = "0.2", features = ["js"] }
  90. ring = { version = "0.17.14", features = ["wasm32_unknown_unknown_js"] }
  91. rustls = { workspace = true, optional = true }
  92. uuid = { workspace = true, features = ["js"] }
  93. gloo-timers = { version = "0.3", features = ["futures"] }
  94. [[example]]
  95. name = "mint-token"
  96. required-features = ["wallet"]
  97. [[example]]
  98. name = "melt-token"
  99. required-features = ["wallet"]
  100. [[example]]
  101. name = "p2pk"
  102. required-features = ["wallet"]
  103. [[example]]
  104. name = "wallet"
  105. required-features = ["wallet"]
  106. [[example]]
  107. name = "proof-selection"
  108. required-features = ["wallet"]
  109. [[example]]
  110. name = "auth_wallet"
  111. required-features = ["wallet", "auth"]
  112. [[example]]
  113. name = "bip353"
  114. required-features = ["wallet", "bip353"]
  115. [[example]]
  116. name = "mint-token-bolt12-with-stream"
  117. required-features = ["wallet"]
  118. [[example]]
  119. name = "mint-token-bolt12-with-custom-http"
  120. required-features = ["wallet"]
  121. [[example]]
  122. name = "mint-token-bolt12"
  123. required-features = ["wallet"]
  124. [[example]]
  125. name = "human_readable_payment"
  126. required-features = ["wallet", "bip353"]
  127. [[example]]
  128. name = "payment_request"
  129. required-features = ["wallet", "nostr"]
  130. [[example]]
  131. name = "nostr_backup"
  132. required-features = ["wallet", "nostr"]
  133. [[example]]
  134. name = "token-proofs"
  135. required-features = ["wallet"]
  136. [[example]]
  137. name = "npubcash"
  138. required-features = ["npubcash"]
  139. [[example]]
  140. name = "multimint-npubcash"
  141. required-features = ["npubcash"]
  142. [[example]]
  143. name = "configure_wallet"
  144. required-features = ["wallet"]
  145. [dev-dependencies]
  146. rand.workspace = true
  147. cdk-sqlite.workspace = true
  148. cdk-fake-wallet.workspace = true
  149. bip39.workspace = true
  150. tracing-subscriber.workspace = true
  151. criterion.workspace = true
  152. anyhow.workspace = true
  153. ureq = { version = "3.1.0", features = ["json"] }
  154. tokio = { workspace = true, features = ["full"] }
  155. [[bench]]
  156. name = "dhke_benchmarks"
  157. harness = false
  158. [lints]
  159. workspace = true