Cargo.toml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. cdk-http-client.workspace = true
  73. # Tor dependencies (optional; enabled by feature "tor")
  74. hyper = { version = "0.14", optional = true, features = ["client", "http1", "http2"] }
  75. http = { version = "0.2", optional = true }
  76. arti-client = { version = "0.19.0", optional = true, default-features = false, features = ["tokio", "rustls"] }
  77. arti-hyper = { version = "0.19.0", optional = true }
  78. rustls = { workspace = true, optional = true }
  79. tor-rtcompat = { version = "0.19.0", optional = true, features = ["tokio", "rustls"] }
  80. tls-api = { version = "0.9", optional = true }
  81. tls-api-native-tls = { version = "0.9", optional = true }
  82. [target.'cfg(target_arch = "wasm32")'.dependencies]
  83. tokio = { workspace = true, features = ["rt", "macros", "sync", "time"] }
  84. cdk-signatory = { workspace = true, default-features = false }
  85. getrandom = { version = "0.2", features = ["js"] }
  86. ring = { version = "0.17.14", features = ["wasm32_unknown_unknown_js"] }
  87. rustls = { workspace = true, optional = true }
  88. uuid = { workspace = true, features = ["js"] }
  89. gloo-timers = { version = "0.3", features = ["futures"] }
  90. [[example]]
  91. name = "mint-token"
  92. required-features = ["wallet"]
  93. [[example]]
  94. name = "melt-token"
  95. required-features = ["wallet"]
  96. [[example]]
  97. name = "p2pk"
  98. required-features = ["wallet"]
  99. [[example]]
  100. name = "wallet"
  101. required-features = ["wallet"]
  102. [[example]]
  103. name = "proof-selection"
  104. required-features = ["wallet"]
  105. [[example]]
  106. name = "auth_wallet"
  107. required-features = ["wallet", "auth"]
  108. [[example]]
  109. name = "bip353"
  110. required-features = ["wallet", "bip353"]
  111. [[example]]
  112. name = "mint-token-bolt12-with-stream"
  113. required-features = ["wallet"]
  114. [[example]]
  115. name = "mint-token-bolt12-with-custom-http"
  116. required-features = ["wallet"]
  117. [[example]]
  118. name = "mint-token-bolt12"
  119. required-features = ["wallet"]
  120. [[example]]
  121. name = "human_readable_payment"
  122. required-features = ["wallet", "bip353"]
  123. [[example]]
  124. name = "payment_request"
  125. required-features = ["wallet", "nostr"]
  126. [[example]]
  127. name = "nostr_backup"
  128. required-features = ["wallet", "nostr"]
  129. [[example]]
  130. name = "token-proofs"
  131. required-features = ["wallet"]
  132. [[example]]
  133. name = "npubcash"
  134. required-features = ["npubcash"]
  135. [[example]]
  136. name = "multimint-npubcash"
  137. required-features = ["npubcash"]
  138. [[example]]
  139. name = "configure_wallet"
  140. required-features = ["wallet"]
  141. [dev-dependencies]
  142. rand.workspace = true
  143. cdk-sqlite.workspace = true
  144. cdk-fake-wallet.workspace = true
  145. bip39.workspace = true
  146. tracing-subscriber.workspace = true
  147. criterion.workspace = true
  148. anyhow.workspace = true
  149. ureq = { version = "3.1.0", features = ["json"] }
  150. tokio = { workspace = true, features = ["full"] }
  151. [[bench]]
  152. name = "dhke_benchmarks"
  153. harness = false
  154. [lints]
  155. workspace = true