From c1a0edc1d5fbbe29c068eb6142355c3941b18377 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Mon, 16 Sep 2024 18:59:36 -0500 Subject: [PATCH] Update fedimint to 0.4.2 --- Cargo.lock | 1145 +++++++++++++++------------- Cargo.toml | 20 +- src/bridge.rs | 12 +- src/conf.rs | 1 + src/core.rs | 17 +- src/db.rs | 12 +- src/db_models/lightning_payment.rs | 14 +- src/db_models/lightning_receive.rs | 14 +- src/db_models/onchain_payment.rs | 20 +- src/db_models/onchain_receive.rs | 18 +- src/fedimint_client.rs | 73 +- src/main.rs | 5 +- 12 files changed, 731 insertions(+), 620 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 73d3332..17d60bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,9 +20,9 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] @@ -34,10 +34,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "ahash" -version = "0.3.8" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] [[package]] name = "ahash" @@ -120,11 +131,17 @@ dependencies = [ "libc", ] +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + [[package]] name = "anyhow" -version = "1.0.83" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "approx" @@ -194,8 +211,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" dependencies = [ - "event-listener 5.3.0", - "event-listener-strategy 0.5.2", + "event-listener", + "event-listener-strategy", "futures-core", "pin-project-lite", ] @@ -207,8 +224,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" dependencies = [ "concurrent-queue", - "event-listener 5.3.0", - "event-listener-strategy 0.5.2", + "event-listener", + "event-listener-strategy", "futures-core", "pin-project-lite", ] @@ -258,12 +275,12 @@ 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 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener", + "event-listener-strategy", "pin-project-lite", ] @@ -280,7 +297,7 @@ dependencies = [ "async-task", "blocking", "cfg-if", - "event-listener 5.3.0", + "event-listener", "futures-lite", "rustix", "tracing", @@ -369,9 +386,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[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", @@ -381,19 +398,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" @@ -413,12 +436,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" 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]] @@ -434,13 +457,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[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" @@ -485,11 +505,8 @@ version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" dependencies = [ - "base64 0.13.1", - "bech32", + "bech32 0.9.1", "bitcoin_hashes 0.11.0", - "core2", - "hashbrown 0.8.2", "secp256k1 0.24.3", "serde", ] @@ -500,14 +517,22 @@ version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" dependencies = [ - "bech32", + "base64 0.13.1", + "bech32 0.9.1", "bitcoin-private", "bitcoin_hashes 0.12.0", + "core2", "hex_lit", "secp256k1 0.27.0", "serde", ] +[[package]] +name = "bitcoin-internals" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f9997f8650dd818369931b5672a18dbef95324d0513aa99aae758de8ce86e5b" + [[package]] name = "bitcoin-private" version = "0.1.0" @@ -520,7 +545,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" dependencies = [ - "core2", "serde", ] @@ -531,15 +555,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" dependencies = [ "bitcoin-private", + "core2", "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", @@ -549,11 +575,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", ] @@ -597,7 +624,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.7", + "digest", ] [[package]] @@ -608,18 +635,18 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-buffer" -version = "0.9.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] -name = "block-buffer" -version = "0.10.4" +name = "block-padding" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ "generic-array", ] @@ -649,9 +676,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", @@ -737,6 +764,15 @@ dependencies = [ "wayland-client", ] +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + [[package]] name = "cc" version = "1.0.97" @@ -783,9 +819,58 @@ dependencies = [ "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clap" +version = "4.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +dependencies = [ + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.61", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + [[package]] name = "clipboard-win" version = "5.3.1" @@ -1029,7 +1114,7 @@ dependencies = [ "libm", "log", "rangemap", - "rustc-hash", + "rustc-hash 1.1.0", "rustybuzz 0.11.0", "self_cell", "swash", @@ -1123,41 +1208,6 @@ dependencies = [ "zbus", ] -[[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", - "syn 2.0.61", -] - -[[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.61", -] - [[package]] name = "data-url" version = "0.3.1" @@ -1230,22 +1280,13 @@ dependencies = [ "syn 2.0.61", ] -[[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", ] @@ -1356,6 +1397,15 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +[[package]] +name = "email_address" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1019fa28f600f5b581b7a603d515c3f1635da041ca211b5055804788673abfe" +dependencies = [ + "serde", +] + [[package]] name = "encoding_rs" version = "0.8.34" @@ -1438,11 +1488,12 @@ checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" [[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", "log", "reqwest 0.11.27", "serde", @@ -1467,17 +1518,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "5.3.0" @@ -1489,23 +1529,13 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "event-listener-strategy" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.3.0", + "event-listener", "pin-project-lite", ] @@ -1544,22 +1574,55 @@ dependencies = [ [[package]] name = "fedimint-aead" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa46131197bf5cddef3a4546542574f776645cf35823b0175bfdfe9f8149db41" +checksum = "b8d8694828a5f211d9f42dd513d47a29464027666c0610a46b06745f91fb9270" dependencies = [ "anyhow", "argon2", "hex", "rand 0.8.5", - "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.3", ] [[package]] name = "fedimint-bip39" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc00dc4e5274c6dbc783699465952bc36c696a41689b955223730585ba9c4cb" +checksum = "7a0b2301eb60061096ab7f82bf1b8d5a98980cf27ea5fef07cbc47a1d58e2afa" dependencies = [ "bip39", "fedimint-client", @@ -1569,19 +1632,19 @@ dependencies = [ [[package]] name = "fedimint-bitcoind" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4295aca5fb659d27b87637f3db22dc01fb88b7c184eb8dfa13b6b6db2670c9b4" +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 0.8.5", "serde", "serde_json", @@ -1591,26 +1654,26 @@ dependencies = [ [[package]] name = "fedimint-build" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b159f3fc474342daf132b99ff55ad6b97827fbf9d4c6622060dfa7293c72d8cf" +checksum = "87dbcb06902f6d2dc7e8c572c3800cc3473b89f088d6b2a63e184e3374f99876" dependencies = [ "serde_json", ] [[package]] name = "fedimint-client" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e61fc3df48e05f5bf14e930e25cb22e8ee09700ab09ca09470c2a4c48f5c1fb8" +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", @@ -1618,8 +1681,8 @@ dependencies = [ "futures", "itertools 0.12.1", "rand 0.8.5", - "reqwest 0.12.4", - "ring 0.17.8", + "reqwest 0.12.7", + "ring", "secp256k1-zkp", "serde", "serde_json", @@ -1633,9 +1696,9 @@ dependencies = [ [[package]] name = "fedimint-core" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0565b08e6024a01137769aa625f92b8b6e1aa40397ed6aac6e955487ad012d0e" +checksum = "283161ed55d56159b03bb95a5d2416e794e4a8129fef80911ccfecbc06fd038b" dependencies = [ "anyhow", "async-lock", @@ -1643,16 +1706,17 @@ dependencies = [ "async-trait", "backon", "backtrace", - "bech32", + "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", @@ -1663,25 +1727,23 @@ dependencies = [ "itertools 0.12.1", "js-sys", "jsonrpsee-core", - "jsonrpsee-types", "jsonrpsee-wasm-client", - "jsonrpsee-ws-client", "lightning", "lightning-invoice", - "lru", "macro_rules_attribute", - "miniscript 10.0.0", + "miniscript", "parity-scale-codec", "rand 0.8.5", + "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", @@ -1689,9 +1751,9 @@ dependencies = [ [[package]] name = "fedimint-derive" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5e7c04751a72a54beb8099fc4ac97c57d0f895a948418fad4dae82517f4b062" +checksum = "de94e26512dcff3911300cff08160b49fb1ac09c52079fbd74589c31c9e7be9e" dependencies = [ "itertools 0.12.1", "proc-macro2", @@ -1701,52 +1763,52 @@ dependencies = [ [[package]] name = "fedimint-derive-secret" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cbfb3491f2e4433e88202308e43a2638eed142f0b9702c8abf79b1a77585d2" +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.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431d732bd08d6db7b6cb88baf305887cd1586e3172147d37532eae858618d3d8" +checksum = "e809872368a5c89e1b51207fc5f6ab2722a35036c83b4629f4e54521d765fce2" dependencies = [ - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", ] [[package]] name = "fedimint-ln-client" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0abc227df7a331ac3530f6d3c970ee9e830622538faf23fea1eef2cc8034f14" +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-threshold-crypto", + "fedimint-logging", "futures", "itertools 0.12.1", "lightning-invoice", + "lnurl-rs", "rand 0.8.5", - "reqwest 0.11.27", - "secp256k1 0.24.3", - "secp256k1-zkp", + "reqwest 0.12.7", + "secp256k1 0.27.0", "serde", "serde_json", "strum", @@ -1754,45 +1816,35 @@ dependencies = [ "thiserror", "tokio", "tracing", - "url", ] [[package]] name = "fedimint-ln-common" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc1c2b3486201b2dd3fbce8d41d711576efdd955e9a77253160681936e63be8" +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 0.8.5", - "secp256k1 0.24.3", + "secp256k1 0.27.0", "serde", "serde-big-array", "serde_json", - "strum", - "strum_macros", "thiserror", "tracing", - "url", ] [[package]] name = "fedimint-logging" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5edbd4a75d046c86c69dee27221877471de5505edcb3b207af305b66f41643" +checksum = "64d117d41c1664ad71b24ed988a3256ce85e473339376a499ea76cb717929f08" dependencies = [ "anyhow", "tracing-subscriber", @@ -1800,18 +1852,22 @@ dependencies = [ [[package]] name = "fedimint-mint-client" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e9a068271ee12d13021f6ab6b5b4188854606d265742566195ad318648bbd5" +checksum = "fe1410fd14e14ed6a2f7da84d9cbf641459c0254541224aaf4c6466aa395733c" dependencies = [ "anyhow", "aquamarine", "async-stream", "async-trait", "base64 0.22.1", + "base64-url", "bincode", - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.12.0", + "bls12_381", + "clap", "erased-serde", + "fedimint-api-client", "fedimint-client", "fedimint-core", "fedimint-derive-secret", @@ -1820,13 +1876,13 @@ dependencies = [ "fedimint-tbs", "fedimint-threshold-crypto", "futures", + "hex", "itertools 0.12.1", - "rand 0.8.5", - "secp256k1 0.24.3", "secp256k1-zkp", "serde", "serde-big-array", "serde_json", + "serdect", "strum", "strum_macros", "thiserror", @@ -1836,39 +1892,31 @@ dependencies = [ [[package]] name = "fedimint-mint-common" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f0c712094936ff1e6bbd809a40a5cec2e04543383ae38ccadc0dc28c17f721" +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 0.8.5", - "secp256k1 0.24.3", "secp256k1-zkp", "serde", - "strum", - "strum_macros", "thiserror", "tracing", ] [[package]] name = "fedimint-tbs" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4160448f066931ebeb61f8593522fa1c4c5569867ee2f1898b043bda21241d" +checksum = "4acd4528290ba62c8c2ec9ca86a6a67634190fb994efa816eefdf6889ccfb60c" dependencies = [ - "bitcoin_hashes 0.11.0", "bls12_381", - "ff", + "fedimint-core", "group", + "hex", "rand 0.8.5", "rand_chacha", "serde", @@ -1877,9 +1925,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", @@ -1899,67 +1947,56 @@ dependencies = [ [[package]] name = "fedimint-wallet-client" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd720a8a8f312cb2b9ed02b29399e63ce048a5d2c22e3d8a017c665df8c80183" +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 0.8.5", - "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.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a87bc4fc629ce3b066eb9cfab8c310ac6666a14edffd668564801061729ff0" +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 0.8.5", - "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 0.6.4", @@ -1973,7 +2010,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.7.2", ] [[package]] @@ -2232,9 +2269,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "gl_generator" @@ -2255,15 +2292,15 @@ checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[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", @@ -2340,7 +2377,7 @@ dependencies = [ "cosmic-text", "etagere", "lru", - "rustc-hash", + "rustc-hash 1.1.0", "wgpu", ] @@ -2398,9 +2435,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 0.6.4", @@ -2454,11 +2491,12 @@ dependencies = [ "async-trait", "bincode", "bip39", - "bitcoin 0.29.2", + "bitcoin 0.30.2", "chrono", "config", "diesel", "diesel_migrations", + "fedimint-api-client", "fedimint-bip39", "fedimint-client", "fedimint-core", @@ -2466,6 +2504,7 @@ dependencies = [ "fedimint-ln-common", "fedimint-mint-client", "fedimint-wallet-client", + "hex", "home", "iced", "log", @@ -2480,16 +2519,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "hashbrown" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" -dependencies = [ - "ahash 0.3.8", - "autocfg", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -2545,6 +2574,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -2560,6 +2595,12 @@ dependencies = [ "serde", ] +[[package]] +name = "hex-conservative" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" + [[package]] name = "hex_fmt" version = "0.3.0" @@ -2720,19 +2761,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.13", "rustls-pki-types", "tokio", - "tokio-rustls 0.25.0", + "tokio-rustls 0.26.0", "tower-service", + "webpki-roots 0.26.3", ] [[package]] @@ -2805,7 +2847,7 @@ dependencies = [ "once_cell", "palette", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smol_str", "thiserror", "web-time", @@ -2819,7 +2861,7 @@ dependencies = [ "futures", "iced_core", "log", - "rustc-hash", + "rustc-hash 1.1.0", "tokio", "wasm-bindgen-futures", "wasm-timer", @@ -2840,7 +2882,7 @@ dependencies = [ "lyon_path", "once_cell", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "thiserror", "unicode-segmentation", ] @@ -2880,7 +2922,7 @@ dependencies = [ "kurbo 0.10.4", "log", "resvg", - "rustc-hash", + "rustc-hash 1.1.0", "softbuffer", "tiny-skia", ] @@ -2901,7 +2943,7 @@ dependencies = [ "lyon", "once_cell", "resvg", - "rustc-hash", + "rustc-hash 1.1.0", "thiserror", "wgpu", ] @@ -2915,7 +2957,7 @@ dependencies = [ "iced_runtime", "num-traits", "qrcode", - "rustc-hash", + "rustc-hash 1.1.0", "thiserror", "unicode-segmentation", ] @@ -2929,7 +2971,7 @@ dependencies = [ "iced_graphics", "iced_runtime", "log", - "rustc-hash", + "rustc-hash 1.1.0", "thiserror", "tracing", "wasm-bindgen-futures", @@ -2939,12 +2981,6 @@ dependencies = [ "winit", ] -[[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" @@ -2963,9 +2999,9 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[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", @@ -3047,6 +3083,16 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + [[package]] name = "instant" version = "0.1.12" @@ -3156,53 +3202,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.5" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa" +checksum = "89841d4f03a14c055eb41d4f41901819573ef948e8ee0d5c86466fd286b2ce7f" 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.13", "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.5" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" +checksum = "ff79651479f69ada7bda604ef2acf3f1aa50755d97cc36d25ff04c2664f9d96f" dependencies = [ - "anyhow", "async-trait", - "beef", "futures-timer", "futures-util", "jsonrpsee-types", "pin-project", - "rustc-hash", + "rustc-hash 2.0.0", "serde", "serde_json", "thiserror", @@ -3214,12 +3258,11 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.22.5" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "150d6168405890a7a3231a3c74843f58b8959471f6df76078db2619ddee1d07d" +checksum = "531e386460425e49679587871a056f2895a47dade21457324ad1262cd78ef6d9" dependencies = [ - "anyhow", - "beef", + "http 1.1.0", "serde", "serde_json", "thiserror", @@ -3227,9 +3270,9 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.22.5" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f448d8eacd945cc17b6c0b42c361531ca36a962ee186342a97cdb8fca679cd77" +checksum = "5a2d2206c8f04c6b79a11bd1d92d6726b6f7fd3dec57c91e07fa53e867268bbb" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3238,11 +3281,11 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.22.5" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58b9db2dfd5bb1194b0ce921504df9ceae210a345bc2f6c5a61432089bbab070" +checksum = "87bc869e143d430e748988261d19b630e8f1692074e68f1a7f0eb4c521d2fc58" dependencies = [ - "http 0.2.12", + "http 1.1.0", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -3302,9 +3345,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -3323,7 +3366,7 @@ 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]] @@ -3367,27 +3410,28 @@ dependencies = [ [[package]] name = "lightning" -version = "0.0.118" +version = "0.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cec5fa9382154fe9671e8df93095b800c7d77abc66e2a5ef839d672521c5e" +checksum = "5fd92d4aa159374be430c7590e169b4a6c0fb79018f5bc4ea1bffde536384db3" dependencies = [ - "bitcoin 0.29.2", + "bitcoin 0.30.2", "core2", - "hashbrown 0.8.2", + "hashbrown 0.13.2", + "hex-conservative", + "libm", + "possiblyrandom", ] [[package]] name = "lightning-invoice" -version = "0.26.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb24878b0f4ef75f020976c886d9ad1503867802329cc963e0ab4623ea3b25c" +checksum = "26d07d01cf197bf2184b929b7dc94aa70d935aac6df896c256a3a9475b7e9d40" dependencies = [ - "bech32", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", + "bech32 0.9.1", + "bitcoin 0.30.2", "lightning", - "num-traits", - "secp256k1 0.24.3", + "secp256k1 0.27.0", "serde", ] @@ -3409,6 +3453,25 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0b5399f6804fbab912acbd8878ed3532d506b7c951b8f9f164ef90fef39e3f4" +[[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", +] + [[package]] name = "lock_api" version = "0.4.12" @@ -3601,15 +3664,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" @@ -3631,15 +3685,25 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3655,7 +3719,7 @@ dependencies = [ "indexmap", "log", "num-traits", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", "thiserror", @@ -3878,9 +3942,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3891,12 +3955,6 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-src" version = "300.2.3+3.2.1" @@ -3975,9 +4033,9 @@ dependencies = [ [[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", ] @@ -4083,7 +4141,7 @@ dependencies = [ "libc", "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -4267,7 +4325,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide", + "miniz_oxide 0.7.2", ] [[package]] @@ -4285,6 +4343,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[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" @@ -4376,6 +4443,54 @@ dependencies = [ "memchr", ] +[[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.13", + "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 0.8.5", + "ring", + "rustc-hash 2.0.0", + "rustls 0.23.13", + "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" @@ -4637,7 +4752,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-rustls 0.24.1", @@ -4653,9 +4768,9 @@ dependencies = [ [[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.1", "bytes", @@ -4665,7 +4780,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", @@ -4674,22 +4789,24 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.4", + "quinn", + "rustls 0.23.13", "rustls-pemfile 2.1.2", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "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.3", + "windows-registry", ] [[package]] @@ -4718,21 +4835,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" @@ -4743,8 +4845,8 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin 0.9.8", - "untrusted 0.9.0", + "spin", + "untrusted", "windows-sys 0.52.0", ] @@ -4821,6 +4923,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 = "rustix" version = "0.38.34" @@ -4834,18 +4942,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.20.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" -dependencies = [ - "log", - "ring 0.16.20", - "sct", - "webpki", -] - [[package]] name = "rustls" version = "0.21.12" @@ -4853,21 +4949,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.8", + "ring", "rustls-webpki 0.101.7", "sct", ] [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "log", - "ring 0.17.8", + "once_cell", + "ring", "rustls-pki-types", - "rustls-webpki 0.102.3", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -4903,19 +5000,19 @@ 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]] name = "rustls-webpki" -version = "0.102.3" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.8", + "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -4999,8 +5096,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]] @@ -5035,6 +5132,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ "bitcoin_hashes 0.12.0", + "rand 0.8.5", "secp256k1-sys 0.8.1", "serde", ] @@ -5059,24 +5157,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 0.8.5", - "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]] @@ -5093,9 +5192,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.201" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] @@ -5111,9 +5210,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", @@ -5122,11 +5221,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.117" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -5164,16 +5264,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]] @@ -5184,7 +5281,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -5195,7 +5292,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -5204,7 +5301,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.7", + "digest", "keccak", ] @@ -5359,25 +5456,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 0.8.5", - "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" @@ -5410,9 +5501,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -5426,7 +5517,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -5494,6 +5585,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "sys-locale" version = "0.3.1" @@ -5563,18 +5663,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", @@ -5686,46 +5786,34 @@ 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 0.12.2", "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", "syn 2.0.61", ] -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.9", - "tokio", - "webpki", -] - [[package]] name = "tokio-rustls" version = "0.24.1" @@ -5738,11 +5826,11 @@ dependencies = [ [[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.13", "rustls-pki-types", "tokio", ] @@ -6061,12 +6149,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[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" @@ -6075,9 +6157,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", @@ -6155,36 +6237,6 @@ dependencies = [ "getrandom", ] -[[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.61", -] - [[package]] name = "valuable" version = "0.1.0" @@ -6438,16 +6490,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" @@ -6456,9 +6498,9 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" dependencies = [ "rustls-pki-types", ] @@ -6512,7 +6554,7 @@ dependencies = [ "parking_lot 0.12.2", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "web-sys", @@ -6556,7 +6598,7 @@ dependencies = [ "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -6634,7 +6676,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6643,7 +6685,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]] @@ -6670,7 +6742,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]] @@ -6705,18 +6786,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]] @@ -6733,9 +6814,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" @@ -6751,9 +6832,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" @@ -6769,15 +6850,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" @@ -6793,9 +6874,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" @@ -6811,9 +6892,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" @@ -6829,9 +6910,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" @@ -6847,9 +6928,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 = "winit" @@ -6937,16 +7018,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wyz" version = "0.5.1" @@ -7073,7 +7144,7 @@ dependencies = [ "async-trait", "blocking", "enumflags2", - "event-listener 5.3.0", + "event-listener", "futures-core", "futures-sink", "futures-util", diff --git a/Cargo.toml b/Cargo.toml index db39ed5..28df72c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ default = [] vendored = ["rusqlite/bundled-sqlcipher-vendored-openssl"] [dependencies] -anyhow = "1" +anyhow = "1.0.86" log = "0.4" pretty_env_logger = "0.5" # todo swap to a file logger iced = { git = "https://github.com/iced-rs/iced", rev = "b30d34f", features = ["debug", "tokio", "svg", "qr_code", "advanced"] } @@ -26,16 +26,18 @@ diesel_migrations = { version = "2.1.0", features = ["sqlite"] } uuid = { version = "1.8", features = ["v4"] } async-trait = "0.1.77" bincode = "1.3.3" +hex = "0.4.3" -bitcoin = { version = "0.29.2", features = ["base64"] } +bitcoin = { version = "0.30.2", features = ["base64"] } bip39 = "2.0.0" -fedimint-client = "0.3.1" -fedimint-core = "0.3.1" -fedimint-wallet-client = "0.3.1" -fedimint-mint-client = "0.3.1" -fedimint-ln-client = "0.3.1" -fedimint-bip39 = "0.3.1" -fedimint-ln-common = "0.3.1" +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-bip39 = "0.4.2" +fedimint-ln-common = "0.4.2" [dev-dependencies] tempdir = "0.3.7" diff --git a/src/bridge.rs b/src/bridge.rs index eebfe5b..5dc759a 100644 --- a/src/bridge.rs +++ b/src/bridge.rs @@ -1,7 +1,8 @@ use crate::components::{FederationItem, TransactionItem}; +use bitcoin::address::NetworkUnchecked; use bitcoin::{Address, Txid}; -use fedimint_core::api::InviteCode; use fedimint_core::config::ClientConfig; +use fedimint_core::invite_code::InviteCode; use fedimint_core::Amount; use fedimint_ln_common::lightning_invoice::Bolt11Invoice; use tokio::sync::mpsc; @@ -18,7 +19,7 @@ pub enum UICoreMsg { SendLightning(Bolt11Invoice), ReceiveLightning(Amount), SendOnChain { - address: Address, + address: Address, amount_sats: Option, }, ReceiveOnChain, @@ -102,7 +103,12 @@ impl UIHandle { .await; } - pub async fn send_onchain(&self, id: Uuid, address: Address, amount_sats: Option) { + pub async fn send_onchain( + &self, + id: Uuid, + address: Address, + amount_sats: Option, + ) { self.msg_send(UICoreMsgPacket { msg: UICoreMsg::SendOnChain { address, diff --git a/src/conf.rs b/src/conf.rs index fb9ed1a..91c7811 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -19,6 +19,7 @@ pub fn data_dir(network: Network) -> PathBuf { Network::Testnet => default.join("testnet3"), Network::Regtest => default.join("regtest"), Network::Signet => default.join("signet"), + _ => panic!("Invalid network"), } } diff --git a/src/core.rs b/src/core.rs index 089af79..b461b68 100644 --- a/src/core.rs +++ b/src/core.rs @@ -1,8 +1,9 @@ use anyhow::anyhow; use bip39::Mnemonic; +use bitcoin::address::NetworkUnchecked; use bitcoin::{Address, Network}; -use fedimint_core::api::InviteCode; use fedimint_core::config::{ClientConfig, FederationId}; +use fedimint_core::invite_code::InviteCode; use fedimint_core::Amount; use fedimint_ln_client::{LightningClientModule, PayType}; use fedimint_ln_common::config::FeeToAmount; @@ -13,7 +14,7 @@ use std::path::PathBuf; use std::str::FromStr; use std::sync::atomic::AtomicBool; use std::sync::Arc; -use std::time::{Duration, Instant, SystemTime}; +use std::time::{Duration, Instant}; use iced::{ futures::{channel::mpsc::Sender, SinkExt}, @@ -43,7 +44,6 @@ use crate::{ }, }; -const PEG_IN_TIMEOUT_YEAR: Duration = Duration::from_secs(86400 * 365); const HARBOR_FILE_NAME: &str = "harbor.sqlite"; #[derive(Clone)] @@ -206,7 +206,7 @@ impl HarborCore { async fn send_onchain( &self, msg_id: Uuid, - address: Address, + address: Address, sats: Option, ) -> anyhow::Result<()> { // todo go through all clients and select the first one that has enough balance @@ -276,15 +276,12 @@ impl HarborCore { let client = self.get_client().await.fedimint_client; let onchain = client.get_first_module::(); - // expire the address in 1 year - let valid_until = SystemTime::now() + PEG_IN_TIMEOUT_YEAR; - - let (op_id, address) = onchain.get_deposit_address(valid_until, ()).await?; + let (op_id, address, _) = onchain.allocate_deposit_address_expert_only(()).await?; self.storage .create_onchain_receive(op_id, client.federation_id(), address.clone())?; - let sub = onchain.subscribe_deposit_updates(op_id).await?; + let sub = onchain.subscribe_deposit(op_id).await?; spawn_onchain_receive_subscription( self.tx.clone(), @@ -301,7 +298,7 @@ impl HarborCore { async fn get_federation_info(&self, invite_code: InviteCode) -> anyhow::Result { let download = Instant::now(); - let config = ClientConfig::download_from_invite_code(&invite_code) + let config = fedimint_api_client::download_from_invite_code(&invite_code) .await .map_err(|e| { error!("Could not download federation info: {e}"); diff --git a/src/db.rs b/src/db.rs index 67f50bd..c216a6a 100644 --- a/src/db.rs +++ b/src/db.rs @@ -3,6 +3,7 @@ use crate::db_models::{ Fedimint, LightningPayment, LightningReceive, NewFedimint, NewProfile, OnChainPayment, OnChainReceive, Profile, }; +use bitcoin::address::NetworkUnchecked; use bitcoin::{Address, Txid}; use diesel::{ connection::SimpleConnection, @@ -19,6 +20,7 @@ use std::{sync::Arc, time::Duration}; pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!(); +#[allow(dead_code)] pub(crate) fn check_password(url: &str, password: &str) -> anyhow::Result<()> { let conn = Connection::open_with_flags( url, @@ -114,7 +116,7 @@ pub trait DBConnection { &self, operation_id: OperationId, fedimint_id: FederationId, - address: Address, + address: Address, amount_sats: u64, fee_sats: u64, ) -> anyhow::Result<()>; @@ -277,7 +279,7 @@ impl DBConnection for SQLConnection { &self, operation_id: OperationId, fedimint_id: FederationId, - address: Address, + address: Address, amount_sats: u64, fee_sats: u64, ) -> anyhow::Result<()> { @@ -675,7 +677,9 @@ mod tests { let mut conn = pool.get().unwrap(); let operation_id = OperationId::new_random(); - let address = Address::from_str("tb1qd28npep0s8frcm3y7dxqajkcy2m40eysplyr9v").unwrap(); + let address = Address::from_str("tb1qd28npep0s8frcm3y7dxqajkcy2m40eysplyr9v") + .unwrap() + .assume_checked(); let amount: u64 = 10_000; let fee: u64 = 200; @@ -697,7 +701,7 @@ mod tests { payment.fedimint_id(), FederationId::from_str(FEDERATION_ID).unwrap() ); - assert_eq!(payment.address(), address); + assert_eq!(payment.address().assume_checked(), address); assert!(payment.amount_sats.is_none()); assert!(payment.fee_sats.is_none()); assert_eq!(payment.txid(), None); diff --git a/src/db_models/lightning_payment.rs b/src/db_models/lightning_payment.rs index 7049179..db04921 100644 --- a/src/db_models/lightning_payment.rs +++ b/src/db_models/lightning_payment.rs @@ -1,7 +1,7 @@ use crate::components::{TransactionDirection, TransactionItem, TransactionItemKind}; use crate::db_models::schema::lightning_payments; use crate::db_models::PaymentStatus; -use bitcoin::hashes::hex::{FromHex, ToHex}; +use bitcoin::hashes::hex::FromHex; use diesel::prelude::*; use fedimint_core::config::FederationId; use fedimint_core::core::OperationId; @@ -87,9 +87,9 @@ impl LightningPayment { return Err(anyhow::anyhow!("Internal error: amount mismatch")); } - let payment_hash = bolt11.payment_hash().to_hex(); + let payment_hash = bolt11.payment_hash().to_string(); let new = NewLightningPayment { - operation_id: operation_id.to_string(), + operation_id: operation_id.fmt_full().to_string(), fedimint_id: fedimint_id.to_string(), payment_hash, bolt11: bolt11.to_string(), @@ -110,7 +110,7 @@ impl LightningPayment { operation_id: OperationId, ) -> anyhow::Result> { Ok(lightning_payments::table - .filter(lightning_payments::operation_id.eq(operation_id.to_string())) + .filter(lightning_payments::operation_id.eq(operation_id.fmt_full().to_string())) .first::(conn) .optional()?) } @@ -122,10 +122,10 @@ impl LightningPayment { ) -> anyhow::Result<()> { diesel::update( lightning_payments::table - .filter(lightning_payments::operation_id.eq(operation_id.to_string())), + .filter(lightning_payments::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(( - lightning_payments::preimage.eq(Some(preimage.to_hex())), + lightning_payments::preimage.eq(Some(hex::encode(preimage))), lightning_payments::status.eq(PaymentStatus::Success as i32), )) .execute(conn)?; @@ -139,7 +139,7 @@ impl LightningPayment { ) -> anyhow::Result<()> { diesel::update( lightning_payments::table - .filter(lightning_payments::operation_id.eq(operation_id.to_string())), + .filter(lightning_payments::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(lightning_payments::status.eq(PaymentStatus::Failed as i32)) .execute(conn)?; diff --git a/src/db_models/lightning_receive.rs b/src/db_models/lightning_receive.rs index aaede55..bf8d780 100644 --- a/src/db_models/lightning_receive.rs +++ b/src/db_models/lightning_receive.rs @@ -1,7 +1,7 @@ use crate::components::{TransactionDirection, TransactionItem, TransactionItemKind}; use crate::db_models::schema::lightning_receives; use crate::db_models::PaymentStatus; -use bitcoin::hashes::hex::{FromHex, ToHex}; +use bitcoin::hashes::hex::FromHex; use diesel::prelude::*; use fedimint_core::config::FederationId; use fedimint_core::core::OperationId; @@ -87,15 +87,15 @@ impl LightningReceive { return Err(anyhow::anyhow!("Internal error: amount mismatch")); } - let payment_hash = bolt11.payment_hash().to_hex(); + let payment_hash = bolt11.payment_hash().to_string(); let new = NewLightningReceive { - operation_id: operation_id.to_string(), + operation_id: operation_id.fmt_full().to_string(), fedimint_id: fedimint_id.to_string(), payment_hash, bolt11: bolt11.to_string(), amount_msats: amount.msats as i64, fee_msats: fee.msats as i64, - preimage: preimage.to_hex(), + preimage: hex::encode(preimage), status: PaymentStatus::Pending as i32, }; @@ -111,7 +111,7 @@ impl LightningReceive { operation_id: OperationId, ) -> anyhow::Result> { Ok(lightning_receives::table - .filter(lightning_receives::operation_id.eq(operation_id.to_string())) + .filter(lightning_receives::operation_id.eq(operation_id.fmt_full().to_string())) .first::(conn) .optional()?) } @@ -122,7 +122,7 @@ impl LightningReceive { ) -> anyhow::Result<()> { diesel::update( lightning_receives::table - .filter(lightning_receives::operation_id.eq(operation_id.to_string())), + .filter(lightning_receives::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(lightning_receives::status.eq(PaymentStatus::Success as i32)) .execute(conn)?; @@ -136,7 +136,7 @@ impl LightningReceive { ) -> anyhow::Result<()> { diesel::update( lightning_receives::table - .filter(lightning_receives::operation_id.eq(operation_id.to_string())), + .filter(lightning_receives::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(lightning_receives::status.eq(PaymentStatus::Failed as i32)) .execute(conn)?; diff --git a/src/db_models/onchain_payment.rs b/src/db_models/onchain_payment.rs index 538d290..761f1db 100644 --- a/src/db_models/onchain_payment.rs +++ b/src/db_models/onchain_payment.rs @@ -1,7 +1,7 @@ use crate::components::{TransactionDirection, TransactionItem, TransactionItemKind}; use crate::db_models::schema::on_chain_payments; use crate::db_models::PaymentStatus; -use bitcoin::hashes::hex::{FromHex, ToHex}; +use bitcoin::address::NetworkUnchecked; use bitcoin::{Address, Txid}; use diesel::prelude::*; use fedimint_core::config::FederationId; @@ -42,14 +42,14 @@ impl OnChainPayment { FederationId::from_str(&self.fedimint_id).expect("invalid fedimint id") } - pub fn address(&self) -> Address { + pub fn address(&self) -> Address { Address::from_str(&self.address).expect("invalid address") } pub fn txid(&self) -> Option { self.txid .as_ref() - .map(|p| FromHex::from_hex(p).expect("invalid txid")) + .map(|p| Txid::from_str(p).expect("invalid txid")) } pub fn status(&self) -> PaymentStatus { @@ -60,14 +60,14 @@ impl OnChainPayment { conn: &mut SqliteConnection, operation_id: OperationId, fedimint_id: FederationId, - address: Address, + address: Address, amount_sats: u64, fee_sats: u64, ) -> anyhow::Result<()> { let new = NewOnChainPayment { - operation_id: operation_id.to_string(), + operation_id: operation_id.fmt_full().to_string(), fedimint_id: fedimint_id.to_string(), - address: address.to_string(), + address: address.assume_checked().to_string(), amount_sats: amount_sats as i64, fee_sats: fee_sats as i64, status: PaymentStatus::Pending as i32, @@ -85,7 +85,7 @@ impl OnChainPayment { operation_id: OperationId, ) -> anyhow::Result> { Ok(on_chain_payments::table - .filter(on_chain_payments::operation_id.eq(operation_id.to_string())) + .filter(on_chain_payments::operation_id.eq(operation_id.fmt_full().to_string())) .first::(conn) .optional()?) } @@ -97,10 +97,10 @@ impl OnChainPayment { ) -> anyhow::Result<()> { diesel::update( on_chain_payments::table - .filter(on_chain_payments::operation_id.eq(operation_id.to_string())), + .filter(on_chain_payments::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(( - on_chain_payments::txid.eq(Some(txid.to_hex())), + on_chain_payments::txid.eq(Some(txid.to_string())), // fedimint doesn't tell us when the tx is confirmed so just jump to success on_chain_payments::status.eq(PaymentStatus::Success as i32), )) @@ -115,7 +115,7 @@ impl OnChainPayment { ) -> anyhow::Result<()> { diesel::update( on_chain_payments::table - .filter(on_chain_payments::operation_id.eq(operation_id.to_string())), + .filter(on_chain_payments::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(on_chain_payments::status.eq(PaymentStatus::Failed as i32)) .execute(conn)?; diff --git a/src/db_models/onchain_receive.rs b/src/db_models/onchain_receive.rs index 2429149..0198f95 100644 --- a/src/db_models/onchain_receive.rs +++ b/src/db_models/onchain_receive.rs @@ -1,7 +1,7 @@ use crate::components::{TransactionDirection, TransactionItem, TransactionItemKind}; use crate::db_models::schema::on_chain_receives; use crate::db_models::PaymentStatus; -use bitcoin::hashes::hex::{FromHex, ToHex}; +use bitcoin::address::NetworkUnchecked; use bitcoin::{Address, Txid}; use diesel::prelude::*; use fedimint_core::config::FederationId; @@ -40,14 +40,14 @@ impl OnChainReceive { FederationId::from_str(&self.fedimint_id).expect("invalid fedimint id") } - pub fn address(&self) -> Address { + pub fn address(&self) -> Address { Address::from_str(&self.address).expect("invalid address") } pub fn txid(&self) -> Option { self.txid .as_ref() - .map(|p| FromHex::from_hex(p).expect("invalid txid")) + .map(|p| Txid::from_str(p).expect("invalid txid")) } pub fn status(&self) -> PaymentStatus { @@ -61,7 +61,7 @@ impl OnChainReceive { address: Address, ) -> anyhow::Result<()> { let new = NewOnChainReceive { - operation_id: operation_id.to_string(), + operation_id: operation_id.fmt_full().to_string(), fedimint_id: fedimint_id.to_string(), address: address.to_string(), status: PaymentStatus::Pending as i32, @@ -79,7 +79,7 @@ impl OnChainReceive { operation_id: OperationId, ) -> anyhow::Result> { Ok(on_chain_receives::table - .filter(on_chain_receives::operation_id.eq(operation_id.to_string())) + .filter(on_chain_receives::operation_id.eq(operation_id.fmt_full().to_string())) .first::(conn) .optional()?) } @@ -93,10 +93,10 @@ impl OnChainReceive { ) -> anyhow::Result<()> { diesel::update( on_chain_receives::table - .filter(on_chain_receives::operation_id.eq(operation_id.to_string())), + .filter(on_chain_receives::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(( - on_chain_receives::txid.eq(Some(txid.to_hex())), + on_chain_receives::txid.eq(Some(txid.to_string())), on_chain_receives::amount_sats.eq(Some(amount_sats as i64)), on_chain_receives::fee_sats.eq(Some(fee_sats as i64)), on_chain_receives::status.eq(PaymentStatus::WaitingConfirmation as i32), @@ -112,7 +112,7 @@ impl OnChainReceive { ) -> anyhow::Result<()> { diesel::update( on_chain_receives::table - .filter(on_chain_receives::operation_id.eq(operation_id.to_string())) + .filter(on_chain_receives::operation_id.eq(operation_id.fmt_full().to_string())) .filter(on_chain_receives::txid.is_not_null()), // make sure it has a txid ) .set(on_chain_receives::status.eq(PaymentStatus::Success as i32)) @@ -127,7 +127,7 @@ impl OnChainReceive { ) -> anyhow::Result<()> { diesel::update( on_chain_receives::table - .filter(on_chain_receives::operation_id.eq(operation_id.to_string())), + .filter(on_chain_receives::operation_id.eq(operation_id.fmt_full().to_string())), ) .set(on_chain_receives::status.eq(PaymentStatus::Failed as i32)) .execute(conn)?; diff --git a/src/fedimint_client.rs b/src/fedimint_client.rs index fc90a90..4bec2ea 100644 --- a/src/fedimint_client.rs +++ b/src/fedimint_client.rs @@ -10,7 +10,7 @@ use fedimint_bip39::Bip39RootSecretStrategy; use fedimint_client::oplog::UpdateStreamOrOutcome; use fedimint_client::secret::{get_default_client_secret, RootSecretStrategy}; use fedimint_client::ClientHandleArc; -use fedimint_core::config::{ClientConfig, FederationId}; +use fedimint_core::config::FederationId; use fedimint_core::core::OperationId; use fedimint_core::db::mem_impl::MemDatabase; use fedimint_core::db::mem_impl::MemTransaction; @@ -18,16 +18,18 @@ use fedimint_core::db::IDatabaseTransactionOps; use fedimint_core::db::IRawDatabase; use fedimint_core::db::IRawDatabaseTransaction; use fedimint_core::db::PrefixStream; -use fedimint_core::{api::InviteCode, db::IDatabaseTransactionOpsCore}; +use fedimint_core::{db::IDatabaseTransactionOpsCore, invite_code::InviteCode}; use fedimint_ln_client::{ InternalPayState, LightningClientInit, LightningClientModule, LnPayState, LnReceiveState, }; use fedimint_ln_common::LightningGateway; use fedimint_mint_client::MintClientInit; -use fedimint_wallet_client::{DepositState, WalletClientInit, WalletClientModule, WithdrawState}; +use fedimint_wallet_client::{DepositStateV2, WalletClientInit, WalletClientModule, WithdrawState}; use iced::futures::channel::mpsc::Sender; use iced::futures::{SinkExt, StreamExt}; use log::{debug, error, info, trace}; +use std::fmt::Debug; +use std::path::Path; use std::sync::Arc; use std::time::Instant; use std::{ @@ -77,10 +79,10 @@ impl FedimintClient { let is_initialized = fedimint_client::Client::is_initialized(&db.clone().into()).await; - let mut client_builder = fedimint_client::Client::builder(db.into()); + let mut client_builder = fedimint_client::Client::builder(db.into()).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); @@ -99,7 +101,7 @@ impl FedimintClient { ) } else if let FederationInviteOrId::Invite(i) = invite_or_id { let download = Instant::now(); - let config = ClientConfig::download_from_invite_code(&i) + let config = fedimint_api_client::download_from_invite_code(&i) .await .map_err(|e| { error!("Could not download federation info: {e}"); @@ -112,7 +114,11 @@ impl FedimintClient { Some( client_builder - .join(get_default_client_secret(&secret, &federation_id), config) + .join( + get_default_client_secret(&secret, &federation_id), + config, + None, + ) .await .map_err(|e| { error!("Could not join federation: {e}"); @@ -524,14 +530,14 @@ pub(crate) async fn spawn_onchain_receive_subscription( storage: Arc, operation_id: OperationId, msg_id: Uuid, - subscription: UpdateStreamOrOutcome, + subscription: UpdateStreamOrOutcome, ) { spawn(async move { let mut stream = subscription.into_stream(); while let Some(op_state) = stream.next().await { match op_state { - DepositState::WaitingForTransaction => {} - DepositState::Failed(error) => { + DepositStateV2::WaitingForTransaction => {} + DepositStateV2::Failed(error) => { error!("Onchain receive failed: {error:?}"); sender .send(Message::core_msg( @@ -547,11 +553,12 @@ pub(crate) async fn spawn_onchain_receive_subscription( break; } - DepositState::WaitingForConfirmation(data) => { - info!("Onchain receive waiting for confirmation: {data:?}"); - let txid = data.btc_transaction.txid(); - let index = data.out_idx as usize; - let amount = data.btc_transaction.output[index].value; + DepositStateV2::WaitingForConfirmation { + btc_deposited, + btc_out_point, + } => { + info!("Onchain receive waiting for confirmation: {btc_deposited} from {btc_out_point:?}"); + let txid = btc_out_point.txid; let params = ReceiveSuccessMsg::Onchain { txid }; sender .send(Message::core_msg( @@ -562,19 +569,28 @@ pub(crate) async fn spawn_onchain_receive_subscription( .unwrap(); let fee_sats = 0; // fees for receives may exist one day - if let Err(e) = - storage.set_onchain_receive_txid(operation_id, txid, amount, fee_sats) - { + if let Err(e) = storage.set_onchain_receive_txid( + operation_id, + txid, + btc_deposited.to_sat(), + fee_sats, + ) { error!("Could not mark onchain payment txid: {e}"); } update_history(storage.clone(), msg_id, &mut sender).await; } - DepositState::Confirmed(data) => { - info!("Onchain receive confirmed: {data:?}"); + DepositStateV2::Confirmed { + btc_deposited, + btc_out_point, + } => { + info!("Onchain receive confirmed: {btc_deposited} from {btc_out_point:?}"); } - DepositState::Claimed(data) => { - info!("Onchain receive claimed: {data:?}"); + DepositStateV2::Claimed { + btc_deposited, + btc_out_point, + } => { + info!("Onchain receive claimed: {btc_deposited} from {btc_out_point:?}"); let new_balance = client.get_balance().await; sender .send(Message::core_msg( @@ -658,6 +674,10 @@ impl IRawDatabase for FedimintStorage { mem: self.fedimint_memory.begin_transaction().await, } } + + fn checkpoint(&self, _backup_path: &Path) -> anyhow::Result<()> { + Ok(()) + } } pub struct SQLPseudoTransaction<'a> { @@ -666,6 +686,15 @@ pub struct SQLPseudoTransaction<'a> { mem: MemTransaction<'a>, } +impl Debug for SQLPseudoTransaction<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("SQLPseudoTransaction") + .field("federation_id", &self.federation_id) + .field("mem", &self.mem) + .finish() + } +} + #[async_trait] impl<'a> IRawDatabaseTransaction for SQLPseudoTransaction<'a> { async fn commit_tx(mut self) -> anyhow::Result<()> { diff --git a/src/main.rs b/src/main.rs index 1d901b4..52c1db0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,9 @@ +use bitcoin::address::NetworkUnchecked; use bitcoin::Address; use components::{FederationItem, Toast, ToastManager, ToastStatus, TransactionItem}; use core::run_core; -use fedimint_core::api::InviteCode; use fedimint_core::core::ModuleKind; +use fedimint_core::invite_code::InviteCode; use fedimint_ln_common::lightning_invoice::Bolt11Invoice; use iced::widget::qr_code::Data; use routes::Route; @@ -197,7 +198,7 @@ impl HarborWallet { async fn async_send_onchain( ui_handle: Option>, id: Uuid, - address: Address, + address: Address, amount_sats: Option, ) { println!("Got to async_send");