From 151bb6d17eb756456fe47408e364da7b821315b6 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Tue, 8 Oct 2024 12:39:02 -0700 Subject: [PATCH 01/15] feat: finish updating multimint, start on clientd --- Cargo.lock | 1161 +++++++++-------- Cargo.toml | 17 +- fedimint-clientd/Cargo.toml | 4 +- .../src/router/handlers/admin/info.rs | 6 +- .../router/handlers/onchain/await_deposit.rs | 16 +- .../handlers/onchain/deposit_address.rs | 9 +- multimint/Cargo.toml | 1 + multimint/src/client.rs | 42 +- multimint/src/db.rs | 2 +- multimint/src/lib.rs | 6 +- multimint/src/types.rs | 4 +- 11 files changed, 647 insertions(+), 621 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c7e671..9086d91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.5.2" @@ -38,12 +44,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" - [[package]] name = "ahash" version = "0.8.11" @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" @@ -143,9 +143,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "aquamarine" @@ -201,9 +201,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ "event-listener", "event-listener-strategy", @@ -212,9 +212,9 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", @@ -281,7 +281,7 @@ dependencies = [ "tokio-tungstenite", "url", "wasm-ws", - "webpki-roots 0.26.1", + "webpki-roots 0.26.6", ] [[package]] @@ -417,9 +417,9 @@ dependencies = [ [[package]] name = "backon" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c491fa80d69c03084223a4e73c378dd9f9a1e612eb54051213f88b2d5249b458" +checksum = "d67782c3f868daa71d3533538e98a8e13713231969def7536e8039606fc46bf0" dependencies = [ "fastrand", "futures-core", @@ -429,19 +429,25 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.8.0", "object", "rustc-demangle", + "windows-targets 0.52.6", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -456,17 +462,17 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "base64-compat" -version = "1.0.0" +name = "base64-url" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8d4d2746f89841e49230dd26917df1876050f95abafafbe34f47cb534b88d7" +checksum = "38e2b6c78c06f7288d5e3c3d683bde35a79531127c83b087e5d0d77c974b4b28" dependencies = [ - "byteorder", + "base64 0.22.1", ] [[package]] @@ -488,13 +494,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea" [[package]] -name = "beef" -version = "0.5.2" +name = "bech32" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" -dependencies = [ - "serde", -] +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" [[package]] name = "bincode" @@ -520,7 +523,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "shlex", "syn 2.0.60", ] @@ -550,8 +553,6 @@ checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" dependencies = [ "bech32 0.9.1", "bitcoin_hashes 0.11.0", - "core2", - "hashbrown 0.8.2", "secp256k1 0.24.3", "serde", ] @@ -565,6 +566,7 @@ dependencies = [ "bech32 0.9.1", "bitcoin-private", "bitcoin_hashes 0.12.0", + "core2", "hex_lit", "secp256k1 0.27.0", "serde", @@ -577,7 +579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c85783c2fe40083ea54a33aa2f0ba58831d90fcd190f5bdc47e74e84d2a96ae" dependencies = [ "bech32 0.10.0-beta", - "bitcoin-internals", + "bitcoin-internals 0.2.0", "bitcoin_hashes 0.13.0", "hex-conservative", "hex_lit", @@ -585,6 +587,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoin-internals" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f9997f8650dd818369931b5672a18dbef95324d0513aa99aae758de8ce86e5b" + [[package]] name = "bitcoin-internals" version = "0.2.0" @@ -606,7 +614,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" dependencies = [ - "core2", "serde", ] @@ -617,6 +624,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" dependencies = [ "bitcoin-private", + "core2", "serde", ] @@ -626,17 +634,18 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" dependencies = [ - "bitcoin-internals", + "bitcoin-internals 0.2.0", "hex-conservative", "serde", ] [[package]] name = "bitcoincore-rpc" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0261b2bb7617e0c91b452a837bbd1291fd34ad6990cb8e3ffc28239cc045b5ca" +checksum = "9d6c0ee9354e3dac217db4cb1dd31941073a87fe53c86bcf3eb2b8bc97f00a08" dependencies = [ + "bitcoin-private", "bitcoincore-rpc-json", "jsonrpc", "log", @@ -646,11 +655,12 @@ dependencies = [ [[package]] name = "bitcoincore-rpc-json" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c231bea28e314879c5aef240f6052e8a72a369e3c9f9b20d9bfbb33ad18029b2" +checksum = "d30ce6f40fb0a2e8d98522796219282504b7a4b14e2b4c26139a7bea6aec6586" dependencies = [ - "bitcoin 0.29.2", + "bitcoin 0.30.2", + "bitcoin-private", "serde", "serde_json", ] @@ -697,16 +707,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", + "digest", ] [[package]] @@ -729,9 +730,9 @@ dependencies = [ [[package]] name = "bls12_381" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c196a77437e7cc2fb515ce413a6401291578b5afc8ecb29a3c7ab957f05941" +checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" dependencies = [ "ff", "group", @@ -889,7 +890,7 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -933,19 +934,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", - "clap_derive 4.5.4", + "clap_derive 4.5.18", ] [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -968,9 +969,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1099,41 +1100,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "darling" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 2.0.60", -] - -[[package]] -name = "darling_macro" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.60", -] - [[package]] name = "data-encoding" version = "2.5.0" @@ -1149,22 +1115,13 @@ dependencies = [ "powerfmt", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -1183,9 +1140,9 @@ checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "email_address" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" +checksum = "c1019fa28f600f5b581b7a603d515c3f1635da041ca211b5055804788673abfe" dependencies = [ "serde", ] @@ -1216,11 +1173,12 @@ dependencies = [ [[package]] name = "esplora-client" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e11244e7fd8b0beee0a3c62137c4bd9f756fe2c492ccf93171f81467b59200" +checksum = "0cb1f7f2489cce83bc3bd92784f9ba5271eeb6e729b975895fc541f78cbfcdca" dependencies = [ - "bitcoin 0.29.2", + "bitcoin 0.30.2", + "bitcoin-internals 0.1.0", "log", "reqwest 0.11.27", "serde", @@ -1228,9 +1186,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1239,9 +1197,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ "event-listener", "pin-project-lite", @@ -1257,7 +1215,7 @@ dependencies = [ "flume", "half", "lebe", - "miniz_oxide", + "miniz_oxide 0.7.2", "rayon-core", "smallvec", "zune-inflate", @@ -1286,32 +1244,65 @@ checksum = "8d79878f18e518d77cfb3126939d0e63a62cad845d51a3266f4ac866f2efe57f" [[package]] name = "fedimint-aead" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a7352d1fd9a0af4a7225c1464eae5c68349f7b7f5881109fcd0a82aae5193" +checksum = "b8d8694828a5f211d9f42dd513d47a29464027666c0610a46b06745f91fb9270" dependencies = [ "anyhow", "argon2", "hex", "rand", - "ring 0.17.8", + "ring", +] + +[[package]] +name = "fedimint-api-client" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f1d8da66838e5193940679995c6eb42298969cfba310913598c65dc705ee38c" +dependencies = [ + "anyhow", + "async-lock", + "async-trait", + "base64 0.22.1", + "bitcoin 0.30.2", + "fedimint-core", + "fedimint-logging", + "futures", + "getrandom", + "gloo-timers 0.3.0", + "itertools 0.12.1", + "js-sys", + "jsonrpsee-core", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", + "lru", + "rustls-pki-types", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-rustls 0.26.0", + "tracing", + "wasm-bindgen-futures", + "webpki-roots 0.26.6", ] [[package]] name = "fedimint-bitcoind" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649194447c74fb86ea76e4960e908d129e497ae43e041c8449a9e52d5bacdfd7" +checksum = "c962984cbcc89b9fd7a7677bca308bbace0a32cd0465ad577da31b69e294d71b" dependencies = [ "anyhow", "async-trait", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", + "bitcoin 0.30.2", "bitcoincore-rpc", "esplora-client", "fedimint-core", "fedimint-logging", - "lazy_static", + "hex", + "once_cell", "rand", "serde", "serde_json", @@ -1321,26 +1312,26 @@ dependencies = [ [[package]] name = "fedimint-build" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516db55089858e9924651713908a5a09d4a25bc8926599cd1f016a5d5e3a83cb" +checksum = "87dbcb06902f6d2dc7e8c572c3800cc3473b89f088d6b2a63e184e3374f99876" dependencies = [ "serde_json", ] [[package]] name = "fedimint-client" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb8ff9eeccb88cd6c22f88f408c74cf942960914fd9d5c8ac20c40dce21e8471" +checksum = "26ad2e8fcaa29dc90d22d061058d6c1f3a3ec9756f56b4ad163b69d29925d0be" dependencies = [ "anyhow", "aquamarine", "async-stream", "async-trait", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", + "bitcoin 0.30.2", "fedimint-aead", + "fedimint-api-client", "fedimint-build", "fedimint-core", "fedimint-derive-secret", @@ -1348,8 +1339,8 @@ dependencies = [ "futures", "itertools 0.12.1", "rand", - "reqwest 0.12.4", - "ring 0.17.8", + "reqwest 0.12.7", + "ring", "secp256k1-zkp", "serde", "serde_json", @@ -1363,7 +1354,7 @@ dependencies = [ [[package]] name = "fedimint-clientd" -version = "0.3.7" +version = "0.4.0" dependencies = [ "anyhow", "async-utility", @@ -1380,12 +1371,12 @@ dependencies = [ "hex", "itertools 0.12.1", "lazy_static", - "lightning-invoice", - "lnurl-rs", + "lightning-invoice 0.26.0", + "lnurl-rs 0.5.0", "metrics", "metrics-exporter-prometheus", - "multimint 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.12.4", + "multimint", + "reqwest 0.12.7", "serde", "serde_json", "time", @@ -1398,9 +1389,9 @@ dependencies = [ [[package]] name = "fedimint-core" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e400aace8c72004b4aec9ac2fe39da6fe29950e0e0d4ba15b902f9d8232d3a" +checksum = "283161ed55d56159b03bb95a5d2416e794e4a8129fef80911ccfecbc06fd038b" dependencies = [ "anyhow", "async-lock", @@ -1408,16 +1399,17 @@ dependencies = [ "async-trait", "backon", "backtrace", - "bech32 0.9.1", + "base64-url", + "bech32 0.11.0", "bincode", "bitcoin 0.29.2", "bitcoin 0.30.2", - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", "bitvec", + "bls12_381", "erased-serde", "fedimint-derive", "fedimint-logging", - "fedimint-tbs", "fedimint-threshold-crypto", "futures", "futures-util", @@ -1428,25 +1420,23 @@ dependencies = [ "itertools 0.12.1", "js-sys", "jsonrpsee-core", - "jsonrpsee-types", "jsonrpsee-wasm-client", - "jsonrpsee-ws-client", - "lightning", - "lightning-invoice", - "lru", + "lightning 0.0.123", + "lightning-invoice 0.31.0", "macro_rules_attribute", - "miniscript 10.0.0", + "miniscript", "parity-scale-codec", "rand", + "secp256k1 0.27.0", "secp256k1-zkp", "serde", "serde_json", - "sha3", + "serdect", "strum", "strum_macros", "thiserror", "tokio", - "tokio-rustls 0.23.4", + "tokio-rustls 0.24.1", "tracing", "url", "wasm-bindgen-futures", @@ -1454,9 +1444,9 @@ dependencies = [ [[package]] name = "fedimint-derive" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbfdfd19c4d84d45ba29d61503190137029b96958ae41b604e6dfb757229a3e" +checksum = "de94e26512dcff3911300cff08160b49fb1ac09c52079fbd74589c31c9e7be9e" dependencies = [ "itertools 0.12.1", "proc-macro2", @@ -1466,53 +1456,52 @@ dependencies = [ [[package]] name = "fedimint-derive-secret" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3044bb80a63ae920ddb8752aa07a6bfba691d3ad33a52180d6443c1310ce17a3" +checksum = "2e7bfb987dd95d5efadb9e5f1befb76a26e00eadc7cd801b1c045cb0eaf0293e" dependencies = [ "anyhow", + "bitcoin_hashes 0.11.0", + "bls12_381", "fedimint-core", "fedimint-hkdf", - "fedimint-tbs", - "ring 0.17.8", + "ring", "secp256k1-zkp", ] [[package]] name = "fedimint-hkdf" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "580dff8cdd692910a9285fec5dd04767e3c174e2bcc05df9a6c526be9a63c568" +checksum = "e809872368a5c89e1b51207fc5f6ab2722a35036c83b4629f4e54521d765fce2" dependencies = [ - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", ] [[package]] name = "fedimint-ln-client" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9369eb9a3119983d54441637965f938303cec52c2e0ca1fee115ea1f0e7d43" +checksum = "86cc36d08b9c6dd133cf84691992b9f7eb9db41b144a9fd3949c3fb69d29b0f6" dependencies = [ "anyhow", "aquamarine", "async-stream", "async-trait", - "bincode", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", + "bitcoin 0.30.2", "erased-serde", + "fedimint-api-client", "fedimint-client", "fedimint-core", "fedimint-ln-common", "fedimint-logging", - "fedimint-threshold-crypto", "futures", "itertools 0.12.1", - "lightning-invoice", + "lightning-invoice 0.31.0", + "lnurl-rs 0.6.0", "rand", - "reqwest 0.11.27", - "secp256k1 0.24.3", - "secp256k1-zkp", + "reqwest 0.12.7", + "secp256k1 0.27.0", "serde", "serde_json", "strum", @@ -1520,45 +1509,35 @@ dependencies = [ "thiserror", "tokio", "tracing", - "url", ] [[package]] name = "fedimint-ln-common" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9873d144c4781cf8ce3817eb26461e57931bb3d720115756ea9dc2ce2854a295" +checksum = "df7470f844f11dd3421fd03ade1e5fb41f39bbfa7a2bb49e91291de38f687901" dependencies = [ "anyhow", - "aquamarine", - "async-trait", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", - "erased-serde", + "bitcoin 0.30.2", + "bitcoin_hashes 0.12.0", "fedimint-client", "fedimint-core", "fedimint-threshold-crypto", - "futures", - "itertools 0.12.1", - "lightning", - "lightning-invoice", - "rand", - "secp256k1 0.24.3", + "lightning 0.0.123", + "lightning-invoice 0.31.0", + "secp256k1 0.27.0", "serde", "serde-big-array", "serde_json", - "strum", - "strum_macros", "thiserror", "tracing", - "url", ] [[package]] name = "fedimint-logging" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88259f0dae3467f926a665a6251cb1187e525822a512ca5e5c0ec59096f2f6ab" +checksum = "64d117d41c1664ad71b24ed988a3256ce85e473339376a499ea76cb717929f08" dependencies = [ "anyhow", "tracing-subscriber", @@ -1566,18 +1545,22 @@ dependencies = [ [[package]] name = "fedimint-mint-client" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb448bae57068ac705f888bfbc70317db20d6cde0e0f0e34a5c8bee9cdc29af4" +checksum = "fe1410fd14e14ed6a2f7da84d9cbf641459c0254541224aaf4c6466aa395733c" dependencies = [ "anyhow", "aquamarine", "async-stream", "async-trait", - "base64 0.22.0", + "base64 0.22.1", + "base64-url", "bincode", - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", + "bls12_381", + "clap 4.5.20", "erased-serde", + "fedimint-api-client", "fedimint-client", "fedimint-core", "fedimint-derive-secret", @@ -1586,13 +1569,13 @@ dependencies = [ "fedimint-tbs", "fedimint-threshold-crypto", "futures", + "hex", "itertools 0.12.1", - "rand", - "secp256k1 0.24.3", "secp256k1-zkp", "serde", "serde-big-array", "serde_json", + "serdect", "strum", "strum_macros", "thiserror", @@ -1602,44 +1585,36 @@ dependencies = [ [[package]] name = "fedimint-mint-common" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80a76e4ae1785a1065e891a2c70580aa271bfea64e3ad3d23e6bf9beb3f6720f" +checksum = "60ebda87ed7b83e9db34ff554872196bc78722e946ea3e6f0c1eee90d8589792" dependencies = [ "anyhow", - "async-trait", "bincode", - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", "fedimint-core", "fedimint-tbs", - "fedimint-threshold-crypto", - "futures", - "itertools 0.12.1", - "rand", - "secp256k1 0.24.3", "secp256k1-zkp", "serde", - "strum", - "strum_macros", "thiserror", "tracing", ] [[package]] name = "fedimint-nwc" -version = "0.3.7" +version = "0.4.0" dependencies = [ "anyhow", "axum", "axum-macros", "bincode", - "clap 4.5.4", + "clap 4.5.20", "dotenv", "futures-util", "image", "itertools 0.13.0", - "lightning-invoice", - "multimint 0.3.8", + "lightning-invoice 0.26.0", + "multimint", "nostr", "nostr-sdk", "qrcode", @@ -1654,9 +1629,9 @@ dependencies = [ [[package]] name = "fedimint-rocksdb" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e7a84ee0874a56e099d5c681fe933ffcbc60d5b518667ae3d66c4bd449a67a" +checksum = "ea117ca597a284705adc08814cf05a5083edc2df8b0e1ea486d589ef52435c88" dependencies = [ "anyhow", "async-trait", @@ -1669,14 +1644,14 @@ dependencies = [ [[package]] name = "fedimint-tbs" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434d34ac0c3bddd78a0aa832adc1a7bb4630d24fba0397ad9ce371d056d30ba1" +checksum = "4acd4528290ba62c8c2ec9ca86a6a67634190fb994efa816eefdf6889ccfb60c" dependencies = [ - "bitcoin_hashes 0.11.0", "bls12_381", - "ff", + "fedimint-core", "group", + "hex", "rand", "rand_chacha", "serde", @@ -1685,9 +1660,9 @@ dependencies = [ [[package]] name = "fedimint-threshold-crypto" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2930eda59c029045497a7ef03799d01eaba6091a03713bef5366bd79aab423" +checksum = "3e5f0913eb5fb65f83e6b503794f2eba124b542b9bdbb5cf941bc12bc7b0ea67" dependencies = [ "bls12_381", "byteorder", @@ -1707,67 +1682,56 @@ dependencies = [ [[package]] name = "fedimint-wallet-client" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2d2401b417376dffe46c23271e8f90c7a94882f0bc3fa54e96347b7cbd659b" +checksum = "121617f14312fcb245112c5d6cf92c530d7a4157ccc45114e75b4519db8444f6" dependencies = [ "anyhow", "aquamarine", "async-stream", "async-trait", - "bitcoin 0.29.2", + "bitcoin 0.30.2", "erased-serde", + "fedimint-api-client", "fedimint-bitcoind", "fedimint-client", "fedimint-core", + "fedimint-logging", "fedimint-wallet-common", "futures", - "impl-tools", - "miniscript 10.0.0", "rand", - "secp256k1 0.24.3", + "secp256k1 0.27.0", "serde", "serde_json", "strum", "strum_macros", - "thiserror", "tokio", "tracing", - "url", - "validator", ] [[package]] name = "fedimint-wallet-common" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba22ecf52f87d22bf01130900163201131fa1d2d0d1045c1c30ce6efc5e57ede" +checksum = "20aa3af215f49a3c7a8e863874ca69585f5a3b653675efcab2eaf6375a7d10f9" dependencies = [ "anyhow", - "async-trait", - "bitcoin 0.29.2", - "erased-serde", + "bitcoin 0.30.2", "fedimint-core", - "futures", + "hex", "impl-tools", - "miniscript 10.0.0", - "miniscript 9.0.2", - "rand", - "secp256k1 0.24.3", + "miniscript", + "secp256k1 0.27.0", "serde", - "strum", - "strum_macros", "thiserror", "tracing", - "url", - "validator", ] [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "bitvec", "rand_core", @@ -1781,7 +1745,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.7.2", ] [[package]] @@ -1790,7 +1754,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ - "spin 0.9.8", + "spin", ] [[package]] @@ -1925,9 +1889,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1948,9 +1912,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -1960,15 +1924,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo-net" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" dependencies = [ "futures-channel", "futures-core", "futures-sink", "gloo-utils", - "http 0.2.12", + "http 1.1.0", "js-sys", "pin-project", "serde", @@ -2018,9 +1982,9 @@ dependencies = [ [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core", @@ -2039,7 +2003,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -2058,19 +2022,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.8.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "ahash 0.3.8", - "autocfg", -] +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" [[package]] name = "hashbrown" @@ -2078,10 +2038,16 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "heck" version = "0.4.1" @@ -2142,7 +2108,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -2279,19 +2245,20 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.26.0" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", "hyper 1.3.1", "hyper-util", - "rustls 0.22.4", + "rustls 0.23.7", "rustls-pki-types", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tower-service", + "webpki-roots 0.26.6", ] [[package]] @@ -2337,12 +2304,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.5.0" @@ -2388,9 +2349,9 @@ dependencies = [ [[package]] name = "imbl" -version = "2.0.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978d142c8028edf52095703af2fad11d6f611af1246685725d6b850634647085" +checksum = "bc3be8d8cd36f33a46b1849f31f837c44d9fa87223baee3b4bd96b8f11df81eb" dependencies = [ "bitmaps", "imbl-sized-chunks", @@ -2480,12 +2441,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.0", ] [[package]] @@ -2592,53 +2553,51 @@ dependencies = [ [[package]] name = "jsonrpc" -version = "0.12.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f8423b78fc94d12ef1a4a9d13c348c9a78766dda0cc18817adf0faf77e670c8" +checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" dependencies = [ - "base64-compat", + "base64 0.13.1", "serde", - "serde_derive", "serde_json", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.22.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92f254f56af1ae84815b9b1325094743dcf05b92abb5e94da2e81a35cff0cada" +checksum = "d80eccbd47a7b9f1e67663fd846928e941cb49c65236e297dd11c9ea3c5e3387" dependencies = [ + "base64 0.22.1", "futures-channel", "futures-util", "gloo-net", - "http 0.2.12", + "http 1.1.0", "jsonrpsee-core", "pin-project", + "rustls 0.23.7", "rustls-pki-types", "soketto", "thiserror", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-util", "tracing", "url", - "webpki-roots 0.26.1", ] [[package]] name = "jsonrpsee-core" -version = "0.22.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "274d68152c24aa78977243bb56f28d7946e6aa309945b37d33174a3f92d89a3a" +checksum = "3c2709a32915d816a6e8f625bf72cf74523ebe5d8829f895d6b041b1d3137818" dependencies = [ - "anyhow", "async-trait", - "beef", "futures-timer", "futures-util", "jsonrpsee-types", "pin-project", - "rustc-hash", + "rustc-hash 2.0.0", "serde", "serde_json", "thiserror", @@ -2650,12 +2609,11 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.22.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dc828e537868d6b12bbb07ec20324909a22ced6efca0057c825c3e1126b2c6d" +checksum = "1ca331cd7b3fe95b33432825c2d4c9f5a43963e207fdc01ae67f9fd80ab0930f" dependencies = [ - "anyhow", - "beef", + "http 1.1.0", "serde", "serde_json", "thiserror", @@ -2663,9 +2621,9 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.22.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf8dcee48f383e24957e238240f997ec317ba358b4e6d2e8be3f745bcdabdb5" +checksum = "5c603d97578071dc44d79d3cfaf0775437638fd5adc33c6b622dfe4fa2ec812d" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -2674,11 +2632,11 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.22.4" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f00abe918bf34b785f87459b9205790e5361a3f7437adb50e928dc243f27eb" +checksum = "755ca3da1c67671f1fae01cd1a47f41dfb2233a8f19a643e587ab0a663942044" dependencies = [ - "http 0.2.12", + "http 1.1.0", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -2714,9 +2672,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libfuzzer-sys" @@ -2735,9 +2693,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.5", + "windows-targets 0.48.5", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "librocksdb-sys" version = "0.16.0+8.10.0" @@ -2772,8 +2736,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52cec5fa9382154fe9671e8df93095b800c7d77abc66e2a5ef839d672521c5e" dependencies = [ "bitcoin 0.29.2", +] + +[[package]] +name = "lightning" +version = "0.0.123" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd92d4aa159374be430c7590e169b4a6c0fb79018f5bc4ea1bffde536384db3" +dependencies = [ + "bitcoin 0.30.2", "core2", - "hashbrown 0.8.2", + "hashbrown 0.13.2", + "hex-conservative", + "libm", + "possiblyrandom", ] [[package]] @@ -2783,11 +2759,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eb24878b0f4ef75f020976c886d9ad1503867802329cc963e0ab4623ea3b25c" dependencies = [ "bech32 0.9.1", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", - "lightning", - "num-traits", - "secp256k1 0.24.3", + "bitcoin 0.29.2", + "bitcoin_hashes 0.11.0", + "lightning 0.0.118", + "num-traits", + "secp256k1 0.24.3", + "serde", +] + +[[package]] +name = "lightning-invoice" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d07d01cf197bf2184b929b7dc94aa70d935aac6df896c256a3a9475b7e9d40" +dependencies = [ + "bech32 0.9.1", + "bitcoin 0.30.2", + "lightning 0.0.123", + "secp256k1 0.27.0", "serde", ] @@ -2798,7 +2787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02c042191c2e3f27147decfad8182eea2c7dd1c6c1733562e25d3d401369669d" dependencies = [ "bech32 0.10.0-beta", - "reqwest 0.12.4", + "reqwest 0.12.7", "serde", "serde_json", ] @@ -2811,12 +2800,31 @@ checksum = "043935963e3454227165b4daf62e8fdecd6273857e0e6fc00422aea4d9258673" dependencies = [ "aes", "anyhow", - "base64 0.22.0", + "base64 0.22.1", "bech32 0.9.1", "bitcoin 0.30.2", "cbc", "email_address", - "reqwest 0.12.4", + "reqwest 0.12.7", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "lnurl-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f2347f6764fedbb74482d88f472dc3e2c7613304bfea31ce1b7ee8e1ebbf8c" +dependencies = [ + "aes", + "anyhow", + "base64 0.22.1", + "bech32 0.11.0", + "bitcoin 0.30.2", + "cbc", + "email_address", + "reqwest 0.12.7", "serde", "serde_json", "url", @@ -2919,7 +2927,7 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261" dependencies = [ - "ahash 0.8.11", + "ahash", "portable-atomic", ] @@ -2929,8 +2937,8 @@ version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ - "base64 0.22.0", - "indexmap 2.2.6", + "base64 0.22.1", + "indexmap 2.6.0", "metrics", "metrics-util", "quanta", @@ -2974,15 +2982,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniscript" -version = "9.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5b106477a0709e2da253e5559ba4ab20a272f8577f1eefff72f3a905b5d35f5" -dependencies = [ - "bitcoin 0.29.2", -] - [[package]] name = "miniscript" version = "10.0.0" @@ -3005,44 +3004,32 @@ dependencies = [ ] [[package]] -name = "mio" -version = "0.8.11" +name = "miniz_oxide" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", + "adler2", ] [[package]] -name = "multimint" -version = "0.3.8" +name = "mio" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "anyhow", - "fedimint-client", - "fedimint-core", - "fedimint-ln-client", - "fedimint-ln-common", - "fedimint-mint-client", - "fedimint-rocksdb", - "fedimint-wallet-client", - "futures-util", - "hex", - "rand", - "serde", - "serde_json", - "tokio", - "tracing", + "hermit-abi 0.3.9", + "libc", + "wasi", + "windows-sys 0.52.0", ] [[package]] name = "multimint" version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5253bcec7bdd8714fda6b92d5163112dc9371ebd4ae79fb6ad7eed8b1e4bf49" dependencies = [ "anyhow", + "fedimint-api-client", "fedimint-client", "fedimint-core", "fedimint-ln-client", @@ -3105,7 +3092,7 @@ dependencies = [ "js-sys", "negentropy", "once_cell", - "reqwest 0.12.4", + "reqwest 0.12.7", "scrypt", "serde", "serde_json", @@ -3283,9 +3270,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -3316,18 +3303,18 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pairing" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" dependencies = [ "group", ] [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec", @@ -3339,9 +3326,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3401,7 +3388,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest 0.10.7", + "digest", "hmac", ] @@ -3469,7 +3456,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.2", ] [[package]] @@ -3489,6 +3476,15 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d30538d42559de6b034bc76fd6dd4c38961b1ee5c6c56e3808c50128fdbc22ce" +[[package]] +name = "possiblyrandom" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b122a615d72104fb3d8b26523fdf9232cd8ee06949fb37e4ce3ff964d15dffd" +dependencies = [ + "getrandom", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3503,12 +3499,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit 0.22.22", ] [[package]] @@ -3583,6 +3578,54 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" +[[package]] +name = "quinn" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.0.0", + "rustls 0.23.7", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" +dependencies = [ + "bytes", + "rand", + "ring", + "rustc-hash 2.0.0", + "rustls 0.23.7", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" +dependencies = [ + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.36" @@ -3818,16 +3861,16 @@ dependencies = [ "wasm-bindgen-futures", "web-sys", "webpki-roots 0.25.4", - "winreg 0.50.0", + "winreg", ] [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "bytes", "futures-core", "futures-util", @@ -3835,7 +3878,7 @@ dependencies = [ "http-body 1.0.0", "http-body-util", "hyper 1.3.1", - "hyper-rustls 0.26.0", + "hyper-rustls 0.27.3", "hyper-util", "ipnet", "js-sys", @@ -3844,23 +3887,24 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.4", + "quinn", + "rustls 0.23.7", "rustls-pemfile 2.1.2", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tokio-socks", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.1", - "winreg 0.52.0", + "webpki-roots 0.26.6", + "windows-registry", ] [[package]] @@ -3872,21 +3916,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -3897,8 +3926,8 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.52.0", ] @@ -3936,9 +3965,9 @@ checksum = "cb626abdbed5e93f031baae60d72032f56bc964e11ac2ff65f2ba3ed98d6d3e1" [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3946,6 +3975,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.4.0" @@ -3957,36 +3992,39 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.9" +version = "0.21.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", - "ring 0.16.20", + "ring", + "rustls-webpki 0.101.7", "sct", - "webpki", ] [[package]] name = "rustls" -version = "0.21.11" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", - "ring 0.17.8", - "rustls-webpki 0.101.7", - "sct", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "subtle", + "zeroize", ] [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" dependencies = [ "log", - "ring 0.17.8", + "once_cell", + "ring", "rustls-pki-types", "rustls-webpki 0.102.2", "subtle", @@ -4008,15 +4046,15 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.4.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" @@ -4024,8 +4062,8 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -4034,9 +4072,9 @@ version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ - "ring 0.17.8", + "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -4084,8 +4122,8 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] @@ -4153,24 +4191,25 @@ dependencies = [ [[package]] name = "secp256k1-zkp" -version = "0.7.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd403e9f0569b4131ab3fc9fa24a17775331b39382efd2cde851fdca655e3520" +checksum = "026efcdacb95ee6aae5cc19144dc1549973eac36a4972700c28493de1ee5d69f" dependencies = [ + "bitcoin-private", "rand", - "secp256k1 0.24.3", + "secp256k1 0.27.0", "secp256k1-zkp-sys", "serde", ] [[package]] name = "secp256k1-zkp-sys" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e7a2beac087c1da2d21018a3b7f043fe2f138654ad9c1518d409061a4a0034" +checksum = "d03ab1ca75a18e1899e8d9b8d28b5998ae1ddcb42fec5956769718543293c723" dependencies = [ "cc", - "secp256k1-sys 0.6.1", + "secp256k1-sys 0.8.1", ] [[package]] @@ -4196,9 +4235,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.198" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -4214,9 +4253,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -4225,12 +4264,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "itoa", + "memchr", "ryu", "serde", ] @@ -4267,16 +4307,13 @@ dependencies = [ ] [[package]] -name = "sha-1" -version = "0.9.8" +name = "serdect" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "base16ct", + "serde", ] [[package]] @@ -4287,7 +4324,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4298,7 +4335,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -4307,7 +4344,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "keccak", ] @@ -4383,25 +4420,19 @@ dependencies = [ [[package]] name = "soketto" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" +checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "bytes", "futures", "httparse", "log", "rand", - "sha-1", + "sha1", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -4481,6 +4512,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" @@ -4545,18 +4579,18 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -4641,29 +4675,28 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", @@ -4672,32 +4705,32 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.20.9", + "rustls 0.21.11", "tokio", - "webpki", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.21.11", + "rustls 0.22.4", + "rustls-pki-types", "tokio", ] [[package]] name = "tokio-rustls" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.22.4", + "rustls 0.23.7", "rustls-pki-types", "tokio", ] @@ -4739,7 +4772,7 @@ dependencies = [ "tokio", "tokio-rustls 0.25.0", "tungstenite", - "webpki-roots 0.26.1", + "webpki-roots 0.26.6", ] [[package]] @@ -4780,9 +4813,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -4793,22 +4826,22 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "toml_datetime", - "winnow", + "winnow 0.6.20", ] [[package]] @@ -5000,12 +5033,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -5014,9 +5041,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -5047,36 +5074,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "validator" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da339118f018cc70ebf01fafc103360528aad53717e4bf311db929cb01cb9345" -dependencies = [ - "idna", - "once_cell", - "regex", - "serde", - "serde_derive", - "serde_json", - "url", - "validator_derive", -] - -[[package]] -name = "validator_derive" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e88ea23b8f5e59230bff8a2f03c0ee0054a61d5b8343a38946bcd406fe624c" -dependencies = [ - "darling", - "proc-macro-error", - "proc-macro2", - "quote", - "regex", - "syn 2.0.60", -] - [[package]] name = "valuable" version = "0.1.0" @@ -5209,16 +5206,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "webpki-roots" version = "0.25.4" @@ -5227,9 +5214,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] @@ -5277,7 +5264,37 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -5295,7 +5312,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -5315,18 +5341,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5337,9 +5363,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5349,9 +5375,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5361,15 +5387,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5379,9 +5405,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -5391,9 +5417,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -5403,9 +5429,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -5415,9 +5441,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -5429,20 +5455,19 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", ] [[package]] name = "winreg" -version = "0.52.0" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", "windows-sys 0.48.0", diff --git a/Cargo.toml b/Cargo.toml index 215c72d..da30e6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["multimint", "fedimint-clientd", "fedimint-nwc"] resolver = "2" [workspace.package] -version = "0.3.7" +version = "0.4.0" edition = "2021" repository = "https://github.com/fedimint/fedimint-clientd" keywords = ["fedimint", "bitcoin", "lightning", "ecash"] @@ -12,13 +12,14 @@ readme = "README.md" authors = ["The Fedimint Developers"] [workspace.dependencies] -fedimint-client = "0.3.3" -fedimint-core = "0.3.3" -fedimint-wallet-client = "0.3.3" -fedimint-mint-client = "0.3.3" -fedimint-ln-client = "0.3.3" -fedimint-ln-common = "0.3.3" -fedimint-rocksdb = "0.3.3" +fedimint-api-client = "0.4.2" +fedimint-client = "0.4.2" +fedimint-core = "0.4.2" +fedimint-wallet-client = "0.4.2" +fedimint-mint-client = "0.4.2" +fedimint-ln-client = "0.4.2" +fedimint-ln-common = "0.4.2" +fedimint-rocksdb = "0.4.2" # Config for 'cargo dist' [workspace.metadata.dist] diff --git a/fedimint-clientd/Cargo.toml b/fedimint-clientd/Cargo.toml index 1f57b3a..73755df 100644 --- a/fedimint-clientd/Cargo.toml +++ b/fedimint-clientd/Cargo.toml @@ -37,8 +37,8 @@ time = { version = "0.3.25", features = ["formatting"] } chrono = "0.4.31" futures-util = "0.3.30" clap = { version = "3", features = ["derive", "env"] } -multimint = { version = "0.3.8" } -# multimint = { path = "../multimint" } +# multimint = { version = "0.3.8" } +multimint = { path = "../multimint" } hex = "0.4.3" futures = "0.3" diff --git a/fedimint-clientd/src/router/handlers/admin/info.rs b/fedimint-clientd/src/router/handlers/admin/info.rs index d088679..2ba0b98 100644 --- a/fedimint-clientd/src/router/handlers/admin/info.rs +++ b/fedimint-clientd/src/router/handlers/admin/info.rs @@ -4,7 +4,7 @@ use anyhow::Error; use axum::extract::State; use axum::Json; use multimint::fedimint_core::config::FederationId; -use multimint::fedimint_core::{Amount, TieredSummary}; +use multimint::fedimint_core::{Amount, TieredCounts}; use multimint::fedimint_mint_client::MintClientModule; use multimint::fedimint_wallet_client::WalletClientModule; use multimint::MultiMint; @@ -21,7 +21,7 @@ pub struct InfoResponse { pub meta: BTreeMap, pub total_amount_msat: Amount, pub total_num_notes: usize, - pub denominations_msat: TieredSummary, + pub denominations_msat: TieredCounts, } async fn _info(multimint: MultiMint) -> Result, Error> { @@ -44,7 +44,7 @@ async fn _info(multimint: MultiMint) -> Result Result { let mut updates = client .get_first_module::() - .subscribe_deposit_updates(req.operation_id) + .subscribe_deposit(req.operation_id) .await? .into_stream(); while let Some(update) = updates.next().await { match update { - DepositState::Confirmed(tx) => { + DepositStateV2::Confirmed(tx) => { return Ok(AwaitDepositResponse { - status: DepositState::Confirmed(tx), + status: DepositStateV2::Confirmed(tx), }) } - DepositState::Claimed(tx) => { + DepositStateV2::Claimed(tx) => { return Ok(AwaitDepositResponse { - status: DepositState::Claimed(tx), + status: DepositStateV2::Claimed(tx), }) } - DepositState::Failed(reason) => { + DepositStateV2::Failed(reason) => { return Err(AppError::new( StatusCode::INTERNAL_SERVER_ERROR, anyhow!(reason), diff --git a/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs b/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs index c8066b1..62aa625 100644 --- a/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs +++ b/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs @@ -4,11 +4,12 @@ use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use bitcoin::Address; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; use multimint::fedimint_core::core::OperationId; use multimint::fedimint_core::time::now; +use multimint::fedimint_ln_common::bitcoin::Address; +use multimint::fedimint_wallet_client::client_db::TweakIdx; use multimint::fedimint_wallet_client::WalletClientModule; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; @@ -28,6 +29,7 @@ pub struct DepositAddressRequest { pub struct DepositAddressResponse { pub address: Address, pub operation_id: OperationId, + pub tweak_idx: TweakIdx, } async fn _deposit_address( @@ -35,13 +37,14 @@ async fn _deposit_address( req: DepositAddressRequest, ) -> Result { let wallet_module = client.get_first_module::(); - let (operation_id, address) = wallet_module - .get_deposit_address(now() + Duration::from_secs(req.timeout), ()) + let (operation_id, address, tweak_idx) = wallet_module + .allocate_deposit_address_expert_only(now() + Duration::from_secs(req.timeout)) .await?; Ok(DepositAddressResponse { address, operation_id, + tweak_idx, }) } diff --git a/multimint/Cargo.toml b/multimint/Cargo.toml index 3b899f8..012a36b 100644 --- a/multimint/Cargo.toml +++ b/multimint/Cargo.toml @@ -13,6 +13,7 @@ authors.workspace = true path = "src/lib.rs" [dependencies] +fedimint-api-client = { workspace = true } fedimint-client = { workspace = true } anyhow = "1.0.75" serde = "1.0.193" diff --git a/multimint/src/client.rs b/multimint/src/client.rs index ce56e14..b8c409c 100644 --- a/multimint/src/client.rs +++ b/multimint/src/client.rs @@ -9,7 +9,6 @@ use std::sync::Arc; use anyhow::Result; use fedimint_client::secret::{PlainRootSecretStrategy, RootSecretStrategy}; use fedimint_client::Client; -use fedimint_core::config::ClientConfig; use fedimint_core::db::{ Committable, Database, DatabaseTransaction, IDatabaseTransactionOpsCoreTyped, }; @@ -50,39 +49,36 @@ impl LocalClientBuilder { Default::default(), ); - let mut client_builder = Client::builder(db); + let mut client_builder = Client::builder(db.clone()).await?; client_builder.with_module(WalletClientInit(None)); client_builder.with_module(MintClientInit); - client_builder.with_module(LightningClientInit); + client_builder.with_module(LightningClientInit::default()); client_builder.with_primary_module(1); - let client_secret = - match Client::load_decodable_client_secret::<[u8; 64]>(client_builder.db()).await { - Ok(secret) => secret, - Err(_) => { - if let Some(manual_secret) = manual_secret { - info!("Using manual secret provided by user and writing to client storage"); - Client::store_encodable_client_secret(client_builder.db(), manual_secret) - .await?; - manual_secret - } else { - info!("Generating new secret and writing to client storage"); - let secret = PlainRootSecretStrategy::random(&mut thread_rng()); - Client::store_encodable_client_secret(client_builder.db(), secret).await?; - secret - } + let client_secret = match Client::load_decodable_client_secret::<[u8; 64]>(&db).await { + Ok(secret) => secret, + Err(_) => { + if let Some(manual_secret) = manual_secret { + info!("Using manual secret provided by user and writing to client storage"); + Client::store_encodable_client_secret(&db, manual_secret).await?; + manual_secret + } else { + info!("Generating new secret and writing to client storage"); + let secret = PlainRootSecretStrategy::random(&mut thread_rng()); + Client::store_encodable_client_secret(&db, secret).await?; + secret } - }; + } + }; let root_secret = PlainRootSecretStrategy::to_root_secret(&client_secret); - let client_res = if Client::is_initialized(client_builder.db()).await { + let client_res = if Client::is_initialized(&db).await { client_builder.open(root_secret).await } else { let client_config = - ClientConfig::download_from_invite_code(&config.invite_code).await?; + fedimint_api_client::download_from_invite_code(&config.invite_code).await?; client_builder - // TODO: make this configurable? - .join(root_secret, client_config.to_owned()) + .join(root_secret, client_config.to_owned(), None) .await }?; diff --git a/multimint/src/db.rs b/multimint/src/db.rs index ae1167c..c868603 100644 --- a/multimint/src/db.rs +++ b/multimint/src/db.rs @@ -1,6 +1,6 @@ -use fedimint_core::api::InviteCode; use fedimint_core::config::FederationId; use fedimint_core::encoding::{Decodable, Encodable}; +use fedimint_core::invite_code::InviteCode; use fedimint_core::{impl_db_lookup, impl_db_record}; use serde::{Deserialize, Serialize}; diff --git a/multimint/src/lib.rs b/multimint/src/lib.rs index 34c80d1..ba1fbb8 100644 --- a/multimint/src/lib.rs +++ b/multimint/src/lib.rs @@ -68,9 +68,9 @@ use std::sync::Arc; use anyhow::Result; use fedimint_client::ClientHandleArc; -use fedimint_core::api::InviteCode; use fedimint_core::config::{FederationId, FederationIdPrefix, JsonClientConfig}; use fedimint_core::db::Database; +use fedimint_core::invite_code::InviteCode; use fedimint_core::Amount; use fedimint_ln_client::LightningClientModule; use fedimint_mint_client::MintClientModule; @@ -313,7 +313,7 @@ impl MultiMint { let clients = self.clients.lock().await; for (federation_id, client) in clients.iter() { - let client_config = client.get_config_json(); + let client_config = client.get_config_json().await; configs_map.insert(*federation_id, client_config); } @@ -354,7 +354,7 @@ impl MultiMint { let info = InfoResponse { federation_id: *federation_id, network: wallet_client.get_network().to_string(), - meta: client.get_config().global.meta.clone(), + meta: client.config().await.global.meta.clone(), total_amount_msat: summary.total_amount(), total_num_notes: summary.count_items(), denominations_msat: summary, diff --git a/multimint/src/types.rs b/multimint/src/types.rs index 820614c..407d1b0 100644 --- a/multimint/src/types.rs +++ b/multimint/src/types.rs @@ -1,7 +1,7 @@ use std::collections::BTreeMap; use fedimint_core::config::FederationId; -use fedimint_core::{Amount, TieredSummary}; +use fedimint_core::{Amount, TieredCounts}; use serde::Serialize; /// InfoResponse for getting the Federation Config info @@ -13,5 +13,5 @@ pub struct InfoResponse { pub meta: BTreeMap, pub total_amount_msat: Amount, pub total_num_notes: usize, - pub denominations_msat: TieredSummary, + pub denominations_msat: TieredCounts, } From f59c9491a1a31af2a032963cafaf2d1bdde5927d Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:20:03 -0700 Subject: [PATCH 02/15] fix: update config endpoint --- fedimint-clientd/src/router/handlers/admin/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedimint-clientd/src/router/handlers/admin/config.rs b/fedimint-clientd/src/router/handlers/admin/config.rs index c086049..a4693a1 100644 --- a/fedimint-clientd/src/router/handlers/admin/config.rs +++ b/fedimint-clientd/src/router/handlers/admin/config.rs @@ -11,7 +11,7 @@ use crate::state::AppState; async fn _config(multimint: MultiMint) -> Result { let mut config = HashMap::new(); for (id, client) in multimint.clients.lock().await.iter() { - config.insert(*id, client.get_config_json()); + config.insert(*id, client.config().await.to_json()); } Ok(serde_json::to_value(config) .map_err(|e| anyhow::anyhow!("Client config is serializable: {e}"))?) From 2fff0c50e3259d4b0c25ded7c5d975202267b330 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:21:26 -0700 Subject: [PATCH 03/15] fix: update discover_version endpoint --- .../router/handlers/admin/discover_version.rs | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/fedimint-clientd/src/router/handlers/admin/discover_version.rs b/fedimint-clientd/src/router/handlers/admin/discover_version.rs index 54e2cc6..a3bfb35 100644 --- a/fedimint-clientd/src/router/handlers/admin/discover_version.rs +++ b/fedimint-clientd/src/router/handlers/admin/discover_version.rs @@ -1,51 +1,32 @@ use std::collections::HashMap; use axum::extract::State; -use axum::http::StatusCode; use axum::Json; use multimint::MultiMint; -use serde::Deserialize; use serde_json::{json, Value}; use crate::error::AppError; use crate::state::AppState; -#[derive(Debug, Clone, Deserialize)] -pub struct DiscoverVersionRequest { - threshold: Option, -} - -async fn _discover_version( - multimint: MultiMint, - threshold: Option, -) -> Result { +async fn _discover_version(multimint: MultiMint) -> Result { let mut api_versions = HashMap::new(); for (id, client) in multimint.clients.lock().await.iter() { api_versions.insert( *id, - json!({"version" : client.discover_common_api_version(threshold).await?}), + json!({"version" : client.load_and_refresh_common_api_version().await?}), ); } Ok(json!(api_versions)) } -pub async fn handle_ws(state: AppState, v: Value) -> Result { - let v = serde_json::from_value::(v).map_err(|e| { - AppError::new( - StatusCode::BAD_REQUEST, - anyhow::anyhow!("Invalid request: {}", e), - ) - })?; - let version = _discover_version(state.multimint, v.threshold).await?; +pub async fn handle_ws(state: AppState) -> Result { + let version = _discover_version(state.multimint).await?; let version_json = json!(version); Ok(version_json) } #[axum_macros::debug_handler] -pub async fn handle_rest( - State(state): State, - Json(req): Json, -) -> Result, AppError> { - let version = _discover_version(state.multimint, req.threshold).await?; +pub async fn handle_rest(State(state): State) -> Result, AppError> { + let version = _discover_version(state.multimint).await?; Ok(Json(version)) } From 46f7b4266ed53fde98ae562ba893c6f30db29450 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:24:41 -0700 Subject: [PATCH 04/15] fix: update join endpoint --- fedimint-clientd/src/router/handlers/admin/join.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedimint-clientd/src/router/handlers/admin/join.rs b/fedimint-clientd/src/router/handlers/admin/join.rs index aa06444..6fe9bca 100644 --- a/fedimint-clientd/src/router/handlers/admin/join.rs +++ b/fedimint-clientd/src/router/handlers/admin/join.rs @@ -4,8 +4,8 @@ use anyhow::{anyhow, Error}; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use multimint::fedimint_core::api::InviteCode; use multimint::fedimint_core::config::FederationId; +use multimint::fedimint_core::invite_code::InviteCode; use multimint::MultiMint; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; From 43311e13f497dd6ec5fe8f581fa7d2715bb8d31e Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:25:05 -0700 Subject: [PATCH 05/15] fix: update admin mod file --- fedimint-clientd/src/router/handlers/admin/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedimint-clientd/src/router/handlers/admin/mod.rs b/fedimint-clientd/src/router/handlers/admin/mod.rs index 18e4afd..d35d687 100644 --- a/fedimint-clientd/src/router/handlers/admin/mod.rs +++ b/fedimint-clientd/src/router/handlers/admin/mod.rs @@ -27,7 +27,7 @@ pub async fn _get_note_summary(client: &ClientHandleArc) -> anyhow::Result Date: Wed, 9 Oct 2024 10:26:36 -0700 Subject: [PATCH 06/15] fix: update await_invoice endpoint --- fedimint-clientd/src/router/handlers/ln/await_invoice.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedimint-clientd/src/router/handlers/ln/await_invoice.rs b/fedimint-clientd/src/router/handlers/ln/await_invoice.rs index e2c9de6..5bb3147 100644 --- a/fedimint-clientd/src/router/handlers/ln/await_invoice.rs +++ b/fedimint-clientd/src/router/handlers/ln/await_invoice.rs @@ -37,7 +37,7 @@ async fn _await_invoice( .await? .into_stream(); info!( - "Created await invoice stream for operation id: {}", + "Created await invoice stream for operation id: {:?}", req.operation_id ); while let Some(update) = updates.next().await { From 8bfaa5c44b078cad934120a43c8bed156fdc5ce6 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:35:38 -0700 Subject: [PATCH 07/15] fix: invoice endpoint --- fedimint-clientd/src/router/handlers/ln/invoice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fedimint-clientd/src/router/handlers/ln/invoice.rs b/fedimint-clientd/src/router/handlers/ln/invoice.rs index 649b4a2..c062b2b 100644 --- a/fedimint-clientd/src/router/handlers/ln/invoice.rs +++ b/fedimint-clientd/src/router/handlers/ln/invoice.rs @@ -2,13 +2,13 @@ use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use bitcoin::secp256k1::PublicKey; -use lightning_invoice::{Bolt11InvoiceDescription, Description}; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; use multimint::fedimint_core::core::OperationId; +use multimint::fedimint_core::secp256k1::PublicKey; use multimint::fedimint_core::Amount; use multimint::fedimint_ln_client::LightningClientModule; +use multimint::fedimint_ln_common::lightning_invoice::{Bolt11InvoiceDescription, Description}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; use tracing::error; From 5d33af810ef52a75a2e3c78c1a8fd621682cdc2f Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:40:36 -0700 Subject: [PATCH 08/15] fix: ln mod file --- fedimint-clientd/src/router/handlers/ln/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fedimint-clientd/src/router/handlers/ln/mod.rs b/fedimint-clientd/src/router/handlers/ln/mod.rs index 8b6cadd..b1c3d77 100644 --- a/fedimint-clientd/src/router/handlers/ln/mod.rs +++ b/fedimint-clientd/src/router/handlers/ln/mod.rs @@ -137,11 +137,11 @@ pub async fn wait_for_ln_payment( LnPayState::Canceled => { Err(anyhow::anyhow!("Payment was canceled"))?; } + LnPayState::Funded { block_height: _ } if return_on_funding => return Ok(None), LnPayState::Created | LnPayState::AwaitingChange - | LnPayState::WaitingForRefund { .. } => {} - LnPayState::Funded if return_on_funding => return Ok(None), - LnPayState::Funded => {} + | LnPayState::WaitingForRefund { .. } + | LnPayState::Funded { block_height: _ } => {} LnPayState::UnexpectedError { error_message } => { bail!("UnexpectedError: {error_message}") } From b4e3f57d4d162bbf155746b3f017e9d8898971a2 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:46:28 -0700 Subject: [PATCH 09/15] fix: update ln endpoints --- Cargo.lock | 2 -- fedimint-clientd/Cargo.toml | 2 -- .../src/router/handlers/ln/claim_external_receive_tweaked.rs | 5 ++--- .../router/handlers/ln/invoice_external_pubkey_tweaked.rs | 4 ++-- fedimint-clientd/src/router/handlers/ln/mod.rs | 2 +- fedimint-clientd/src/router/handlers/ln/pay.rs | 4 ++-- fedimint-clientd/src/router/handlers/mint/spend.rs | 2 +- fedimint-clientd/src/router/handlers/mint/validate.rs | 3 +-- 8 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9086d91..bb287c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1360,7 +1360,6 @@ dependencies = [ "async-utility", "axum", "axum-macros", - "bitcoin 0.29.2", "bitcoin_hashes 0.13.0", "chrono", "clap 3.2.25", @@ -1371,7 +1370,6 @@ dependencies = [ "hex", "itertools 0.12.1", "lazy_static", - "lightning-invoice 0.26.0", "lnurl-rs 0.5.0", "metrics", "metrics-exporter-prometheus", diff --git a/fedimint-clientd/Cargo.toml b/fedimint-clientd/Cargo.toml index 73755df..b3cabac 100644 --- a/fedimint-clientd/Cargo.toml +++ b/fedimint-clientd/Cargo.toml @@ -24,14 +24,12 @@ url = "2.5.0" lazy_static = "1.4.0" async-utility = "0.2.0" tower-http = { version = "0.5.2", features = ["cors", "auth", "trace"] } -bitcoin = "0.29.2" itertools = "0.12.0" lnurl-rs = { version = "0.5.0", features = ["async"], default-features = false } reqwest = { version = "0.12.3", features = [ "json", "rustls-tls", ], default-features = false } -lightning-invoice = { version = "0.26.0", features = ["serde"] } bitcoin_hashes = "0.13.0" time = { version = "0.3.25", features = ["formatting"] } chrono = "0.4.31" diff --git a/fedimint-clientd/src/router/handlers/ln/claim_external_receive_tweaked.rs b/fedimint-clientd/src/router/handlers/ln/claim_external_receive_tweaked.rs index 0ece5c5..7c45a10 100644 --- a/fedimint-clientd/src/router/handlers/ln/claim_external_receive_tweaked.rs +++ b/fedimint-clientd/src/router/handlers/ln/claim_external_receive_tweaked.rs @@ -2,11 +2,10 @@ use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use bitcoin::secp256k1::{Secp256k1, SecretKey}; -use bitcoin::util::key::KeyPair; use futures_util::StreamExt; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; +use multimint::fedimint_core::secp256k1::{KeyPair, Secp256k1, SecretKey}; use multimint::fedimint_ln_client::{LightningClientModule, LnReceiveState}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; @@ -46,7 +45,7 @@ async fn _await_claim_external_receive_tweaked( .await? .into_stream(); info!( - "Created claim external receive tweaked stream for operation id: {}", + "Created claim external receive tweaked stream for operation id: {:?}", operation_id ); while let Some(update) = updates.next().await { diff --git a/fedimint-clientd/src/router/handlers/ln/invoice_external_pubkey_tweaked.rs b/fedimint-clientd/src/router/handlers/ln/invoice_external_pubkey_tweaked.rs index ccd33f4..4f7aa5e 100644 --- a/fedimint-clientd/src/router/handlers/ln/invoice_external_pubkey_tweaked.rs +++ b/fedimint-clientd/src/router/handlers/ln/invoice_external_pubkey_tweaked.rs @@ -2,13 +2,13 @@ use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use bitcoin::secp256k1::PublicKey; -use lightning_invoice::{Bolt11InvoiceDescription, Description}; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; use multimint::fedimint_core::core::OperationId; +use multimint::fedimint_core::secp256k1::PublicKey; use multimint::fedimint_core::Amount; use multimint::fedimint_ln_client::LightningClientModule; +use multimint::fedimint_ln_common::lightning_invoice::{Bolt11InvoiceDescription, Description}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; use tracing::error; diff --git a/fedimint-clientd/src/router/handlers/ln/mod.rs b/fedimint-clientd/src/router/handlers/ln/mod.rs index b1c3d77..214fd07 100644 --- a/fedimint-clientd/src/router/handlers/ln/mod.rs +++ b/fedimint-clientd/src/router/handlers/ln/mod.rs @@ -2,10 +2,10 @@ use std::str::FromStr; use anyhow::{bail, Context}; use futures_util::StreamExt; -use lightning_invoice::Bolt11Invoice; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::Amount; use multimint::fedimint_ln_client::{InternalPayState, LightningClientModule, LnPayState, PayType}; +use multimint::fedimint_ln_common::lightning_invoice::Bolt11Invoice; use tracing::{debug, info}; use self::pay::{LnPayRequest, LnPayResponse}; diff --git a/fedimint-clientd/src/router/handlers/ln/pay.rs b/fedimint-clientd/src/router/handlers/ln/pay.rs index 2da88c8..e2b589a 100644 --- a/fedimint-clientd/src/router/handlers/ln/pay.rs +++ b/fedimint-clientd/src/router/handlers/ln/pay.rs @@ -2,10 +2,10 @@ use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use bitcoin::secp256k1::PublicKey; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; use multimint::fedimint_core::core::OperationId; +use multimint::fedimint_core::secp256k1::PublicKey; use multimint::fedimint_core::Amount; use multimint::fedimint_ln_client::{LightningClientModule, OutgoingLightningPayment, PayType}; use serde::{Deserialize, Serialize}; @@ -59,7 +59,7 @@ async fn _pay(client: ClientHandleArc, req: LnPayRequest) -> Result Result Result { let amount_msat = client .get_first_module::() - .validate_notes(req.notes) - .await?; + .validate_notes(&req.notes)?; Ok(ValidateResponse { amount_msat }) } From bd7d1a38df27cf6fdf8871a3473aa61e6fd1cff8 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:56:41 -0700 Subject: [PATCH 10/15] fix: onchain endpoints --- Cargo.lock | 2 +- fedimint-clientd/Cargo.toml | 2 +- .../router/handlers/onchain/await_deposit.rs | 20 +++++++++++++++---- .../handlers/onchain/deposit_address.rs | 15 ++++---------- .../src/router/handlers/onchain/withdraw.rs | 13 ++++++------ 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb287c6..2561bf7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1360,7 +1360,7 @@ dependencies = [ "async-utility", "axum", "axum-macros", - "bitcoin_hashes 0.13.0", + "bitcoin 0.30.2", "chrono", "clap 3.2.25", "dotenv", diff --git a/fedimint-clientd/Cargo.toml b/fedimint-clientd/Cargo.toml index b3cabac..d0b8c29 100644 --- a/fedimint-clientd/Cargo.toml +++ b/fedimint-clientd/Cargo.toml @@ -30,7 +30,7 @@ reqwest = { version = "0.12.3", features = [ "json", "rustls-tls", ], default-features = false } -bitcoin_hashes = "0.13.0" +bitcoin = "0.30.2" time = { version = "0.3.25", features = ["formatting"] } chrono = "0.4.31" futures-util = "0.3.30" diff --git a/fedimint-clientd/src/router/handlers/onchain/await_deposit.rs b/fedimint-clientd/src/router/handlers/onchain/await_deposit.rs index 3becb69..9c2c9dd 100644 --- a/fedimint-clientd/src/router/handlers/onchain/await_deposit.rs +++ b/fedimint-clientd/src/router/handlers/onchain/await_deposit.rs @@ -38,14 +38,26 @@ async fn _await_deposit( while let Some(update) = updates.next().await { match update { - DepositStateV2::Confirmed(tx) => { + DepositStateV2::Confirmed { + btc_deposited, + btc_out_point, + } => { return Ok(AwaitDepositResponse { - status: DepositStateV2::Confirmed(tx), + status: DepositStateV2::Confirmed { + btc_deposited, + btc_out_point, + }, }) } - DepositStateV2::Claimed(tx) => { + DepositStateV2::Claimed { + btc_deposited, + btc_out_point, + } => { return Ok(AwaitDepositResponse { - status: DepositStateV2::Claimed(tx), + status: DepositStateV2::Claimed { + btc_deposited, + btc_out_point, + }, }) } DepositStateV2::Failed(reason) => { diff --git a/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs b/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs index 62aa625..e58f7b1 100644 --- a/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs +++ b/fedimint-clientd/src/router/handlers/onchain/deposit_address.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; @@ -7,7 +5,6 @@ use axum::Json; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; use multimint::fedimint_core::core::OperationId; -use multimint::fedimint_core::time::now; use multimint::fedimint_ln_common::bitcoin::Address; use multimint::fedimint_wallet_client::client_db::TweakIdx; use multimint::fedimint_wallet_client::WalletClientModule; @@ -20,7 +17,6 @@ use crate::state::AppState; #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct DepositAddressRequest { - pub timeout: u64, pub federation_id: FederationId, } @@ -32,13 +28,10 @@ pub struct DepositAddressResponse { pub tweak_idx: TweakIdx, } -async fn _deposit_address( - client: ClientHandleArc, - req: DepositAddressRequest, -) -> Result { +async fn _deposit_address(client: ClientHandleArc) -> Result { let wallet_module = client.get_first_module::(); let (operation_id, address, tweak_idx) = wallet_module - .allocate_deposit_address_expert_only(now() + Duration::from_secs(req.timeout)) + .allocate_deposit_address_expert_only(()) .await?; Ok(DepositAddressResponse { @@ -52,7 +45,7 @@ pub async fn handle_ws(state: AppState, v: Value) -> Result { let v: DepositAddressRequest = serde_json::from_value::(v) .map_err(|e| AppError::new(StatusCode::BAD_REQUEST, anyhow!("Invalid request: {}", e)))?; let client = state.get_client(v.federation_id).await?; - let withdraw = _deposit_address(client, v).await?; + let withdraw = _deposit_address(client).await?; let withdraw_json = json!(withdraw); Ok(withdraw_json) } @@ -63,6 +56,6 @@ pub async fn handle_rest( Json(req): Json, ) -> Result, AppError> { let client = state.get_client(req.federation_id).await?; - let withdraw = _deposit_address(client, req).await?; + let withdraw = _deposit_address(client).await?; Ok(Json(withdraw)) } diff --git a/fedimint-clientd/src/router/handlers/onchain/withdraw.rs b/fedimint-clientd/src/router/handlers/onchain/withdraw.rs index d144f7c..cc91580 100644 --- a/fedimint-clientd/src/router/handlers/onchain/withdraw.rs +++ b/fedimint-clientd/src/router/handlers/onchain/withdraw.rs @@ -2,12 +2,13 @@ use anyhow::anyhow; use axum::extract::State; use axum::http::StatusCode; use axum::Json; -use bitcoin::hashes::hex::ToHex; -use bitcoin::Address; +use bitcoin::address::NetworkUnchecked; +use bitcoin::{Amount, Txid}; use futures_util::StreamExt; use multimint::fedimint_client::ClientHandleArc; use multimint::fedimint_core::config::FederationId; use multimint::fedimint_core::BitcoinAmountOrAll; +use multimint::fedimint_ln_common::bitcoin::Address; use multimint::fedimint_wallet_client::{WalletClientModule, WithdrawState}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; @@ -19,7 +20,7 @@ use crate::state::AppState; #[derive(Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct WithdrawRequest { - pub address: Address, + pub address: Address, pub amount_sat: BitcoinAmountOrAll, pub federation_id: FederationId, } @@ -27,7 +28,7 @@ pub struct WithdrawRequest { #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct WithdrawResponse { - pub txid: String, + pub txid: Txid, pub fees_sat: u64, } @@ -40,7 +41,7 @@ async fn _withdraw( // If the amount is "all", then we need to subtract the fees from // the amount we are withdrawing BitcoinAmountOrAll::All => { - let balance = bitcoin::Amount::from_sat(client.get_balance().await.msats / 1000); + let balance = Amount::from_sat(client.get_balance().await.msats / 1000); let fees = wallet_module .get_withdraw_fees(req.address.clone(), balance) .await?; @@ -83,7 +84,7 @@ async fn _withdraw( match update { WithdrawState::Succeeded(txid) => { return Ok(WithdrawResponse { - txid: txid.to_hex(), + txid: txid, fees_sat: absolute_fees.to_sat(), }); } From f8ef091da97a0d1391f61b85723544e40f04c977 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 10:57:25 -0700 Subject: [PATCH 11/15] fix: fix --- fedimint-clientd/src/main.rs | 2 +- fedimint-clientd/src/router/ws.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fedimint-clientd/src/main.rs b/fedimint-clientd/src/main.rs index 5ff8c5e..2dab478 100644 --- a/fedimint-clientd/src/main.rs +++ b/fedimint-clientd/src/main.rs @@ -11,7 +11,7 @@ use axum::response::IntoResponse; use futures::future::TryFutureExt; use futures::try_join; use metrics_exporter_prometheus::{Matcher, PrometheusBuilder, PrometheusHandle}; -use multimint::fedimint_core::api::InviteCode; +use multimint::fedimint_core::invite_code::InviteCode; use router::handlers::{admin, ln, mint, onchain}; use router::ws::websocket_handler; use tower_http::cors::{Any, CorsLayer}; diff --git a/fedimint-clientd/src/router/ws.rs b/fedimint-clientd/src/router/ws.rs index e1da903..90c30f9 100644 --- a/fedimint-clientd/src/router/ws.rs +++ b/fedimint-clientd/src/router/ws.rs @@ -167,7 +167,7 @@ async fn match_method(req: JsonRpcRequest, state: AppState) -> Result handlers::admin::config::handle_ws(state.clone()).await, JsonRpcMethod::AdminDiscoverVersion => { - handlers::admin::discover_version::handle_ws(state.clone(), req.params).await + handlers::admin::discover_version::handle_ws(state.clone()).await } JsonRpcMethod::AdminFederationIds => { handlers::admin::federation_ids::handle_ws(state.clone(), req.params).await From 9685bd55dc8446618197f6e17f1ea847d938562b Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 11:06:27 -0700 Subject: [PATCH 12/15] fix: update fedimint-nwc --- Cargo.lock | 37 +++++--------------------- fedimint-clientd/Cargo.toml | 1 - fedimint-nwc/Cargo.toml | 2 -- fedimint-nwc/src/database/db.rs | 2 +- fedimint-nwc/src/database/invoice.rs | 2 +- fedimint-nwc/src/database/payment.rs | 2 +- fedimint-nwc/src/nwc.rs | 2 +- fedimint-nwc/src/services/multimint.rs | 12 +++++---- fedimint-nwc/src/state.rs | 2 +- 9 files changed, 18 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2561bf7..b857a46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1419,8 +1419,8 @@ dependencies = [ "js-sys", "jsonrpsee-core", "jsonrpsee-wasm-client", - "lightning 0.0.123", - "lightning-invoice 0.31.0", + "lightning", + "lightning-invoice", "macro_rules_attribute", "miniscript", "parity-scale-codec", @@ -1495,7 +1495,7 @@ dependencies = [ "fedimint-logging", "futures", "itertools 0.12.1", - "lightning-invoice 0.31.0", + "lightning-invoice", "lnurl-rs 0.6.0", "rand", "reqwest 0.12.7", @@ -1521,8 +1521,8 @@ dependencies = [ "fedimint-client", "fedimint-core", "fedimint-threshold-crypto", - "lightning 0.0.123", - "lightning-invoice 0.31.0", + "lightning", + "lightning-invoice", "secp256k1 0.27.0", "serde", "serde-big-array", @@ -1611,7 +1611,6 @@ dependencies = [ "futures-util", "image", "itertools 0.13.0", - "lightning-invoice 0.26.0", "multimint", "nostr", "nostr-sdk", @@ -2727,15 +2726,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "lightning" -version = "0.0.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cec5fa9382154fe9671e8df93095b800c7d77abc66e2a5ef839d672521c5e" -dependencies = [ - "bitcoin 0.29.2", -] - [[package]] name = "lightning" version = "0.0.123" @@ -2750,21 +2740,6 @@ dependencies = [ "possiblyrandom", ] -[[package]] -name = "lightning-invoice" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb24878b0f4ef75f020976c886d9ad1503867802329cc963e0ab4623ea3b25c" -dependencies = [ - "bech32 0.9.1", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", - "lightning 0.0.118", - "num-traits", - "secp256k1 0.24.3", - "serde", -] - [[package]] name = "lightning-invoice" version = "0.31.0" @@ -2773,7 +2748,7 @@ checksum = "26d07d01cf197bf2184b929b7dc94aa70d935aac6df896c256a3a9475b7e9d40" dependencies = [ "bech32 0.9.1", "bitcoin 0.30.2", - "lightning 0.0.123", + "lightning", "secp256k1 0.27.0", "serde", ] diff --git a/fedimint-clientd/Cargo.toml b/fedimint-clientd/Cargo.toml index d0b8c29..fa23d5e 100644 --- a/fedimint-clientd/Cargo.toml +++ b/fedimint-clientd/Cargo.toml @@ -35,7 +35,6 @@ time = { version = "0.3.25", features = ["formatting"] } chrono = "0.4.31" futures-util = "0.3.30" clap = { version = "3", features = ["derive", "env"] } -# multimint = { version = "0.3.8" } multimint = { path = "../multimint" } hex = "0.4.3" diff --git a/fedimint-nwc/Cargo.toml b/fedimint-nwc/Cargo.toml index b5963aa..6b69efd 100644 --- a/fedimint-nwc/Cargo.toml +++ b/fedimint-nwc/Cargo.toml @@ -18,8 +18,6 @@ dotenv = "0.15.0" futures-util = "0.3.30" image = "0.25.1" itertools = "0.13.0" -lightning-invoice = { version = "0.26.0", features = ["serde"] } -# multimint = { version = "0.3.6" } multimint = { path = "../multimint" } nostr = { version = "0.31.2", features = ["nip47"] } nostr-sdk = { version = "0.31.0", features = ["nip47"] } diff --git a/fedimint-nwc/src/database/db.rs b/fedimint-nwc/src/database/db.rs index 63b4802..4b6ef3d 100644 --- a/fedimint-nwc/src/database/db.rs +++ b/fedimint-nwc/src/database/db.rs @@ -5,7 +5,7 @@ use std::time::Duration; use anyhow::{Context, Result}; use itertools::Itertools; -use lightning_invoice::Bolt11Invoice; +use multimint::fedimint_ln_common::lightning_invoice::Bolt11Invoice; use nostr::nips::nip47::LookupInvoiceRequestParams; use nostr::util::hex; use redb::{Database as RedbDatabase, ReadTransaction, ReadableTable, WriteTransaction}; diff --git a/fedimint-nwc/src/database/invoice.rs b/fedimint-nwc/src/database/invoice.rs index 65e28cc..0533ae4 100644 --- a/fedimint-nwc/src/database/invoice.rs +++ b/fedimint-nwc/src/database/invoice.rs @@ -1,6 +1,6 @@ use std::time::{Duration, UNIX_EPOCH}; -use lightning_invoice::{Bolt11Invoice, Bolt11InvoiceDescription}; +use multimint::fedimint_ln_common::lightning_invoice::{Bolt11Invoice, Bolt11InvoiceDescription}; use nostr::util::hex; use redb::{TableDefinition, TypeName, Value}; use serde::{Deserialize, Serialize}; diff --git a/fedimint-nwc/src/database/payment.rs b/fedimint-nwc/src/database/payment.rs index ff39c9c..938a709 100644 --- a/fedimint-nwc/src/database/payment.rs +++ b/fedimint-nwc/src/database/payment.rs @@ -1,4 +1,4 @@ -use lightning_invoice::Bolt11Invoice; +use multimint::fedimint_ln_common::lightning_invoice::Bolt11Invoice; use redb::{TableDefinition, TypeName, Value}; use serde::{Deserialize, Serialize}; diff --git a/fedimint-nwc/src/nwc.rs b/fedimint-nwc/src/nwc.rs index d6d5c66..1d113d2 100644 --- a/fedimint-nwc/src/nwc.rs +++ b/fedimint-nwc/src/nwc.rs @@ -1,7 +1,7 @@ use std::str::FromStr; use anyhow::{anyhow, Result}; -use lightning_invoice::{Bolt11Invoice, Bolt11InvoiceDescription}; +use multimint::fedimint_ln_common::lightning_invoice::{Bolt11Invoice, Bolt11InvoiceDescription}; use nostr::nips::nip04; use nostr::nips::nip47::{ ErrorCode, GetBalanceResponseResult, GetInfoResponseResult, LookupInvoiceRequestParams, diff --git a/fedimint-nwc/src/services/multimint.rs b/fedimint-nwc/src/services/multimint.rs index cb7c614..ee73f61 100644 --- a/fedimint-nwc/src/services/multimint.rs +++ b/fedimint-nwc/src/services/multimint.rs @@ -3,15 +3,17 @@ use std::str::FromStr; use anyhow::{anyhow, bail, Result}; use futures_util::StreamExt; -use lightning_invoice::{Bolt11Invoice, Bolt11InvoiceDescription, Description}; use multimint::fedimint_client::ClientHandleArc; -use multimint::fedimint_core::api::InviteCode; use multimint::fedimint_core::config::{FederationId, FederationIdPrefix}; use multimint::fedimint_core::core::OperationId; +use multimint::fedimint_core::invite_code::InviteCode; use multimint::fedimint_core::Amount; use multimint::fedimint_ln_client::{ InternalPayState, LightningClientModule, LnPayState, OutgoingLightningPayment, PayType, }; +use multimint::fedimint_ln_common::lightning_invoice::{ + Bolt11Invoice, Bolt11InvoiceDescription, Description, +}; use multimint::fedimint_ln_common::LightningGateway; use multimint::MultiMint; use nostr::nips::nip47::{ @@ -250,11 +252,11 @@ pub async fn wait_for_ln_payment( LnPayState::Canceled => { Err(anyhow::anyhow!("Payment was canceled"))?; } + LnPayState::Funded { block_height: _ } if return_on_funding => return Ok(None), LnPayState::Created | LnPayState::AwaitingChange - | LnPayState::WaitingForRefund { .. } => {} - LnPayState::Funded if return_on_funding => return Ok(None), - LnPayState::Funded => {} + | LnPayState::WaitingForRefund { .. } + | LnPayState::Funded { block_height: _ } => {} LnPayState::UnexpectedError { error_message } => { bail!("UnexpectedError: {error_message}") } diff --git a/fedimint-nwc/src/state.rs b/fedimint-nwc/src/state.rs index 8370fb5..0f1c868 100644 --- a/fedimint-nwc/src/state.rs +++ b/fedimint-nwc/src/state.rs @@ -4,7 +4,7 @@ use std::str::FromStr; use std::sync::Arc; use std::time::Duration; -use multimint::fedimint_core::api::InviteCode; +use multimint::fedimint_core::invite_code::InviteCode; use nostr_sdk::{Event, EventId, JsonUtil}; use tokio::sync::Mutex; use tracing::{debug, error, info}; From f30b5a287bfe7c58fc2a27350f1c55c30e03c654 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 11:09:21 -0700 Subject: [PATCH 13/15] fix: multimint workspace version --- Cargo.lock | 2 +- multimint/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b857a46..3545770 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2999,7 +2999,7 @@ dependencies = [ [[package]] name = "multimint" -version = "0.3.8" +version = "0.4.0" dependencies = [ "anyhow", "fedimint-api-client", diff --git a/multimint/Cargo.toml b/multimint/Cargo.toml index 012a36b..8030238 100644 --- a/multimint/Cargo.toml +++ b/multimint/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "multimint" description = "A library for managing fedimint clients across multiple federations" -version = "0.3.8" +version.workspace = true edition.workspace = true repository.workspace = true keywords.workspace = true From 51b297c615d7cd361f5fecf1acd821353b24f1cf Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 11:12:27 -0700 Subject: [PATCH 14/15] chore: use published multimint for publishing --- Cargo.lock | 28 ++++++++++++++++++++++++++-- fedimint-clientd/Cargo.toml | 3 ++- fedimint-nwc/Cargo.toml | 3 ++- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3545770..4bcb3b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1373,7 +1373,7 @@ dependencies = [ "lnurl-rs 0.5.0", "metrics", "metrics-exporter-prometheus", - "multimint", + "multimint 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.12.7", "serde", "serde_json", @@ -1611,7 +1611,7 @@ dependencies = [ "futures-util", "image", "itertools 0.13.0", - "multimint", + "multimint 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "nostr", "nostr-sdk", "qrcode", @@ -3019,6 +3019,30 @@ dependencies = [ "tracing", ] +[[package]] +name = "multimint" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fc5c84a70ef0fd1e87b9aa3bea319b90785a1665757da27242474e1655cb96" +dependencies = [ + "anyhow", + "fedimint-api-client", + "fedimint-client", + "fedimint-core", + "fedimint-ln-client", + "fedimint-ln-common", + "fedimint-mint-client", + "fedimint-rocksdb", + "fedimint-wallet-client", + "futures-util", + "hex", + "rand", + "serde", + "serde_json", + "tokio", + "tracing", +] + [[package]] name = "negentropy" version = "0.3.1" diff --git a/fedimint-clientd/Cargo.toml b/fedimint-clientd/Cargo.toml index fa23d5e..c7d126c 100644 --- a/fedimint-clientd/Cargo.toml +++ b/fedimint-clientd/Cargo.toml @@ -35,7 +35,8 @@ time = { version = "0.3.25", features = ["formatting"] } chrono = "0.4.31" futures-util = "0.3.30" clap = { version = "3", features = ["derive", "env"] } -multimint = { path = "../multimint" } +multimint = { version = "0.4.0" } +# multimint = { path = "../multimint" } hex = "0.4.3" futures = "0.3" diff --git a/fedimint-nwc/Cargo.toml b/fedimint-nwc/Cargo.toml index 6b69efd..03d29e0 100644 --- a/fedimint-nwc/Cargo.toml +++ b/fedimint-nwc/Cargo.toml @@ -18,7 +18,8 @@ dotenv = "0.15.0" futures-util = "0.3.30" image = "0.25.1" itertools = "0.13.0" -multimint = { path = "../multimint" } +# multimint = { path = "../multimint" } +multimint = { version = "0.4.0" } nostr = { version = "0.31.2", features = ["nip47"] } nostr-sdk = { version = "0.31.0", features = ["nip47"] } qrcode = "0.14.0" From ca34571b5013a5e8df45a29d089e3ba2a5793f11 Mon Sep 17 00:00:00 2001 From: "kody.low" Date: Wed, 9 Oct 2024 11:17:14 -0700 Subject: [PATCH 15/15] fix: add missing nwc description field --- fedimint-nwc/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/fedimint-nwc/Cargo.toml b/fedimint-nwc/Cargo.toml index 03d29e0..9b5994d 100644 --- a/fedimint-nwc/Cargo.toml +++ b/fedimint-nwc/Cargo.toml @@ -1,5 +1,6 @@ [package] name = "fedimint-nwc" +description = "A Nostr Wallet Connect implementation using Fedimint" version.workspace = true edition.workspace = true repository.workspace = true