diff --git a/Cargo.lock b/Cargo.lock index 58e548b3..7a29258c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,15 +114,21 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -157,6 +163,16 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base58ck" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c8d66485a3a2ea485c1913c4572ce0256067a5377ac8c75c4960e1cda98605f" +dependencies = [ + "bitcoin-internals", + "bitcoin_hashes", +] + [[package]] name = "base64" version = "0.13.1" @@ -175,11 +191,17 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bech32" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" [[package]] name = "bhttp" @@ -193,9 +215,9 @@ dependencies = [ [[package]] name = "bip21" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9532c632b068e45a478f5e309126b6e2ec1dbf0bbd327b73836f33d9a43ede" +checksum = "ebe7a7f5928d264879d5b65eb18a72ea1890c57f22d62ee2eba93f207a6a020b" dependencies = [ "bitcoin", "percent-encoding-rfc3986", @@ -203,44 +225,67 @@ dependencies = [ [[package]] name = "bitcoin" -version = "0.30.2" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" +checksum = "ea507acc1cd80fc084ace38544bbcf7ced7c2aa65b653b102de0ce718df668f6" dependencies = [ - "base64 0.13.1", + "base58ck", + "base64 0.21.7", "bech32", - "bitcoin-private", + "bitcoin-internals", + "bitcoin-io", + "bitcoin-units", "bitcoin_hashes", + "hex-conservative", "hex_lit", "secp256k1", "serde", ] [[package]] -name = "bitcoin-private" -version = "0.1.0" +name = "bitcoin-internals" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bdbe14aa07b06e6cfeffc529a1f099e5fbe249524f8125358604df99a4bed2" +dependencies = [ + "serde", +] + +[[package]] +name = "bitcoin-io" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" +checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" + +[[package]] +name = "bitcoin-units" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5285c8bcaa25876d07f37e3d30c303f2609179716e11d688f51e8f1fe70063e2" +dependencies = [ + "bitcoin-internals", + "serde", +] [[package]] name = "bitcoin_hashes" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" dependencies = [ - "bitcoin-private", + "bitcoin-io", + "hex-conservative", "serde", ] [[package]] name = "bitcoincore-rpc" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6c0ee9354e3dac217db4cb1dd31941073a87fe53c86bcf3eb2b8bc97f00a08" +checksum = "aedd23ae0fd321affb4bbbc36126c6f49a32818dc6b979395d24da8c9d4e80ee" dependencies = [ - "bitcoin-private", "bitcoincore-rpc-json", - "jsonrpc 0.14.1", + "jsonrpc", "log", "serde", "serde_json", @@ -248,25 +293,24 @@ dependencies = [ [[package]] name = "bitcoincore-rpc-json" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d30ce6f40fb0a2e8d98522796219282504b7a4b14e2b4c26139a7bea6aec6586" +checksum = "d8909583c5fab98508e80ef73e5592a651c954993dc6b7739963257d19f0e71a" dependencies = [ "bitcoin", - "bitcoin-private", "serde", "serde_json", ] [[package]] name = "bitcoind" -version = "0.31.1" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395fe8137d13c6859fa68421779cd5a4db8cd7b0ef3122537e56f7a49a0598a9" +checksum = "3ee5cf6a9903ff9cc808494c1232b0e9f6eef6600913d0d69fe1cb5c428f25b9" dependencies = [ "anyhow", "bitcoin_hashes", - "core-rpc", + "bitcoincore-rpc", "flate2", "log", "minreq", @@ -330,9 +374,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -357,9 +401,14 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.102" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779e6b7d17797c0b42023d417228c02889300190e700cb074c3438d9c541d332" +checksum = "5208975e568d83b6b05cc0a063c8e7e9acc2b43bee6da15616a5b73e109d7437" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] [[package]] name = "cfg-if" @@ -466,9 +515,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" dependencies = [ "os_str_bytes", ] @@ -506,6 +555,12 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "core-foundation" version = "0.9.4" @@ -522,32 +577,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "core-rpc" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d77079e1b71c2778d6e1daf191adadcd4ff5ec3ccad8298a79061d865b235b" -dependencies = [ - "bitcoin-private", - "core-rpc-json", - "jsonrpc 0.13.0", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "core-rpc-json" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581898ed9a83f31c64731b1d8ca2dfffcfec14edf1635afacd5234cddbde3a41" -dependencies = [ - "bitcoin", - "bitcoin-private", - "serde", - "serde_json", -] - [[package]] name = "cpufeatures" version = "0.1.5" @@ -651,7 +680,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -695,15 +724,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - [[package]] name = "digest" version = "0.9.0" @@ -880,7 +900,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -940,7 +960,7 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1030,6 +1050,15 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hex_lit" version = "0.1.1" @@ -1074,15 +1103,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "hpke" version = "0.11.0" @@ -1139,9 +1159,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http 1.1.0", @@ -1156,7 +1176,7 @@ dependencies = [ "bytes", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -1180,9 +1200,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1195,7 +1215,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.7", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1204,15 +1224,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", @@ -1230,7 +1250,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.29", + "hyper 0.14.30", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -1246,10 +1266,10 @@ checksum = "399c78f9338483cb7e630c8474b07268983c6bd5acee012e4211f9f7bb21b070" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.29", + "hyper 0.14.30", "log", "rustls 0.22.4", - "rustls-native-certs 0.7.0", + "rustls-native-certs 0.7.1", "rustls-pki-types", "tokio", "tokio-rustls 0.25.0", @@ -1263,11 +1283,11 @@ checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "log", "rustls 0.22.4", - "rustls-native-certs 0.7.0", + "rustls-native-certs 0.7.1", "rustls-pki-types", "tokio", "tokio-rustls 0.25.0", @@ -1275,25 +1295,6 @@ dependencies = [ "webpki-roots 0.26.3", ] -[[package]] -name = "hyper-rustls" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.3.1", - "hyper-util", - "rustls 0.23.10", - "rustls-native-certs 0.7.0", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.26.0", - "tower-service", - "webpki-roots 0.26.3", -] - [[package]] name = "hyper-tungstenite" version = "0.13.0" @@ -1301,7 +1302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a343d17fe7885302ed7252767dc7bb83609a874b6ff581142241ec4b73957ad" dependencies = [ "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-util", "pin-project-lite", "tokio", @@ -1311,16 +1312,16 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2 0.5.7", "tokio", @@ -1347,9 +1348,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1396,6 +1397,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.69" @@ -1418,22 +1428,12 @@ dependencies = [ [[package]] name = "jsonrpc" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd8d6b3f301ba426b30feca834a2a18d48d5b54e5065496b5c1b05537bee3639" -dependencies = [ - "base64 0.13.1", - "serde", - "serde_json", -] - -[[package]] -name = "jsonrpc" -version = "0.14.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" +checksum = "3662a38d341d77efecb73caf01420cfa5aa63c0253fd7bc05289ef9f6616e1bf" dependencies = [ "base64 0.13.1", + "minreq", "serde", "serde_json", ] @@ -1516,14 +1516,16 @@ dependencies = [ [[package]] name = "minreq" -version = "2.11.2" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdef521c74c2884a4f3570bcdb6d2a77b3c533feb6b27ac2ae72673cc221c64" +checksum = "763d142cdff44aaadd9268bebddb156ef6c65a0e13486bb81673cf2d8739f9b0" dependencies = [ "log", "once_cell", "rustls 0.21.12", "rustls-webpki 0.101.7", + "serde", + "serde_json", "webpki-roots 0.25.4", ] @@ -1534,7 +1536,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -1558,12 +1560,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num_cpus" version = "1.16.0" @@ -1576,9 +1572,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "memchr", ] @@ -1615,7 +1611,7 @@ dependencies = [ "futures", "http 1.1.0", "http-body-util", - "hyper 1.3.1", + "hyper 1.4.1", "hyper-rustls 0.26.0", "hyper-tungstenite", "hyper-util", @@ -1711,9 +1707,20 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", ] [[package]] @@ -1763,7 +1770,7 @@ dependencies = [ "config", "env_logger", "http 1.1.0", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-rustls 0.25.0", "log", "ohttp-relay", @@ -1791,7 +1798,7 @@ dependencies = [ "bhttp", "bitcoin", "futures", - "hyper 0.14.29", + "hyper 0.14.30", "hyper-rustls 0.24.2", "ohttp", "redis", @@ -1801,6 +1808,18 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", + "password-hash", + "sha2 0.10.8", +] + [[package]] name = "pem" version = "3.0.4" @@ -1825,9 +1844,9 @@ checksum = "3637c05577168127568a64e9dc5a6887da720efef07b3d9472d45f63ab191166" [[package]] name = "pest" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" dependencies = [ "memchr", "thiserror", @@ -1836,9 +1855,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" +checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" dependencies = [ "pest", "pest_generator", @@ -1846,22 +1865,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" +checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] name = "pest_meta" -version = "2.7.10" +version = "2.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" +checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" dependencies = [ "once_cell", "pest", @@ -1885,7 +1904,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -1952,17 +1971,14 @@ dependencies = [ "universal-hash 0.5.1", ] -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-error" @@ -1997,53 +2013,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quinn" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ceeeeabace7857413798eb1ffa1e9c905a9946a57d81fb69b4b71c4d8eb3ad" -dependencies = [ - "bytes", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls 0.23.10", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "quinn-proto" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf517c03a109db8100448a4be38d498df8a210a99fe0e1b9eaf39e78c640efe" -dependencies = [ - "bytes", - "rand", - "ring 0.17.8", - "rustc-hash", - "rustls 0.23.10", - "slab", - "thiserror", - "tinyvec", - "tracing", -] - -[[package]] -name = "quinn-udp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9096629c45860fc7fb143e125eb826b5e721e10be3263160c7d60ca832cf8c46" -dependencies = [ - "libc", - "once_cell", - "socket2 0.5.7", - "tracing", - "windows-sys 0.52.0", -] - [[package]] name = "quote" version = "1.0.36" @@ -2091,7 +2060,7 @@ checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" dependencies = [ "pem", "ring 0.16.20", - "time 0.3.36", + "time", "yasna", ] @@ -2136,23 +2105,23 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.3.9", + "regex-syntax 0.7.5", ] [[package]] @@ -2166,13 +2135,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.7.5", ] [[package]] @@ -2183,25 +2152,25 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ "base64 0.22.1", "bytes", "futures-core", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.3.1", - "hyper-rustls 0.27.2", + "hyper 1.4.1", + "hyper-rustls 0.26.0", "hyper-util", "ipnet", "js-sys", @@ -2210,9 +2179,8 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "quinn", - "rustls 0.23.10", - "rustls-native-certs 0.7.0", + "rustls 0.22.4", + "rustls-native-certs 0.7.1", "rustls-pemfile 2.1.2", "rustls-pki-types", "serde", @@ -2220,7 +2188,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-rustls 0.26.0", + "tokio-rustls 0.25.0", "tower-service", "url", "wasm-bindgen", @@ -2287,12 +2255,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc_version" version = "0.4.0" @@ -2336,21 +2298,7 @@ dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.4", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls" -version = "0.23.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" -dependencies = [ - "once_cell", - "ring 0.17.8", - "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki 0.102.6", "subtle", "zeroize", ] @@ -2369,9 +2317,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" dependencies = [ "openssl-probe", "rustls-pemfile 2.1.2", @@ -2417,9 +2365,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -2459,9 +2407,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" dependencies = [ "bitcoin_hashes", "rand", @@ -2471,18 +2419,18 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" dependencies = [ "cc", ] [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -2493,9 +2441,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2509,31 +2457,32 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2585,9 +2534,9 @@ dependencies = [ [[package]] name = "sha1_smol" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" [[package]] name = "sha2" @@ -2719,9 +2668,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2730,9 +2679,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "tar" @@ -2794,22 +2743,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2824,39 +2773,25 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.36" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ - "deranged", - "num-conv", - "powerfmt", "serde", "time-core", ] [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2869,9 +2804,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -2894,7 +2829,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -2918,17 +2853,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" -dependencies = [ - "rustls 0.23.10", - "rustls-pki-types", - "tokio", -] - [[package]] name = "tokio-tungstenite" version = "0.21.0" @@ -3009,7 +2933,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] @@ -3143,9 +3067,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -3167,9 +3091,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "want" @@ -3180,12 +3104,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3213,7 +3131,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -3247,7 +3165,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3285,14 +3203,13 @@ dependencies = [ [[package]] name = "which" -version = "4.4.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", - "home", + "libc", "once_cell", - "rustix", ] [[package]] @@ -3341,7 +3258,7 @@ 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]] @@ -3361,18 +3278,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]] @@ -3383,9 +3300,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" @@ -3395,9 +3312,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" @@ -3407,15 +3324,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" @@ -3425,9 +3342,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" @@ -3437,9 +3354,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" @@ -3449,9 +3366,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" @@ -3461,9 +3378,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 = "winreg" @@ -3511,7 +3428,28 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.36", + "time", +] + +[[package]] +name = "zerocopy" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] @@ -3531,19 +3469,55 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.72", ] [[package]] name = "zip" -version = "0.5.13" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ + "aes 0.8.4", "byteorder", "bzip2", + "constant_time_eq", "crc32fast", + "crossbeam-utils", "flate2", - "thiserror", - "time 0.1.45", + "hmac 0.12.1", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", ] diff --git a/payjoin-cli/Cargo.toml b/payjoin-cli/Cargo.toml index f8be1228..3f615204 100644 --- a/payjoin-cli/Cargo.toml +++ b/payjoin-cli/Cargo.toml @@ -26,8 +26,8 @@ v2 = ["payjoin/v2", "payjoin/io"] [dependencies] anyhow = "1.0.70" async-trait = "0.1" -bip21 = "0.3.1" -bitcoincore-rpc = "0.17.0" +bip21 = "0.5.0" +bitcoincore-rpc = "0.19.0" clap = { version = "~4.0.32", features = ["derive"] } config = "0.13.3" env_logger = "0.9.0" @@ -44,7 +44,7 @@ tokio = { version = "1.12.0", features = ["full"] } url = { version = "2.3.1", features = ["serde"] } [dev-dependencies] -bitcoind = { version = "0.31.1", features = ["0_21_2"] } +bitcoind = { version = "0.36.0", features = ["0_21_2"] } http = "1" ohttp-relay = "0.0.8" once_cell = "1" diff --git a/payjoin-cli/src/app/config.rs b/payjoin-cli/src/app/config.rs index e335dce7..d89ddf6c 100644 --- a/payjoin-cli/src/app/config.rs +++ b/payjoin-cli/src/app/config.rs @@ -92,6 +92,8 @@ impl AppConfig { #[cfg(feature = "v2")] let builder = { + use payjoin::base64::prelude::BASE64_URL_SAFE_NO_PAD; + use payjoin::base64::Engine; builder .set_override_option( "pj_directory", @@ -100,7 +102,8 @@ impl AppConfig { .set_override_option( "ohttp_keys", matches.get_one::("ohttp_keys").and_then(|s| { - payjoin::base64::decode_config(s, payjoin::base64::URL_SAFE_NO_PAD) + BASE64_URL_SAFE_NO_PAD + .decode(s) .map_err(|e| { log::error!("Failed to decode ohttp_keys: {}", e); ConfigError::Message(format!("Invalid ohttp_keys: {}", e)) diff --git a/payjoin-cli/src/app/mod.rs b/payjoin-cli/src/app/mod.rs index 2bc54f6e..9c68fdee 100644 --- a/payjoin-cli/src/app/mod.rs +++ b/payjoin-cli/src/app/mod.rs @@ -117,7 +117,7 @@ fn try_contributing_inputs( // calculate receiver payjoin outputs given receiver payjoin inputs and original_psbt, let txo_to_contribute = bitcoin::TxOut { - value: selected_utxo.amount.to_sat(), + value: selected_utxo.amount, script_pubkey: selected_utxo.script_pub_key.clone(), }; let outpoint_to_contribute = diff --git a/payjoin-cli/src/app/v1.rs b/payjoin-cli/src/app/v1.rs index 37a5eed0..da73cadb 100644 --- a/payjoin-cli/src/app/v1.rs +++ b/payjoin-cli/src/app/v1.rs @@ -72,8 +72,8 @@ impl AppTrait for App { .with_context(|| "HTTP request failed")?; let fallback_tx = Psbt::from_str(&body) .map_err(|e| anyhow!("Failed to load PSBT from base64: {}", e))? - .extract_tx(); - println!("Sent fallback transaction txid: {}", fallback_tx.txid()); + .extract_tx()?; + println!("Sent fallback transaction txid: {}", fallback_tx.compute_txid()); println!( "Sent fallback transaction hex: {:#}", payjoin::bitcoin::consensus::encode::serialize_hex(&fallback_tx) @@ -243,7 +243,10 @@ impl App { let payjoin_proposal = self.process_v1_proposal(proposal)?; let psbt = payjoin_proposal.psbt(); let body = psbt.to_string(); - println!("Responded with Payjoin proposal {}", psbt.clone().extract_tx().txid()); + println!( + "Responded with Payjoin proposal {}", + psbt.clone().extract_tx_unchecked_fee_rate().compute_txid() + ); Ok(Response::new(Body::from(body))) } @@ -254,12 +257,7 @@ impl App { let _to_broadcast_in_failure_case = proposal.extract_tx_to_schedule_broadcast(); // The network is used for checks later - let network = bitcoind - .get_blockchain_info() - .map_err(|e| Error::Server(e.into())) - .and_then(|info| { - bitcoin::Network::from_core_arg(&info.chain).map_err(|e| Error::Server(e.into())) - })?; + let network = bitcoind.get_blockchain_info().map_err(|e| Error::Server(e.into()))?.chain; // Receive Check 1: Can Broadcast let proposal = proposal.check_broadcast_suitability(None, |tx| { @@ -334,7 +332,7 @@ impl App { let payjoin_proposal_psbt = payjoin_proposal.psbt(); println!( "Responded with Payjoin proposal {}", - payjoin_proposal_psbt.clone().extract_tx().txid() + payjoin_proposal_psbt.clone().extract_tx_unchecked_fee_rate().compute_txid() ); Ok(payjoin_proposal) } diff --git a/payjoin-cli/src/app/v2.rs b/payjoin-cli/src/app/v2.rs index 8beb504c..ea7639e4 100644 --- a/payjoin-cli/src/app/v2.rs +++ b/payjoin-cli/src/app/v2.rs @@ -167,7 +167,7 @@ impl App { let payjoin_psbt = payjoin_proposal.psbt().clone(); println!( "Response successful. Watch mempool for successful Payjoin. TXID: {}", - payjoin_psbt.extract_tx().clone().txid() + payjoin_psbt.extract_tx_unchecked_fee_rate().clone().compute_txid() ); self.db.clear_recv_session()?; Ok(()) @@ -280,13 +280,7 @@ impl App { let _to_broadcast_in_failure_case = proposal.extract_tx_to_schedule_broadcast(); // The network is used for checks later - let network = bitcoind - .get_blockchain_info() - .map_err(|e| Error::Server(e.into())) - .and_then(|info| { - bitcoin::Network::from_core_arg(&info.chain).map_err(|e| Error::Server(e.into())) - })?; - + let network = bitcoind.get_blockchain_info().map_err(|e| Error::Server(e.into()))?.chain; // Receive Check 1: Can Broadcast let proposal = proposal.check_broadcast_suitability(None, |tx| { let raw_tx = bitcoin::consensus::encode::serialize_hex(&tx); diff --git a/payjoin-cli/tests/e2e.rs b/payjoin-cli/tests/e2e.rs index 1d631c81..9f0fff25 100644 --- a/payjoin-cli/tests/e2e.rs +++ b/payjoin-cli/tests/e2e.rs @@ -3,7 +3,7 @@ mod e2e { use std::env; use std::process::Stdio; - use bitcoind::bitcoincore_rpc::core_rpc_json::AddressType; + use bitcoincore_rpc::json::AddressType; use bitcoind::bitcoincore_rpc::RpcApi; use log::{log_enabled, Level}; use payjoin::bitcoin::Amount; diff --git a/payjoin-directory/Cargo.toml b/payjoin-directory/Cargo.toml index 25749490..0b31b0e4 100644 --- a/payjoin-directory/Cargo.toml +++ b/payjoin-directory/Cargo.toml @@ -18,7 +18,7 @@ danger-local-https = ["hyper-rustls", "rustls"] [dependencies] anyhow = "1.0.71" -bitcoin = { version = "0.30.0", features = ["base64"] } +bitcoin = { version = "0.32.2", features = ["base64"] } bhttp = { version = "=0.5.1", features = ["http"] } futures = "0.3.17" hyper = { version = "0.14", features = ["full"] } diff --git a/payjoin-directory/src/lib.rs b/payjoin-directory/src/lib.rs index 94c95806..024bdc51 100644 --- a/payjoin-directory/src/lib.rs +++ b/payjoin-directory/src/lib.rs @@ -3,7 +3,8 @@ use std::sync::Arc; use std::time::Duration; use anyhow::Result; -use bitcoin::{self, base64}; +use bitcoin::base64::prelude::BASE64_URL_SAFE_NO_PAD; +use bitcoin::base64::Engine; use hyper::header::{HeaderValue, ACCESS_CONTROL_ALLOW_ORIGIN, CONTENT_TYPE}; use hyper::service::{make_service_fn, service_fn}; use hyper::{Body, Method, Request, Response, Server, StatusCode, Uri}; @@ -102,7 +103,7 @@ fn init_ohttp() -> Result { // create or read from file let server_config = ohttp::KeyConfig::new(KEY_ID, KEM, Vec::from(SYMMETRIC))?; let encoded_config = server_config.encode()?; - let b64_config = base64::encode_config(encoded_config, base64::URL_SAFE_NO_PAD); + let b64_config = BASE64_URL_SAFE_NO_PAD.encode(encoded_config); info!("ohttp-keys server config base64 UrlSafe: {:?}", b64_config); Ok(ohttp::Server::new(server_config)?) } @@ -243,8 +244,8 @@ async fn post_session(body: Body) -> Result, HandlerError> { hyper::body::to_bytes(body).await.map_err(|e| HandlerError::BadRequest(e.into()))?; let base64_id = String::from_utf8(bytes.to_vec()).map_err(|e| HandlerError::BadRequest(e.into()))?; - let pubkey_bytes: Vec = base64::decode_config(base64_id, base64::URL_SAFE_NO_PAD) - .map_err(|e| HandlerError::BadRequest(e.into()))?; + let pubkey_bytes: Vec = + BASE64_URL_SAFE_NO_PAD.decode(base64_id).map_err(|e| HandlerError::BadRequest(e.into()))?; let pubkey = bitcoin::secp256k1::PublicKey::from_slice(&pubkey_bytes) .map_err(|e| HandlerError::BadRequest(e.into()))?; tracing::info!("Initialized session with pubkey: {:?}", pubkey); diff --git a/payjoin/Cargo.toml b/payjoin/Cargo.toml index 985a1e7c..ca3ce295 100644 --- a/payjoin/Cargo.toml +++ b/payjoin/Cargo.toml @@ -24,8 +24,8 @@ io = ["reqwest/rustls-tls"] danger-local-https = ["io", "reqwest/rustls-tls", "rustls"] [dependencies] -bitcoin = { version = "0.30.0", features = ["base64"] } -bip21 = "0.3.1" +bitcoin = { version = "0.32.2", features = ["base64"] } +bip21 = "0.5.0" chacha20poly1305 = { version = "0.10.1", optional = true } log = { version = "0.4.14"} http = { version = "1", optional = true } @@ -38,7 +38,7 @@ url = "2.2.2" serde_json = "1.0.108" [dev-dependencies] -bitcoind = { version = "0.31.1", features = ["0_21_2"] } +bitcoind = { version = "0.36.0", features = ["0_21_2"] } http = "1" payjoin-directory = { path = "../payjoin-directory", features = ["danger-local-https"] } ohttp-relay = "0.0.8" diff --git a/payjoin/src/input_type.rs b/payjoin/src/input_type.rs index ded3fc7d..bc8d11f9 100644 --- a/payjoin/src/input_type.rs +++ b/payjoin/src/input_type.rs @@ -213,10 +213,12 @@ impl std::error::Error for InputTypeError {} mod tests { use bitcoin::psbt::Input as PsbtInput; use bitcoin::script::PushBytesBuf; - use bitcoin::{PublicKey, ScriptBuf}; + use bitcoin::{Amount, PublicKey, ScriptBuf}; use super::*; + static FORTY_TWO: Amount = Amount::from_sat(42); + fn wrap_p2sh_script(script: &Script) -> ScriptBuf { let bytes: PushBytesBuf = script .to_bytes() @@ -227,13 +229,13 @@ mod tests { #[test] fn test_p2pk() { - let input_type = InputType::from_spent_input(&TxOut { script_pubkey: ScriptBuf::new_p2pk(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap()), value: 42, }, &Default::default()).unwrap(); + let input_type = InputType::from_spent_input(&TxOut { script_pubkey: ScriptBuf::new_p2pk(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap()), value: FORTY_TWO, }, &Default::default()).unwrap(); assert_eq!(input_type, InputType::P2Pk); } #[test] fn test_p2pkh() { - let input_type = InputType::from_spent_input(&TxOut { script_pubkey: ScriptBuf::new_p2pkh(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap().pubkey_hash()), value: 42, }, &Default::default()).unwrap(); + let input_type = InputType::from_spent_input(&TxOut { script_pubkey: ScriptBuf::new_p2pkh(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap().pubkey_hash()), value: FORTY_TWO, }, &Default::default()).unwrap(); assert_eq!(input_type, InputType::P2Pkh); } @@ -241,7 +243,7 @@ mod tests { fn test_p2sh() { let script = ScriptBuf::new_op_return(&[42]); let input_type = InputType::from_spent_input( - &TxOut { script_pubkey: ScriptBuf::new_p2sh(&script.script_hash()), value: 42 }, + &TxOut { script_pubkey: ScriptBuf::new_p2sh(&script.script_hash()), value: FORTY_TWO }, &PsbtInput { final_script_sig: Some(script), ..Default::default() }, ) .unwrap(); @@ -250,7 +252,7 @@ mod tests { #[test] fn test_p2wpkh() { - let input_type = InputType::from_spent_input(&TxOut { script_pubkey: ScriptBuf::new_v0_p2wpkh(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap().wpubkey_hash().expect("WTF, the key is uncompressed")), value: 42, }, &Default::default()).unwrap(); + let input_type = InputType::from_spent_input(&TxOut { script_pubkey: ScriptBuf::new_p2wpkh(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap().wpubkey_hash().expect("WTF, the key is uncompressed")), value: FORTY_TWO, }, &Default::default()).unwrap(); assert_eq!(input_type, InputType::SegWitV0 { ty: SegWitV0Type::Pubkey, nested: false }); } @@ -258,7 +260,10 @@ mod tests { fn test_p2wsh() { let script = ScriptBuf::new_op_return(&[42]); let input_type = InputType::from_spent_input( - &TxOut { script_pubkey: ScriptBuf::new_v0_p2wsh(&script.wscript_hash()), value: 42 }, + &TxOut { + script_pubkey: ScriptBuf::new_p2wsh(&script.wscript_hash()), + value: FORTY_TWO, + }, &PsbtInput { final_script_sig: Some(script), ..Default::default() }, ) .unwrap(); @@ -267,12 +272,12 @@ mod tests { #[test] fn test_p2sh_p2wpkh() { - let segwit_script = ScriptBuf::new_v0_p2wpkh(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap().wpubkey_hash().expect("WTF, the key is uncompressed")); + let segwit_script = ScriptBuf::new_p2wpkh(&PublicKey::from_slice(b"\x02\x50\x86\x3A\xD6\x4A\x87\xAE\x8A\x2F\xE8\x3C\x1A\xF1\xA8\x40\x3C\xB5\x3F\x53\xE4\x86\xD8\x51\x1D\xAD\x8A\x04\x88\x7E\x5B\x23\x52").unwrap().wpubkey_hash().expect("WTF, the key is uncompressed")); let segwit_script_hash = segwit_script.script_hash(); let script_sig = wrap_p2sh_script(&segwit_script); let input_type = InputType::from_spent_input( - &TxOut { script_pubkey: ScriptBuf::new_p2sh(&segwit_script_hash), value: 42 }, + &TxOut { script_pubkey: ScriptBuf::new_p2sh(&segwit_script_hash), value: FORTY_TWO }, &PsbtInput { final_script_sig: Some(script_sig), ..Default::default() }, ) .unwrap(); @@ -282,12 +287,12 @@ mod tests { #[test] fn test_p2sh_p2wsh() { let script = ScriptBuf::new_op_return(&[42]); - let segwit_script = ScriptBuf::new_v0_p2wsh(&script.wscript_hash()); + let segwit_script = ScriptBuf::new_p2wsh(&script.wscript_hash()); let segwit_script_hash = segwit_script.script_hash(); let script_sig = wrap_p2sh_script(&segwit_script); let input_type = InputType::from_spent_input( - &TxOut { script_pubkey: ScriptBuf::new_p2sh(&segwit_script_hash), value: 42 }, + &TxOut { script_pubkey: ScriptBuf::new_p2sh(&segwit_script_hash), value: FORTY_TWO }, &PsbtInput { final_script_sig: Some(script_sig), ..Default::default() }, ) .unwrap(); diff --git a/payjoin/src/psbt.rs b/payjoin/src/psbt.rs index fab7b82f..c8fa043e 100644 --- a/payjoin/src/psbt.rs +++ b/payjoin/src/psbt.rs @@ -29,7 +29,7 @@ pub(crate) trait PsbtExt: Sized { fn outputs_mut(&mut self) -> &mut [psbt::Output]; fn xpub_mut( &mut self, - ) -> &mut BTreeMap; + ) -> &mut BTreeMap; fn proprietary_mut(&mut self) -> &mut BTreeMap>; fn unknown_mut(&mut self) -> &mut BTreeMap>; fn input_pairs(&self) -> Box> + '_>; @@ -47,7 +47,7 @@ impl PsbtExt for Psbt { fn xpub_mut( &mut self, - ) -> &mut BTreeMap { + ) -> &mut BTreeMap { &mut self.xpub } @@ -95,11 +95,11 @@ impl PsbtExt for Psbt { let mut total_inputs = bitcoin::Amount::ZERO; for output in &self.unsigned_tx.output { - total_outputs += bitcoin::Amount::from_sat(output.value); + total_outputs += output.value; } for input in self.input_pairs() { - total_inputs += bitcoin::Amount::from_sat(input.previous_txout().unwrap().value); + total_inputs += input.previous_txout().unwrap().value; } log::debug!(" total_inputs: {}", total_inputs); log::debug!("- total_outputs: {}", total_outputs); @@ -138,7 +138,7 @@ impl<'a> InputPair<'a> { (None, None) if treat_missing_as_error => Err(PsbtInputError::PrevTxOut(PrevTxOutError::MissingUtxoInformation)), (None, None) => Ok(()), - (Some(tx), None) if tx.txid() == self.txin.previous_output.txid => tx + (Some(tx), None) if tx.compute_txid() == self.txin.previous_output.txid => tx .output .get::(self.txin.previous_output.vout.try_into().map_err(|_| { PrevTxOutError::IndexOutOfBounds { @@ -156,7 +156,9 @@ impl<'a> InputPair<'a> { .map(drop), (Some(_), None) => Err(PsbtInputError::UnequalTxid), (None, Some(_)) => Ok(()), - (Some(tx), Some(witness_txout)) if tx.txid() == self.txin.previous_output.txid => { + (Some(tx), Some(witness_txout)) + if tx.compute_txid() == self.txin.previous_output.txid => + { let non_witness_txout = tx .output .get::(self.txin.previous_output.vout.try_into().map_err(|_| { diff --git a/payjoin/src/receive/mod.rs b/payjoin/src/receive/mod.rs index 794fa793..1ff936e8 100644 --- a/payjoin/src/receive/mod.rs +++ b/payjoin/src/receive/mod.rs @@ -27,8 +27,10 @@ use std::cmp::{max, min}; use std::collections::HashMap; +use bitcoin::base64::prelude::BASE64_STANDARD; +use bitcoin::base64::Engine; use bitcoin::psbt::Psbt; -use bitcoin::{base64, Amount, FeeRate, OutPoint, Script, TxOut}; +use bitcoin::{Amount, FeeRate, OutPoint, Script, TxOut}; mod error; mod optional_parameters; @@ -88,7 +90,7 @@ impl UncheckedProposal { // enforce the limit let mut buf = vec![0; content_length as usize]; // 4_000_000 * 4 / 3 fits in u32 body.read_exact(&mut buf).map_err(InternalRequestError::Io)?; - let base64 = base64::decode(&buf).map_err(InternalRequestError::Base64)?; + let base64 = BASE64_STANDARD.decode(&buf).map_err(InternalRequestError::Base64)?; let unchecked_psbt = Psbt::deserialize(&base64).map_err(InternalRequestError::Psbt)?; let psbt = unchecked_psbt.validate().map_err(InternalRequestError::InconsistentPsbt)?; @@ -105,7 +107,7 @@ impl UncheckedProposal { /// The Sender's Original PSBT transaction pub fn extract_tx_to_schedule_broadcast(&self) -> bitcoin::Transaction { - self.psbt.clone().extract_tx() + self.psbt.clone().extract_tx_unchecked_fee_rate() } fn psbt_fee_rate(&self) -> Result { @@ -143,7 +145,7 @@ impl UncheckedProposal { .into()); } } - if can_broadcast(&self.psbt.clone().extract_tx())? { + if can_broadcast(&self.psbt.clone().extract_tx_unchecked_fee_rate())? { Ok(MaybeInputsOwned { psbt: self.psbt, params: self.params }) } else { Err(InternalRequestError::OriginalPsbtNotBroadcastable.into()) @@ -387,19 +389,19 @@ impl ProvisionalProposal { .iter() .map(|output| output.value) .min() - .unwrap_or_else(|| Amount::MAX_MONEY.to_sat()); + .unwrap_or_else(|| Amount::MAX_MONEY); let min_original_in_sats = self .payjoin_psbt .input_pairs() .filter_map(|input| input.previous_txout().ok().map(|txo| txo.value)) .min() - .unwrap_or_else(|| Amount::MAX_MONEY.to_sat()); + .unwrap_or_else(|| Amount::MAX_MONEY); let prior_payment_sats = self.payjoin_psbt.unsigned_tx.output[self.owned_vouts[0]].value; for candidate in candidate_inputs { - let candidate_sats = candidate.0.to_sat(); + let candidate_sats = candidate.0; let candidate_min_out = min(min_original_out_sats, prior_payment_sats + candidate_sats); let candidate_min_in = min(min_original_in_sats, candidate_sats); @@ -549,7 +551,7 @@ impl ProvisionalProposal { if !self.owned_vouts.contains(&additional_fee_output_index) { // remove additional miner fee from the sender's specified output self.payjoin_psbt.unsigned_tx.output[additional_fee_output_index].value -= - additional_fee.to_sat(); + additional_fee; } } } @@ -715,10 +717,11 @@ mod test { .expect("No inputs should be seen before") .identify_receiver_outputs(|script| { let network = Network::Bitcoin; - Ok(Address::from_script(script, network) + Ok(Address::from_script(script, network).unwrap() == Address::from_str(&"3CZZi7aWFugaCdUCS15dgrUUViupmB8bVM") .unwrap() - .require_network(network)) + .require_network(network) + .unwrap()) }) .expect("Receiver output should be identified"); let payjoin = payjoin.apply_fee(None); diff --git a/payjoin/src/receive/v2/mod.rs b/payjoin/src/receive/v2/mod.rs index c040b244..25cc6b4c 100644 --- a/payjoin/src/receive/v2/mod.rs +++ b/payjoin/src/receive/v2/mod.rs @@ -4,9 +4,11 @@ use std::str::FromStr; use std::time::{Duration, SystemTime}; use bitcoin::address::NetworkUnchecked; +use bitcoin::base64::prelude::BASE64_URL_SAFE_NO_PAD; +use bitcoin::base64::Engine; use bitcoin::psbt::Psbt; use bitcoin::secp256k1::{rand, PublicKey}; -use bitcoin::{base64, Address, Amount, FeeRate, OutPoint, Script, TxOut}; +use bitcoin::{Address, Amount, FeeRate, OutPoint, Script, TxOut}; use serde::de::{self, Deserializer, MapAccess, Visitor}; use serde::ser::SerializeStruct; use serde::{Deserialize, Serialize, Serializer}; @@ -30,7 +32,7 @@ struct SessionContext { ohttp_keys: OhttpKeys, expiry: SystemTime, ohttp_relay: url::Url, - s: bitcoin::secp256k1::KeyPair, + s: bitcoin::secp256k1::Keypair, e: Option, } @@ -74,7 +76,7 @@ impl SessionInitializer { ohttp_relay, expiry: SystemTime::now() + expire_after.unwrap_or(TWENTY_FOUR_HOURS_DEFAULT_EXPIRY), - s: bitcoin::secp256k1::KeyPair::from_secret_key(&secp, &sk), + s: bitcoin::secp256k1::Keypair::from_secret_key(&secp, &sk), e: None, }, } @@ -110,7 +112,7 @@ impl SessionInitializer { } fn subdir_path_from_pubkey(pubkey: &bitcoin::secp256k1::PublicKey) -> String { - base64::encode_config(pubkey.serialize(), base64::URL_SAFE_NO_PAD) + BASE64_URL_SAFE_NO_PAD.encode(pubkey.serialize()) } /// An active payjoin V2 session, allowing for polled requests to the @@ -222,7 +224,7 @@ impl ActiveSession { // This identifies a session at the payjoin directory server. pub fn pj_url(&self) -> Url { let pubkey = &self.context.s.public_key().serialize(); - let pubkey_base64 = base64::encode_config(pubkey, base64::URL_SAFE_NO_PAD); + let pubkey_base64 = BASE64_URL_SAFE_NO_PAD.encode(pubkey); let mut url = self.context.directory.clone(); { let mut path_segments = @@ -651,7 +653,7 @@ mod test { ), ohttp_relay: url::Url::parse("https://relay.com").unwrap(), expiry: SystemTime::now() + Duration::from_secs(60), - s: bitcoin::secp256k1::KeyPair::from_secret_key( + s: bitcoin::secp256k1::Keypair::from_secret_key( &bitcoin::secp256k1::Secp256k1::new(), &bitcoin::secp256k1::SecretKey::from_slice(&[1; 32]).unwrap(), ), diff --git a/payjoin/src/send/error.rs b/payjoin/src/send/error.rs index e7305e67..681cad51 100644 --- a/payjoin/src/send/error.rs +++ b/payjoin/src/send/error.rs @@ -1,6 +1,7 @@ use std::fmt::{self, Display}; use bitcoin::locktime::absolute::LockTime; +use bitcoin::transaction::Version; use bitcoin::Sequence; use crate::input_type::{InputType, InputTypeError}; @@ -21,8 +22,8 @@ pub(crate) enum InternalValidationError { InvalidInputType(InputTypeError), InvalidProposedInput(crate::psbt::PrevTxOutError), VersionsDontMatch { - proposed: i32, - original: i32, + proposed: Version, + original: Version, }, LockTimesDontMatch { proposed: LockTime, diff --git a/payjoin/src/send/mod.rs b/payjoin/src/send/mod.rs index 175b3dce..754c222b 100644 --- a/payjoin/src/send/mod.rs +++ b/payjoin/src/send/mod.rs @@ -129,7 +129,7 @@ impl<'a> RequestBuilder<'a> { .into_iter() .enumerate() .find(|(_, txo)| payout_scripts.all(|script| script != txo.script_pubkey)) - .map(|(i, txo)| (i, bitcoin::Amount::from_sat(txo.value))) + .map(|(i, txo)| (i, txo.value)) { let input_types = self .psbt @@ -358,7 +358,8 @@ impl RequestContext { #[cfg(feature = "v2")] fn rs_pubkey_from_dir_endpoint(endpoint: &Url) -> Result { - use bitcoin::base64; + use bitcoin::base64::prelude::BASE64_URL_SAFE_NO_PAD; + use bitcoin::base64::Engine; use crate::send::error::ParseSubdirectoryError; @@ -369,7 +370,8 @@ impl RequestContext { .ok_or(ParseSubdirectoryError::MissingSubdirectory)? .to_string(); - let pubkey_bytes = base64::decode_config(subdirectory, base64::URL_SAFE_NO_PAD) + let pubkey_bytes = BASE64_URL_SAFE_NO_PAD + .decode(subdirectory) .map_err(ParseSubdirectoryError::SubdirectoryNotBase64)?; bitcoin::secp256k1::PublicKey::from_slice(&pubkey_bytes) .map_err(ParseSubdirectoryError::SubdirectoryInvalidPubkey) @@ -695,7 +697,7 @@ impl ContextV1 { SenderTxinContainsFinalScriptWitness ); let prevout = original.previous_txout().expect("We've validated this before"); - total_value += bitcoin::Amount::from_sat(prevout.value); + total_value += prevout.value; // We assume the signture will be the same size // I know sigs can be slightly different size but there isn't much to do about // it other than prefer Taproot. @@ -738,7 +740,7 @@ impl ContextV1 { let txout = proposed .previous_txout() .map_err(InternalValidationError::InvalidProposedInput)?; - total_value += bitcoin::Amount::from_sat(txout.value); + total_value += txout.value; check_eq!( InputType::from_spent_input(txout, proposed.psbtin)?, self.input_type, @@ -784,8 +786,8 @@ impl ContextV1 { proposal.unsigned_tx.output.iter().zip(&proposal.outputs) { ensure!(proposed_psbtout.bip32_derivation.is_empty(), TxOutContainsKeyPaths); - total_value += bitcoin::Amount::from_sat(proposed_txout.value); - total_weight += Weight::from_wu(proposed_txout.weight() as u64); + total_value += proposed_txout.value; + total_weight += proposed_txout.weight(); match (original_outputs.peek(), self.fee_contribution) { // fee output ( @@ -795,8 +797,7 @@ impl ContextV1 { && *original_output_index == fee_contrib_idx => { if proposed_txout.value < original_output.value { - contributed_fee = - bitcoin::Amount::from_sat(original_output.value - proposed_txout.value); + contributed_fee = original_output.value - proposed_txout.value; ensure!(contributed_fee < max_fee_contrib, FeeContributionExceedsMaximum); //The remaining fee checks are done in the caller } @@ -852,7 +853,7 @@ fn check_single_payee( for output in &psbt.unsigned_tx.output { if output.script_pubkey == *script_pubkey { if let Some(amount) = amount { - if output.value != amount.to_sat() { + if output.value != amount { return Err(InternalCreateRequestError::PayeeValueNotEqual); } } @@ -897,9 +898,9 @@ fn check_fee_output_amount( fee: bitcoin::Amount, clamp_fee_contribution: bool, ) -> Result { - if output.value < fee.to_sat() { + if output.value < fee { if clamp_fee_contribution { - Ok(bitcoin::Amount::from_sat(output.value)) + Ok(output.value) } else { Err(InternalCreateRequestError::FeeOutputValueLowerThanFeeContribution) } diff --git a/payjoin/src/v2.rs b/payjoin/src/v2.rs index cb30eac8..64d96ed7 100644 --- a/payjoin/src/v2.rs +++ b/payjoin/src/v2.rs @@ -1,7 +1,8 @@ use std::ops::{Deref, DerefMut}; use std::{error, fmt}; -use bitcoin::base64; +use bitcoin::base64::prelude::BASE64_URL_SAFE_NO_PAD; +use bitcoin::base64::Engine; use bitcoin::secp256k1::ecdh::SharedSecret; use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey}; use chacha20poly1305::aead::{Aead, KeyInit, OsRng, Payload}; @@ -252,8 +253,7 @@ impl OhttpKeys { impl fmt::Display for OhttpKeys { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let encoded = - base64::encode_config(self.encode().map_err(|_| fmt::Error)?, base64::URL_SAFE_NO_PAD); + let encoded = BASE64_URL_SAFE_NO_PAD.encode(self.encode().map_err(|_| fmt::Error)?); write!(f, "{}", encoded) } } @@ -262,8 +262,7 @@ impl std::str::FromStr for OhttpKeys { type Err = ParseOhttpKeysError; fn from_str(s: &str) -> Result { - let bytes = base64::decode_config(s, base64::URL_SAFE_NO_PAD) - .map_err(ParseOhttpKeysError::DecodeBase64)?; + let bytes = BASE64_URL_SAFE_NO_PAD.decode(s).map_err(ParseOhttpKeysError::DecodeBase64)?; OhttpKeys::decode(&bytes).map_err(ParseOhttpKeysError::DecodeKeyConfig) } } @@ -312,7 +311,7 @@ impl serde::Serialize for OhttpKeys { #[derive(Debug)] pub enum ParseOhttpKeysError { - DecodeBase64(base64::DecodeError), + DecodeBase64(bitcoin::base64::DecodeError), DecodeKeyConfig(ohttp::Error), } diff --git a/payjoin/tests/integration.rs b/payjoin/tests/integration.rs index be878434..bb624d56 100644 --- a/payjoin/tests/integration.rs +++ b/payjoin/tests/integration.rs @@ -6,7 +6,7 @@ mod integration { use bitcoin::psbt::Psbt; use bitcoin::{Amount, FeeRate, OutPoint}; - use bitcoind::bitcoincore_rpc::core_rpc_json::{AddressType, WalletProcessPsbtResult}; + use bitcoind::bitcoincore_rpc::json::{AddressType, WalletProcessPsbtResult}; use bitcoind::bitcoincore_rpc::{self, RpcApi}; use log::{log_enabled, Level}; use once_cell::sync::{Lazy, OnceCell}; @@ -164,7 +164,7 @@ mod integration { // calculate receiver payjoin outputs given receiver payjoin inputs and original_psbt, let txo_to_contribute = bitcoin::TxOut { - value: selected_utxo.amount.to_sat(), + value: selected_utxo.amount, script_pubkey: selected_utxo.script_pub_key.clone(), }; let outpoint_to_contribute = @@ -276,7 +276,7 @@ mod integration { let payjoin_psbt = Psbt::from_str(&payjoin_psbt)?; debug!("Sender's Payjoin PSBT: {:#?}", payjoin_psbt); - Ok(payjoin_psbt.extract_tx()) + Ok(payjoin_psbt.extract_tx()?) } } @@ -759,7 +759,7 @@ mod integration { // calculate receiver payjoin outputs given receiver payjoin inputs and original_psbt, let txo_to_contribute = bitcoin::TxOut { - value: selected_utxo.amount.to_sat(), + value: selected_utxo.amount, script_pubkey: selected_utxo.script_pub_key.clone(), }; let outpoint_to_contribute = @@ -932,8 +932,7 @@ mod integration { sender.wallet_process_psbt(&psbt.to_string(), None, None, None)?.psbt; let payjoin_psbt = sender.finalize_psbt(&payjoin_psbt, Some(false))?.psbt.unwrap(); let payjoin_psbt = Psbt::from_str(&payjoin_psbt)?; - - Ok(payjoin_psbt.extract_tx()) + Ok(payjoin_psbt.extract_tx()?) } } }