From e174b655eaeec4c73fac37f5cc784b5a80719a16 Mon Sep 17 00:00:00 2001 From: raph Date: Fri, 21 Jul 2023 14:34:18 +0200 Subject: [PATCH] Update bitcoin dependencies (#2281) --- Cargo.lock | 1106 +++++++----------- Cargo.toml | 7 +- fuzz/Cargo.toml | 2 +- src/chain.rs | 9 +- src/index.rs | 46 +- src/index/entry.rs | 8 +- src/index/updater.rs | 11 +- src/inscription.rs | 105 +- src/lib.rs | 3 +- src/object.rs | 6 +- src/subcommand/preview.rs | 5 +- src/subcommand/server.rs | 4 +- src/subcommand/wallet.rs | 13 +- src/subcommand/wallet/inscribe.rs | 39 +- src/subcommand/wallet/receive.rs | 2 +- src/subcommand/wallet/send.rs | 16 +- src/subcommand/wallet/transaction_builder.rs | 56 +- src/templates/block.rs | 4 +- src/templates/input.rs | 2 +- src/templates/output.rs | 8 +- src/templates/transaction.rs | 6 +- src/test.rs | 20 +- templates/input.html | 2 +- templates/output.html | 2 +- templates/transaction.html | 2 +- test-bitcoincore-rpc/Cargo.toml | 8 +- test-bitcoincore-rpc/src/api.rs | 8 +- test-bitcoincore-rpc/src/lib.rs | 15 +- test-bitcoincore-rpc/src/server.rs | 26 +- test-bitcoincore-rpc/src/state.rs | 14 +- tests/lib.rs | 6 +- tests/wallet/inscribe.rs | 7 +- tests/wallet/inscriptions.rs | 13 +- tests/wallet/send.rs | 12 +- 34 files changed, 643 insertions(+), 950 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e97e9d369d..cde0018bb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ "gimli", ] @@ -17,74 +17,11 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-gcm" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher", - "opaque-debug", -] - [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] @@ -104,6 +41,12 @@ dependencies = [ "alloc-no-stdlib", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -115,9 +58,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" dependencies = [ "backtrace", ] @@ -141,7 +84,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.23", ] [[package]] @@ -169,9 +112,9 @@ dependencies = [ [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -273,7 +216,7 @@ dependencies = [ "log", "parking", "polling", - "rustix", + "rustix 0.37.23", "slab", "socket2 0.4.9", "waker-fn", @@ -313,7 +256,7 @@ dependencies = [ "cfg-if 1.0.0", "event-listener", "futures-lite", - "rustix", + "rustix 0.37.23", "signal-hook", "windows-sys 0.48.0", ] @@ -352,13 +295,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -399,13 +342,13 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "a6a1de45611fdb535bfde7b7de4fd54f4fd2b17b1737c0a59b69bf9b92074b8c" dependencies = [ "async-trait", "axum-core", - "bitflags", + "bitflags 1.3.2", "bytes", "futures-util", "headers", @@ -449,9 +392,9 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197b070de3ae5fc503d531d4dc7680e016438c2ffc848a1fefebc5c53f35cc17" +checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063" dependencies = [ "arc-swap", "bytes", @@ -469,25 +412,19 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ "addr2line", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.6.2", + "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - [[package]] name = "base64" version = "0.13.1" @@ -496,9 +433,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "bech32" @@ -512,29 +449,44 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.11.0", "serde", "unicode-normalization", ] [[package]] name = "bitcoin" -version = "0.29.2" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" +checksum = "4e99ff7289b20a7385f66a0feda78af2fc119d28fb56aea8886a9cd0a4abdd75" dependencies = [ "bech32", - "bitcoin_hashes", + "bitcoin-private", + "bitcoin_hashes 0.12.0", + "hex_lit", "secp256k1", "serde", ] +[[package]] +name = "bitcoin-private" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" + [[package]] name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitcoin_hashes" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" dependencies = [ + "bitcoin-private", "serde", ] @@ -545,13 +497,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "block-buffer" -version = "0.9.0" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "block-buffer" @@ -614,9 +563,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -624,9 +573,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.1" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byteorder" @@ -660,28 +609,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time 0.1.45", "wasm-bindgen", "winapi", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - [[package]] name = "clap" version = "3.2.25" @@ -689,10 +629,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_derive", "clap_lex", - "indexmap", + "indexmap 1.9.3", "once_cell", "strsim", "termcolor", @@ -721,16 +661,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] - [[package]] name = "concurrent-queue" version = "2.2.0" @@ -742,23 +672,17 @@ dependencies = [ [[package]] name = "console" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "convert_case" version = "0.4.0" @@ -800,19 +724,13 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - [[package]] name = "crc32fast" version = "1.3.2" @@ -858,9 +776,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if 1.0.0", ] @@ -875,87 +793,14 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher", -] - [[package]] name = "ctrlc" -version = "3.2.5" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbcf33c2a618cbe41ee43ae6e9f2e48368cd9f9db2896f10167d8d762679f639" +checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ "nix", - "windows-sys 0.45.0", -] - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", + "windows-sys 0.48.0", ] [[package]] @@ -995,9 +840,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der-parser" @@ -1053,7 +898,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.109", ] @@ -1065,20 +910,11 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[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.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", "subtle", ] @@ -1113,12 +949,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "displaydoc" version = "0.2.4" @@ -1127,7 +957,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -1164,6 +994,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -1219,7 +1055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -1245,9 +1081,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -1323,7 +1159,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -1398,38 +1234,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - [[package]] name = "gimli" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "1391ab1f92ffcc08911957149833e682aa3fe252b9f45f966d2ef972274c97df" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1450,9 +1276,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.18" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1460,7 +1286,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util 0.7.8", @@ -1473,6 +1299,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "headers" version = "0.3.8" @@ -1480,13 +1312,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ "base64 0.13.1", - "bitflags", + "bitflags 1.3.2", "bytes", "headers-core", "http", "httpdate", "mime", - "sha1 0.10.5", + "sha1", ] [[package]] @@ -1515,18 +1347,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1535,8 +1358,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "hkdf" -version = "0.10.0" +name = "hex_lit" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" dependencies = [ @@ -1548,7 +1371,7 @@ dependencies = [ name = "hmac" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" dependencies = [ "crypto-mac", "digest 0.9.0", @@ -1605,9 +1428,7 @@ checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" dependencies = [ "anyhow", "async-channel", - "async-std", "base64 0.13.1", - "cookie", "futures-lite", "infer", "pin-project-lite", @@ -1639,9 +1460,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1676,9 +1497,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1690,12 +1511,11 @@ dependencies = [ [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1706,9 +1526,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -1721,16 +1541,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] name = "indicatif" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", + "instant", "number_prefix", "portable-atomic", "unicode-width", @@ -1753,44 +1584,43 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi 0.3.2", + "rustix 0.38.4", "windows-sys 0.48.0", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -1889,25 +1719,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] -name = "link-cplusplus" -version = "1.0.8" +name = "linux-raw-sys" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.3.7" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1915,11 +1742,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" dependencies = [ - "cfg-if 1.0.0", "value-bag", ] @@ -1977,20 +1803,12 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "9.0.1" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9601439f168c13bdc5bf84349c2e61c815be4a4dcebe8c4ff4af58f4e8a6d20" +checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" dependencies = [ "bitcoin", -] - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", + "bitcoin-private", ] [[package]] @@ -2004,14 +1822,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2048,9 +1865,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.38" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" dependencies = [ "cfg-if 0.1.10", "libc", @@ -2079,7 +1896,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "static_assertions", @@ -2149,11 +1966,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -2165,9 +1982,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.30.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -2183,23 +2000,17 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2216,7 +2027,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -2227,9 +2038,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" dependencies = [ "cc", "libc", @@ -2250,7 +2061,7 @@ dependencies = [ "anyhow", "axum", "axum-server", - "base64 0.21.0", + "base64 0.21.2", "bech32", "bip39", "bitcoin", @@ -2300,10 +2111,11 @@ dependencies = [ [[package]] name = "ord-bitcoincore-rpc" -version = "0.16.5" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca77a54d5a14a2731dd85150e24be89c849bdcb5704d23097188d763381d98b8" +checksum = "ece3c1158d3391127ddd7615868792a602745cf4f9fbea259c4449c9ed89814a" dependencies = [ + "bitcoin-private", "jsonrpc", "log", "ord-bitcoincore-rpc-json", @@ -2313,29 +2125,21 @@ dependencies = [ [[package]] name = "ord-bitcoincore-rpc-json" -version = "0.16.5" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b81ced8ed99f50d3f221a7de8297cbdf9bdf20ca2908a12f6128d38b2284fb" +checksum = "45f46eb509cc95759461d3cb483ba51b2adbea0e31747cb1e3f388e71e13a321" dependencies = [ "bitcoin", + "bitcoin-private", "serde", "serde_json", ] [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] +checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" [[package]] name = "parking" @@ -2402,9 +2206,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "phf" @@ -2426,29 +2230,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.26", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2469,7 +2273,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "concurrent-queue", "libc", @@ -2478,22 +2282,11 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", -] - [[package]] name = "portable-atomic" -version = "0.3.19" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26f6a7b87c2e435a3241addceeeff740ff8b7e76b74c13bf9acb17fa454ea00b" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" [[package]] name = "postgres" @@ -2546,13 +2339,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -2589,28 +2380,22 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "pulldown-cmark" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" dependencies = [ - "bitflags", + "bitflags 1.3.2", "getopts", "memchr", "unicase", @@ -2618,9 +2403,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713eccf888fb05f1a96eb78c0dbc51907fee42b3377272dc902eb38985f418d5" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -2638,9 +2423,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] @@ -2704,7 +2489,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -2746,15 +2531,15 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.21", + "time 0.3.23", "yasna", ] [[package]] name = "redb" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1770bc0931171df3ced2adc9fd72d59cb47a4dc693d184c73cd382067f6ff44e" +checksum = "717a806693d0e1ed6cc55b392066bf13e703dd835acf5c5888c74740f924d355" dependencies = [ "libc", "pyo3-build-config", @@ -2766,7 +2551,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2775,7 +2560,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2784,35 +2569,47 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.8.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "reqwest" -version = "0.11.17" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13293b639a097af28fc8a90f22add145a9c954e49d77da06263d58cf44d5fb91" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", "bytes", "encoding_rs", "futures-core", @@ -2860,9 +2657,9 @@ dependencies = [ [[package]] name = "rss" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1ec965a5f5ec71e16106b35df21861c4014ace848c6b75720816925552936d" +checksum = "9acf62e0f3f4b52f61d3a12d6279e3f0b90d4811b0ae888eabdf61a2e7c03a95" dependencies = [ "atom_syndication", "derive_builder", @@ -2872,9 +2669,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "6.6.1" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" +checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -2883,24 +2680,24 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.5.0" +version = "6.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" +checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 1.0.109", + "syn 2.0.26", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "7.5.0" +version = "7.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" dependencies = [ - "sha2 0.10.6", + "sha2", "walkdir", ] @@ -2910,22 +2707,13 @@ version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver", ] [[package]] @@ -2939,35 +2727,48 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.1" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.1", "sct", ] [[package]] name = "rustls-acme" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58431104fd1f83db05a59b39482aa7af016bdca3ab108efcef42154ce06e2d5c" +checksum = "6b252541bcfab8ae3ed2240b9e6d5a4254a40b66597d9adb7f74f9f81b2d4f21" dependencies = [ "async-h1", "async-io", @@ -2996,11 +2797,11 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", ] [[package]] @@ -3013,17 +2814,27 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.101.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -3036,24 +2847,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -3067,11 +2872,11 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" dependencies = [ - "bitcoin_hashes", + "bitcoin_hashes 0.12.0", "rand 0.8.5", "secp256k1-sys", "serde", @@ -3079,20 +2884,20 @@ dependencies = [ [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" dependencies = [ "cc", ] [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3101,9 +2906,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -3111,50 +2916,35 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" - -[[package]] -name = "semver-parser" -version = "0.7.0" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.162" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.162" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -3163,10 +2953,11 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ + "itoa", "serde", ] @@ -3195,26 +2986,17 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "bd5f51e3fdb5b9cdd1577e1cb7a733474191b1aca6a72c2e50913241632c1180" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", "unsafe-libyaml", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - [[package]] name = "sha1" version = "0.10.5" @@ -3223,44 +3005,25 @@ checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" -version = "0.9.9" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "b824b6e687aff278cdbf3b36f07aa52d4bd4099699324d5da86a2ebce3aa00b3" dependencies = [ "libc", "signal-hook-registry", @@ -3301,9 +3064,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smol" @@ -3348,15 +3111,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -3428,12 +3182,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - [[package]] name = "syn" version = "1.0.109" @@ -3447,9 +3195,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", "quote", @@ -3476,9 +3224,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.29.3" +version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bcd0346f90b6bc83526c7b180039a8acd26a5c848cc556d457f6472eb148122" +checksum = "6b949f01f9c23823744b71e0060472ecbde578ef68cc2a9e46d114efd77c3034" dependencies = [ "cfg-if 1.0.0", "core-foundation-sys", @@ -3491,21 +3239,22 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "df8e77cb757a61f51b947ec4a7e3646efd825b73561db1c232a8ccb639e611a0" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", + "rustix 0.37.23", + "windows-sys 0.48.0", ] [[package]] @@ -3540,22 +3289,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -3571,29 +3320,14 @@ dependencies = [ [[package]] name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "serde", "time-core", - "time-macros 0.2.9", + "time-macros", ] [[package]] @@ -3604,36 +3338,13 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.1.1" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -3651,11 +3362,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -3674,7 +3386,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.26", ] [[package]] @@ -3713,9 +3425,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", @@ -3788,12 +3500,12 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" +checksum = "a8bd22a874a2d0b70452d5597b12c537331d49060824a95f49f108994f94aa4c" dependencies = [ "async-compression", - "bitflags", + "bitflags 2.3.3", "bytes", "futures-core", "futures-util", @@ -3833,9 +3545,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", ] @@ -3869,9 +3581,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3896,25 +3608,15 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unindent" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa30f5ea51ff7edfc797c6d3f9ec8cbd8cfedef5371766b7181d33977f4814f" - -[[package]] -name = "universal-hash" -version = "0.4.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] +checksum = "0f86d931b9d0b666761dcfcbac3ec5e9daff8a2becfff93a8fce2591ae297b95" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "untrusted" @@ -3924,9 +3626,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -3936,13 +3638,9 @@ dependencies = [ [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" [[package]] name = "vcpkg" @@ -3974,11 +3672,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -4002,9 +3699,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -4012,24 +3709,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.26", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -4039,9 +3736,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4049,28 +3746,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.26", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -4078,11 +3775,11 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa54963694b65584e170cf5dc46aeb4dcaa5584e652ff5f3952e56d66aff0125" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki", + "rustls-webpki 0.100.1", ] [[package]] @@ -4122,22 +3819,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.1", ] [[package]] @@ -4155,7 +3837,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -4175,9 +3857,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -4296,7 +3978,7 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.23", ] [[package]] @@ -4311,5 +3993,5 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.21", + "time 0.3.23", ] diff --git a/Cargo.toml b/Cargo.toml index 1556f84f43..55d11cda44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ axum-server = "0.5.0" base64 = "0.21.0" bech32 = "0.9.1" bip39 = "2.0.0" -bitcoin = { version = "0.29.1", features = ["rand"] } +bitcoin = { version = "0.30.0", features = ["rand"] } boilerplate = { version = "0.2.3", features = ["axum"] } chrono = "0.4.19" clap = { version = "3.2.18", features = ["derive", "deprecated"] } @@ -38,10 +38,9 @@ lazy_static = "1.4.0" log = "0.4.14" mime = "0.3.16" mime_guess = "2.0.4" -miniscript = "9.0.1" +miniscript = "10.0.0" mp4 = "0.13.0" -ord-bitcoincore-rpc = "0.16.5" -postgres = "0.19.5" +ord-bitcoincore-rpc = "0.17.0" redb = "1.0.2" regex = "1.6.0" reqwest = "0.11.10" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index c5f2e47066..9c56ad2cd3 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -15,7 +15,7 @@ debug = 1 [dependencies] arbitrary = { version = "1", features = ["derive"] } -bitcoin = { version = "0.29.1", features = ["rand"] } +bitcoin = { version = "0.30.0", features = ["rand"] } libfuzzer-sys = "0.4" ord = { path = ".." } diff --git a/src/chain.rs b/src/chain.rs index 8145578ea6..1f72115bbb 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -54,7 +54,7 @@ impl Chain { pub(crate) fn address_from_script( self, script: &Script, - ) -> Result { + ) -> Result { Address::from_script(script, self.network()) } @@ -66,13 +66,6 @@ impl Chain { Self::Regtest => data_dir.join("regtest"), } } - - pub(crate) fn check_address_is_valid_for_network(self, address: &Address) -> Result { - if !address.is_valid_for_network(self.network()) { - bail!("Address `{address}` is not valid for {self}"); - } - Ok(()) - } } impl Display for Chain { diff --git a/src/index.rs b/src/index.rs index c2f30de1fb..ebac7a1e46 100644 --- a/src/index.rs +++ b/src/index.rs @@ -8,7 +8,7 @@ use { }, super::*, crate::wallet::Wallet, - bitcoin::BlockHeader, + bitcoin::block::Header, bitcoincore_rpc::{json::GetBlockHeaderResult, Client}, chrono::SubsecRound, indicatif::{ProgressBar, ProgressStyle}, @@ -616,7 +616,7 @@ impl Index { } } - pub(crate) fn block_header(&self, hash: BlockHash) -> Result> { + pub(crate) fn block_header(&self, hash: BlockHash) -> Result> { self.client.get_block_header(&hash).into_option() } @@ -2726,30 +2726,30 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"qix") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); - let witness = Witness::from_vec(vec![script.into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[script.into_bytes(), Vec::new()]); let txid = context.rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0)], @@ -2833,30 +2833,30 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"qix") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); - let witness = Witness::from_vec(vec![script.into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[script.into_bytes(), Vec::new()]); let txid = context.rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0), (2, 0, 0), (3, 0, 0)], @@ -2938,30 +2938,30 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"qix") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); - let witness = Witness::from_vec(vec![script.into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[script.into_bytes(), Vec::new()]); let txid = context.rpc_server.broadcast_tx(TransactionTemplate { inputs: &[(1, 0, 0)], diff --git a/src/index/entry.rs b/src/index/entry.rs index 9b9c80de05..f7c09ea91f 100644 --- a/src/index/entry.rs +++ b/src/index/entry.rs @@ -14,11 +14,11 @@ impl Entry for BlockHash { type Value = BlockHashValue; fn load(value: Self::Value) -> Self { - BlockHash::from_inner(value) + BlockHash::from_raw_hash(Hash::from_byte_array(value)) } fn store(self) -> Self::Value { - self.into_inner() + *self.as_ref() } } @@ -72,7 +72,7 @@ impl Entry for InscriptionId { fn load(value: Self::Value) -> Self { let (txid, index) = value.split_at(32); Self { - txid: Txid::from_inner(txid.try_into().unwrap()), + txid: Txid::from_raw_hash(Hash::from_slice(txid).unwrap()), index: u32::from_be_bytes(index.try_into().unwrap()), } } @@ -80,7 +80,7 @@ impl Entry for InscriptionId { fn store(self) -> Self::Value { let mut value = [0; 36]; let (txid, index) = value.split_at_mut(32); - txid.copy_from_slice(self.txid.as_inner()); + txid.copy_from_slice(self.txid.as_ref()); index.copy_from_slice(&self.index.to_be_bytes()); value } diff --git a/src/index/updater.rs b/src/index/updater.rs index d1be015dc7..7b78fb435e 100644 --- a/src/index/updater.rs +++ b/src/index/updater.rs @@ -9,7 +9,7 @@ use { mod inscription_updater; struct BlockData { - header: BlockHeader, + header: Header, txdata: Vec<(Transaction, Txid)>, } @@ -102,12 +102,7 @@ impl Updater { let mut uncommitted = 0; let mut value_cache = HashMap::new(); - loop { - let block = match rx.recv() { - Ok(block) => block, - Err(mpsc::RecvError) => break, - }; - + while let Ok(block) = rx.recv() { self.index_block( index, &mut outpoint_sender, @@ -397,7 +392,7 @@ impl Updater { if let Some(prev_height) = self.height.checked_sub(1) { let prev_hash = height_to_block_hash.get(&prev_height)?.unwrap(); - if prev_hash.value() != block.header.prev_blockhash.as_ref() { + if prev_hash.value() != &block.header.prev_blockhash.as_raw_hash().to_byte_array() { index.reorged.store(true, atomic::Ordering::Relaxed); return Err(anyhow!("reorg detected at or before {prev_height}")); } diff --git a/src/inscription.rs b/src/inscription.rs index aa61d6fbc8..f4cec7cfb8 100644 --- a/src/inscription.rs +++ b/src/inscription.rs @@ -3,22 +3,17 @@ use { bitcoin::{ blockdata::{ opcodes, - script::{self, Instruction, Instructions}, + script::{self, Instruction, Instructions, PushBytesBuf}, }, - util::taproot::TAPROOT_ANNEX_PREFIX, - Script, Witness, + taproot::TAPROOT_ANNEX_PREFIX, + ScriptBuf, Witness, }, std::{iter::Peekable, str}, }; -const INSCRIPTION_ENVELOPE_HEADER: [bitcoin::blockdata::script::Instruction<'static>; 3] = [ - Instruction::PushBytes(&[]), // This is an OP_FALSE - Instruction::Op(opcodes::all::OP_IF), - Instruction::PushBytes(PROTOCOL_ID), -]; -const PROTOCOL_ID: &[u8] = b"ord"; -const BODY_TAG: &[u8] = &[]; -const CONTENT_TYPE_TAG: &[u8] = &[1]; +const PROTOCOL_ID: [u8; 3] = *b"ord"; +const BODY_TAG: [u8; 0] = []; +const CONTENT_TYPE_TAG: [u8; 1] = [1]; #[derive(Debug, PartialEq, Clone)] pub(crate) enum Curse { @@ -93,23 +88,23 @@ impl Inscription { .push_opcode(opcodes::all::OP_IF) .push_slice(PROTOCOL_ID); - if let Some(content_type) = &self.content_type { + if let Some(content_type) = self.content_type.clone() { builder = builder .push_slice(CONTENT_TYPE_TAG) - .push_slice(content_type); + .push_slice(PushBytesBuf::try_from(content_type).unwrap()); } if let Some(body) = &self.body { builder = builder.push_slice(BODY_TAG); for chunk in body.chunks(520) { - builder = builder.push_slice(chunk); + builder = builder.push_slice(PushBytesBuf::try_from(chunk.to_vec()).unwrap()); } } builder.push_opcode(opcodes::all::OP_ENDIF) } - pub(crate) fn append_reveal_script(&self, builder: script::Builder) -> Script { + pub(crate) fn append_reveal_script(&self, builder: script::Builder) -> ScriptBuf { self.append_reveal_script_to_builder(builder).into_script() } @@ -168,6 +163,7 @@ pub(crate) enum InscriptionError { type Result = std::result::Result; +#[derive(Debug)] struct InscriptionParser<'a> { instructions: Peekable>, } @@ -201,7 +197,7 @@ impl<'a> InscriptionParser<'a> { .unwrap(); InscriptionParser { - instructions: Script::from(Vec::from(script)).instructions().peekable(), + instructions: ScriptBuf::from(Vec::from(script)).instructions().peekable(), } .parse_inscriptions() .into_iter() @@ -223,32 +219,31 @@ impl<'a> InscriptionParser<'a> { fn parse_one_inscription(&mut self) -> Result { self.advance_into_inscription_envelope()?; - let mut fields = BTreeMap::new(); loop { match self.advance()? { - Instruction::PushBytes(BODY_TAG) => { + Instruction::PushBytes(tag) if tag.as_bytes() == BODY_TAG.as_slice() => { let mut body = Vec::new(); while !self.accept(&Instruction::Op(opcodes::all::OP_ENDIF))? { body.extend_from_slice(self.expect_push()?); } - fields.insert(BODY_TAG, body); + fields.insert(BODY_TAG.as_slice(), body); break; } Instruction::PushBytes(tag) => { - if fields.contains_key(tag) { + if fields.contains_key(tag.as_bytes()) { return Err(InscriptionError::InvalidInscription); } - fields.insert(tag, self.expect_push()?.to_vec()); + fields.insert(tag.as_bytes(), self.expect_push()?.to_vec()); } Instruction::Op(opcodes::all::OP_ENDIF) => break, _ => return Err(InscriptionError::InvalidInscription), } } - let body = fields.remove(BODY_TAG); - let content_type = fields.remove(CONTENT_TYPE_TAG); + let body = fields.remove(BODY_TAG.as_slice()); + let content_type = fields.remove(CONTENT_TYPE_TAG.as_slice()); for tag in fields.keys() { if let Some(lsb) = tag.first() { @@ -271,7 +266,11 @@ impl<'a> InscriptionParser<'a> { fn advance_into_inscription_envelope(&mut self) -> Result<()> { loop { - if self.match_instructions(&INSCRIPTION_ENVELOPE_HEADER)? { + if self.match_instructions(&[ + Instruction::PushBytes((&[]).into()), // represents an OF_FALSE + Instruction::Op(opcodes::all::OP_IF), + Instruction::PushBytes((&PROTOCOL_ID).into()), + ])? { break; } } @@ -291,7 +290,7 @@ impl<'a> InscriptionParser<'a> { fn expect_push(&mut self) -> Result<&'a [u8]> { match self.advance()? { - Instruction::PushBytes(bytes) => Ok(bytes), + Instruction::PushBytes(bytes) => Ok(bytes.as_bytes()), _ => Err(InscriptionError::InvalidInscription), } } @@ -327,7 +326,7 @@ mod tests { #[test] fn ignore_key_path_spends() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[Vec::new()])), Err(InscriptionError::KeyPathSpend), ); } @@ -335,7 +334,7 @@ mod tests { #[test] fn ignore_key_path_spends_with_annex() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![Vec::new(), vec![0x50]])), + InscriptionParser::parse(&Witness::from_slice(&[Vec::new(), vec![0x50]])), Err(InscriptionError::KeyPathSpend), ); } @@ -343,7 +342,7 @@ mod tests { #[test] fn ignore_unparsable_scripts() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![vec![0x01], Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[vec![0x01], Vec::new()])), Err(InscriptionError::Script(script::Error::EarlyEndOfScript)), ); } @@ -351,8 +350,8 @@ mod tests { #[test] fn no_inscription() { assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![ - Script::new().into_bytes(), + InscriptionParser::parse(&Witness::from_slice(&[ + ScriptBuf::new().into_bytes(), Vec::new() ])), Ok(vec![]) @@ -474,16 +473,16 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::all::OP_CHECKSIG) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![inscription("text/plain;charset=utf-8", "ord")]), ); } @@ -495,15 +494,15 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![inscription("text/plain;charset=utf-8", "ord")]), ); } @@ -514,23 +513,23 @@ mod tests { .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"foo") .push_opcode(opcodes::all::OP_ENDIF) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") - .push_slice(&[1]) + .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") - .push_slice(&[]) + .push_slice([]) .push_slice(b"bar") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![ inscription("text/plain;charset=utf-8", "foo"), inscription("text/plain;charset=utf-8", "bar") @@ -557,11 +556,11 @@ mod tests { let script = script::Builder::new() .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) - .push_slice("ord".as_bytes()) + .push_slice(b"ord") .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![]) ); } @@ -570,12 +569,12 @@ mod tests { fn no_op_false() { let script = script::Builder::new() .push_opcode(opcodes::all::OP_IF) - .push_slice("ord".as_bytes()) + .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( - InscriptionParser::parse(&Witness::from_vec(vec![script.into_bytes(), Vec::new()])), + InscriptionParser::parse(&Witness::from_slice(&[script.into_bytes(), Vec::new()])), Ok(vec![]) ); } @@ -594,10 +593,10 @@ mod tests { fn extract_from_transaction() { let tx = Transaction { version: 0, - lock_time: bitcoin::PackedLockTime(0), + lock_time: bitcoin::locktime::absolute::LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness: envelope(&[b"ord", &[1], b"text/plain;charset=utf-8", &[], b"ord"]), }], @@ -619,17 +618,17 @@ mod tests { fn extract_from_second_input() { let tx = Transaction { version: 0, - lock_time: bitcoin::PackedLockTime(0), + lock_time: bitcoin::locktime::absolute::LockTime::ZERO, input: vec![ TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness: Witness::new(), }, TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness: inscription("foo", [1; 1040]).to_witness(), }, @@ -649,14 +648,14 @@ mod tests { builder = inscription("foo", [1; 100]).append_reveal_script_to_builder(builder); builder = inscription("bar", [1; 100]).append_reveal_script_to_builder(builder); - let witness = Witness::from_vec(vec![builder.into_script().into_bytes(), Vec::new()]); + let witness = Witness::from_slice(&[builder.into_script().into_bytes(), Vec::new()]); let tx = Transaction { version: 0, - lock_time: bitcoin::PackedLockTime(0), + lock_time: bitcoin::locktime::absolute::LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence(0), witness, }], diff --git a/src/lib.rs b/src/lib.rs index 7a7015259a..64a828a0f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,11 +33,12 @@ use { anyhow::{anyhow, bail, Context, Error}, bip39::Mnemonic, bitcoin::{ + address::{Address, NetworkUnchecked}, blockdata::constants::COIN_VALUE, consensus::{self, Decodable, Encodable}, hash_types::BlockHash, hashes::Hash, - Address, Amount, Block, Network, OutPoint, Script, Sequence, Transaction, TxIn, TxOut, Txid, + Amount, Block, Network, OutPoint, Script, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, }, bitcoincore_rpc::{Client, RpcApi}, chain::Chain, diff --git a/src/object.rs b/src/object.rs index ffde4d7084..15b7a21205 100644 --- a/src/object.rs +++ b/src/object.rs @@ -2,7 +2,7 @@ use super::*; #[derive(Debug, PartialEq)] pub enum Object { - Address(Address), + Address(Address), Hash([u8; 32]), InscriptionId(InscriptionId), Integer(u128), @@ -21,7 +21,7 @@ impl FromStr for Object { Address => Ok(Self::Address(s.parse()?)), Decimal | Degree | Percentile | Name => Ok(Self::Sat(s.parse()?)), Hash => Ok(Self::Hash( - bitcoin::hashes::sha256::Hash::from_str(s)?.into_inner(), + bitcoin::hashes::sha256::Hash::from_str(s)?.to_byte_array(), )), InscriptionId => Ok(Self::InscriptionId(s.parse()?)), Integer => Ok(Self::Integer(s.parse()?)), @@ -34,7 +34,7 @@ impl FromStr for Object { impl Display for Object { fn fmt(&self, f: &mut Formatter) -> fmt::Result { match self { - Self::Address(address) => write!(f, "{address}"), + Self::Address(address) => write!(f, "{}", address.clone().assume_checked()), Self::Hash(hash) => { for byte in hash { write!(f, "{byte:02x}")?; diff --git a/src/subcommand/preview.rs b/src/subcommand/preview.rs index d9f402e47e..462f762952 100644 --- a/src/subcommand/preview.rs +++ b/src/subcommand/preview.rs @@ -68,8 +68,9 @@ impl Preview { let rpc_client = options.bitcoin_rpc_client_for_wallet_command(false)?; - let address = - rpc_client.get_new_address(None, Some(bitcoincore_rpc::json::AddressType::Bech32m))?; + let address = rpc_client + .get_new_address(None, Some(bitcoincore_rpc::json::AddressType::Bech32m))? + .require_network(Network::Regtest)?; rpc_client.generate_to_address(101, &address)?; diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index 9dbaf4c3d2..816db2e06f 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -434,7 +434,7 @@ impl Server { TxOut { value, - script_pubkey: Script::new(), + script_pubkey: ScriptBuf::new(), } } else { index @@ -1037,7 +1037,7 @@ mod tests { fn new_with_regtest() -> Self { Self::new_server( test_bitcoincore_rpc::builder() - .network(bitcoin::Network::Regtest) + .network(bitcoin::network::constants::Network::Regtest) .build(), None, &["--chain", "regtest"], diff --git a/src/subcommand/wallet.rs b/src/subcommand/wallet.rs index 914805d5af..00c1d8da97 100644 --- a/src/subcommand/wallet.rs +++ b/src/subcommand/wallet.rs @@ -5,7 +5,7 @@ use { All, Secp256k1, }, bitcoin::{ - util::bip32::{ChildNumber, DerivationPath, ExtendedPrivKey, Fingerprint}, + bip32::{ChildNumber, DerivationPath, ExtendedPrivKey, Fingerprint}, Network, }, bitcoincore_rpc::bitcoincore_rpc_json::{ImportDescriptors, Timestamp}, @@ -71,10 +71,13 @@ impl Wallet { } } -fn get_change_address(client: &Client) -> Result
{ - client - .call("getrawchangeaddress", &["bech32m".into()]) - .context("could not get change addresses from wallet") +fn get_change_address(client: &Client, options: &Options) -> Result
{ + Ok( + client + .call::>("getrawchangeaddress", &["bech32m".into()]) + .context("could not get change addresses from wallet")? + .require_network(options.chain().network())?, + ) } pub(crate) fn initialize_wallet(options: &Options, seed: [u8; 64]) -> Result { diff --git a/src/subcommand/wallet/inscribe.rs b/src/subcommand/wallet/inscribe.rs index 9f9c9bf1fb..639be28dc0 100644 --- a/src/subcommand/wallet/inscribe.rs +++ b/src/subcommand/wallet/inscribe.rs @@ -3,15 +3,16 @@ use { crate::wallet::Wallet, bitcoin::{ blockdata::{opcodes, script}, + key::PrivateKey, + key::{TapTweak, TweakedKeyPair, TweakedPublicKey, UntweakedKeyPair}, + locktime::absolute::LockTime, policy::MAX_STANDARD_TX_WEIGHT, - schnorr::{TapTweak, TweakedKeyPair, TweakedPublicKey, UntweakedKeyPair}, secp256k1::{ self, constants::SCHNORR_SIGNATURE_SIZE, rand, schnorr::Signature, Secp256k1, XOnlyPublicKey, }, - util::key::PrivateKey, - util::sighash::{Prevouts, SighashCache}, - util::taproot::{ControlBlock, LeafVersion, TapLeafHash, TaprootBuilder}, - PackedLockTime, SchnorrSighashType, Witness, + sighash::{Prevouts, SighashCache, TapSighashType}, + taproot::{ControlBlock, LeafVersion, TapLeafHash, TaprootBuilder}, + ScriptBuf, Witness, }, bitcoincore_rpc::bitcoincore_rpc_json::{ImportDescriptors, Timestamp}, bitcoincore_rpc::Client, @@ -49,7 +50,7 @@ pub(crate) struct Inscribe { #[clap(long, help = "Don't sign or broadcast transactions.")] pub(crate) dry_run: bool, #[clap(long, help = "Send inscription to .")] - pub(crate) destination: Option
, + pub(crate) destination: Option>, } impl Inscribe { @@ -65,16 +66,14 @@ impl Inscribe { let inscriptions = index.get_inscriptions(None)?; - let commit_tx_change = [get_change_address(&client)?, get_change_address(&client)?]; + let commit_tx_change = [ + get_change_address(&client, &options)?, + get_change_address(&client, &options)?, + ]; let reveal_tx_destination = match self.destination { - Some(address) => { - options - .chain() - .check_address_is_valid_for_network(&address)?; - address - } - None => get_change_address(&client)?, + Some(address) => address.require_network(options.chain().network())?, + None => get_change_address(&client, &options)?, }; let (unsigned_commit_tx, reveal_tx, recovery_key_pair) = @@ -193,8 +192,8 @@ impl Inscribe { let (public_key, _parity) = XOnlyPublicKey::from_keypair(&key_pair); let reveal_script = inscription.append_reveal_script( - script::Builder::new() - .push_slice(&public_key.serialize()) + ScriptBuf::builder() + .push_slice(public_key.serialize()) .push_opcode(opcodes::all::OP_CHECKSIG), ); @@ -268,12 +267,12 @@ impl Inscribe { 0, &Prevouts::All(&[output]), TapLeafHash::from_script(&reveal_script, LeafVersion::TapScript), - SchnorrSighashType::Default, + TapSighashType::Default, ) .expect("signature hash should compute"); let signature = secp256k1.sign_schnorr( - &secp256k1::Message::from_slice(signature_hash.as_inner()) + &secp256k1::Message::from_slice(signature_hash.as_ref()) .expect("should be cryptographically secure hash"), &key_pair, ); @@ -298,7 +297,7 @@ impl Inscribe { let reveal_weight = reveal_tx.weight(); - if !no_limit && reveal_weight > MAX_STANDARD_TX_WEIGHT.try_into().unwrap() { + if !no_limit && reveal_weight > bitcoin::Weight::from_wu(MAX_STANDARD_TX_WEIGHT.into()) { bail!( "reveal transaction weight greater than {MAX_STANDARD_TX_WEIGHT} (MAX_STANDARD_TX_WEIGHT): {reveal_weight}" ); @@ -350,7 +349,7 @@ impl Inscribe { sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, }], output: vec![output], - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, version: 1, }; diff --git a/src/subcommand/wallet/receive.rs b/src/subcommand/wallet/receive.rs index 78726b8156..94228ff364 100644 --- a/src/subcommand/wallet/receive.rs +++ b/src/subcommand/wallet/receive.rs @@ -2,7 +2,7 @@ use super::*; #[derive(Deserialize, Serialize)] pub struct Output { - pub address: Address, + pub address: Address, } pub(crate) fn run(options: Options) -> Result { diff --git a/src/subcommand/wallet/send.rs b/src/subcommand/wallet/send.rs index b0622150b4..b4f1551d4b 100644 --- a/src/subcommand/wallet/send.rs +++ b/src/subcommand/wallet/send.rs @@ -2,7 +2,7 @@ use {super::*, crate::wallet::Wallet}; #[derive(Debug, Parser)] pub(crate) struct Send { - address: Address, + address: Address, outgoing: Outgoing, #[clap(long, help = "Use fee rate of sats/vB")] fee_rate: FeeRate, @@ -15,9 +15,7 @@ pub struct Output { impl Send { pub(crate) fn run(self, options: Options) -> Result { - options - .chain() - .check_address_is_valid_for_network(&self.address)?; + let address = self.address.require_network(options.chain().network())?; let index = Index::open(&options)?; index.update()?; @@ -56,8 +54,7 @@ impl Send { bail!("failed to lock ordinal UTXOs"); } - let txid = - client.send_to_address(&self.address, amount, None, None, None, None, None, None)?; + let txid = client.send_to_address(&address, amount, None, None, None, None, None, None)?; print_json(Output { transaction: txid })?; @@ -65,13 +62,16 @@ impl Send { } }; - let change = [get_change_address(&client)?, get_change_address(&client)?]; + let change = [ + get_change_address(&client, &options)?, + get_change_address(&client, &options)?, + ]; let unsigned_transaction = TransactionBuilder::build_transaction_with_postage( satpoint, inscriptions, unspent_outputs, - self.address, + address, change, self.fee_rate, )?; diff --git a/src/subcommand/wallet/transaction_builder.rs b/src/subcommand/wallet/transaction_builder.rs index 11f73d4f65..9e3365ee90 100644 --- a/src/subcommand/wallet/transaction_builder.rs +++ b/src/subcommand/wallet/transaction_builder.rs @@ -35,8 +35,8 @@ use { super::*, bitcoin::{ - blockdata::{locktime::PackedLockTime, witness::Witness}, - util::amount::Amount, + blockdata::{locktime::absolute::LockTime, witness::Witness}, + Amount, ScriptBuf, }, std::collections::{BTreeMap, BTreeSet}, }; @@ -425,13 +425,13 @@ impl TransactionBuilder { fn estimate_vbytes_with(inputs: usize, outputs: Vec
) -> usize { Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: (0..inputs) .map(|_| TxIn { previous_output: OutPoint::null(), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, - witness: Witness::from_vec(vec![vec![0; TransactionBuilder::SCHNORR_SIGNATURE_SIZE]]), + witness: Witness::from_slice(&[&[0; TransactionBuilder::SCHNORR_SIGNATURE_SIZE]]), }) .collect(), output: outputs @@ -453,13 +453,13 @@ impl TransactionBuilder { let recipient = self.recipient.script_pubkey(); let transaction = Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: self .inputs .iter() .map(|outpoint| TxIn { previous_output: *outpoint, - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, witness: Witness::new(), }) @@ -599,7 +599,7 @@ impl TransactionBuilder { let mut modified_tx = transaction.clone(); for input in &mut modified_tx.input { - input.witness = Witness::from_vec(vec![vec![0; 64]]); + input.witness = Witness::from_slice(&[&[0; 64]]); } let expected_fee = self.fee_rate.fee(modified_tx.vsize()); @@ -730,7 +730,7 @@ mod tests { tx_builder.build(), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2)), tx_in(outpoint(3))], output: vec![ tx_out(5_000, recipient()), @@ -772,7 +772,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(4901, recipient())], }) @@ -819,7 +819,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![tx_out(4_950, change(1)), tx_out(4_862, recipient())], }) @@ -881,7 +881,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![ tx_out(4_950, change(1)), @@ -968,8 +968,9 @@ mod tests { .unwrap(); builder.outputs[0].0 = "tb1qx4gf3ya0cxfcwydpq8vr2lhrysneuj5d7lqatw" - .parse() - .unwrap(); + .parse::>() + .unwrap() + .assume_checked(); builder.build().unwrap(); } @@ -1012,7 +1013,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![ tx_out(TransactionBuilder::TARGET_POSTAGE.to_sat(), recipient()), @@ -1058,7 +1059,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(3_333, change(1)), tx_out(6_537, recipient())], }) @@ -1083,7 +1084,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(2)), tx_in(outpoint(1))], output: vec![tx_out(10_001, change(1)), tx_out(9_811, recipient())], }) @@ -1311,7 +1312,7 @@ mod tests { transaction, Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(10_000 - fee.to_sat(), recipient())], } @@ -1334,7 +1335,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(1000, recipient()), tx_out(3870, change(1))], }) @@ -1360,7 +1361,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![tx_out(1500, recipient()), tx_out(312, change(1))], }) @@ -1444,8 +1445,9 @@ mod tests { 0, vec![ "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), ], ); assert_eq!(after - before, TransactionBuilder::ADDITIONAL_OUTPUT_VBYTES); @@ -1467,7 +1469,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(901, recipient())], }), @@ -1489,7 +1491,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(20_000, recipient())], }), @@ -1512,7 +1514,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(1005, recipient())], }), @@ -1589,7 +1591,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(1802, recipient())], }), @@ -1611,7 +1613,7 @@ mod tests { ), Ok(Transaction { version: 1, - lock_time: PackedLockTime::ZERO, + lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![tx_out(20250, recipient())], }), diff --git a/src/templates/block.rs b/src/templates/block.rs index 3eab023012..d05988ff91 100644 --- a/src/templates/block.rs +++ b/src/templates/block.rs @@ -11,11 +11,9 @@ pub(crate) struct BlockHtml { impl BlockHtml { pub(crate) fn new(block: Block, height: Height, best_height: Height) -> Self { - let mut target = block.header.target().to_be_bytes(); - target.reverse(); Self { hash: block.header.block_hash(), - target: BlockHash::from_inner(target), + target: BlockHash::from_raw_hash(Hash::from_byte_array(block.header.target().to_be_bytes())), block, height, best_height, diff --git a/src/templates/input.rs b/src/templates/input.rs index 9fb77e1fd8..aa070f605e 100644 --- a/src/templates/input.rs +++ b/src/templates/input.rs @@ -30,7 +30,7 @@ mod tests { previous_output: "0000000000000000000000000000000000000000000000000000000000000000:0" .parse() .unwrap(), - script_sig: script::Builder::new().push_slice("foo".as_bytes()).into_script(), + script_sig: ScriptBuf::builder().push_slice(b"foo").into_script(), sequence: Sequence::MAX, witness, } diff --git a/src/templates/output.rs b/src/templates/output.rs index d8d447bcb5..2172795b18 100644 --- a/src/templates/output.rs +++ b/src/templates/output.rs @@ -19,7 +19,7 @@ impl PageContent for OutputHtml { mod tests { use { super::*, - bitcoin::{blockdata::script, PubkeyHash, Script}, + bitcoin::{blockdata::script, PubkeyHash}, }; #[test] @@ -32,7 +32,7 @@ mod tests { chain: Chain::Mainnet, output: TxOut { value: 3, - script_pubkey: Script::new_p2pkh(&PubkeyHash::all_zeros()), + script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, }, " @@ -89,7 +89,7 @@ mod tests { chain: Chain::Mainnet, output: TxOut { value: 3, - script_pubkey: Script::new_p2pkh(&PubkeyHash::all_zeros()), + script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, } .to_string(), @@ -116,7 +116,7 @@ mod tests { chain: Chain::Mainnet, output: TxOut { value: 3, - script_pubkey: Script::new_p2pkh(&PubkeyHash::all_zeros()), + script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, }, " diff --git a/src/templates/transaction.rs b/src/templates/transaction.rs index c5b7c878c0..14ec84801a 100644 --- a/src/templates/transaction.rs +++ b/src/templates/transaction.rs @@ -36,14 +36,14 @@ impl PageContent for TransactionHtml { mod tests { use { super::*, - bitcoin::{blockdata::script, PackedLockTime, TxOut}, + bitcoin::{blockdata::script, locktime::absolute::LockTime, TxOut}, }; #[test] fn html() { let transaction = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: vec![TxIn { sequence: Default::default(), previous_output: Default::default(), @@ -104,7 +104,7 @@ mod tests { fn with_blockhash() { let transaction = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: Vec::new(), output: vec![ TxOut { diff --git a/src/test.rs b/src/test.rs index 3ca70c33e0..43fd74e927 100644 --- a/src/test.rs +++ b/src/test.rs @@ -1,8 +1,9 @@ pub(crate) use { super::*, crate::inscription::TransactionInscription, + bitcoin::blockdata::script::PushBytesBuf, bitcoin::blockdata::{opcodes, script}, - bitcoin::Witness, + bitcoin::{ScriptBuf, Witness}, pretty_assertions::assert_eq as pretty_assert_eq, std::iter, test_bitcoincore_rpc::TransactionTemplate, @@ -69,14 +70,16 @@ pub(crate) fn satpoint(n: u64, offset: u64) -> SatPoint { pub(crate) fn address() -> Address { "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" - .parse() + .parse::>() .unwrap() + .assume_checked() } pub(crate) fn recipient() -> Address { "tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz" - .parse() + .parse::>() .unwrap() + .assume_checked() } pub(crate) fn change(n: u64) -> Address { @@ -86,14 +89,15 @@ pub(crate) fn change(n: u64) -> Address { 2 => "tb1qxz9yk0td0yye009gt6ayn7jthz5p07a75luryg", _ => panic!(), } - .parse() + .parse::>() .unwrap() + .assume_checked() } pub(crate) fn tx_in(previous_output: OutPoint) -> TxIn { TxIn { previous_output, - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::ENABLE_RBF_NO_LOCKTIME, witness: Witness::new(), } @@ -139,10 +143,12 @@ pub(crate) fn envelope(payload: &[&[u8]]) -> Witness { .push_opcode(opcodes::all::OP_IF); for data in payload { - builder = builder.push_slice(data); + let mut buf = PushBytesBuf::new(); + buf.extend_from_slice(data).unwrap(); + builder = builder.push_slice(buf); } let script = builder.push_opcode(opcodes::all::OP_ENDIF).into_script(); - Witness::from_vec(vec![script.into_bytes(), Vec::new()]) + Witness::from_slice(&[script.into_bytes(), Vec::new()]) } diff --git a/templates/input.html b/templates/input.html index 08d19e069f..8575091f16 100644 --- a/templates/input.html +++ b/templates/input.html @@ -10,7 +10,7 @@

Input /{{self.path.0}}/{{self.path.1}}/{{self.path.2}}

witness
{{hex::encode(consensus::serialize(&self.input.witness))}}
%% } %% if !self.input.script_sig.is_empty() { -
script sig
{{self.input.script_sig.asm()}}
+
script sig
{{self.input.script_sig.to_asm_string()}}
text
{{String::from_utf8_lossy(self.input.script_sig.as_bytes())}}
%% } diff --git a/templates/output.html b/templates/output.html index 3736b21110..e2b01448db 100644 --- a/templates/output.html +++ b/templates/output.html @@ -9,7 +9,7 @@

Output {{self.outpoint}}

%% }
value
{{ self.output.value }}
-
script pubkey
{{ self.output.script_pubkey.asm() }}
+
script pubkey
{{ self.output.script_pubkey.to_asm_string() }}
%% if let Ok(address) = self.chain.address_from_script(&self.output.script_pubkey ) {
address
{{ address }}
%% } diff --git a/templates/transaction.html b/templates/transaction.html index 23bb8614e9..15636f26b2 100644 --- a/templates/transaction.html +++ b/templates/transaction.html @@ -27,7 +27,7 @@

{{"Output".tally(self.transaction.output.len())}}

value
{{ output.value }}
-
script pubkey
{{ output.script_pubkey.asm() }}
+
script pubkey
{{ output.script_pubkey.to_asm_string() }}
%% if let Ok(address) = self.chain.address_from_script(&output.script_pubkey) {
address
{{ address }}
%% } diff --git a/test-bitcoincore-rpc/Cargo.toml b/test-bitcoincore-rpc/Cargo.toml index 76016d6a64..bbb0ec79b4 100644 --- a/test-bitcoincore-rpc/Cargo.toml +++ b/test-bitcoincore-rpc/Cargo.toml @@ -8,12 +8,12 @@ homepage = "https://github.com/ordinals/ord" repository = "https://github.com/ordinals/ord" [dependencies] -bitcoin = { version = "0.29.1", features = ["serde", "rand"] } +bitcoin = { version = "0.30.0", features = ["serde", "rand"] } hex = "0.4.3" jsonrpc-core = "18.0.0" jsonrpc-derive = "18.0.0" jsonrpc-http-server = "18.0.0" -ord-bitcoincore-rpc = "0.16.5" +ord-bitcoincore-rpc = "0.17.0" reqwest = { version = "0.11.10", features = ["blocking"] } -serde = { version = "1", features = ["derive"] } -serde_json = "1.0.0" +serde = { version = "1.0.137", features = ["derive"] } +serde_json = { version = "1.0.81" } diff --git a/test-bitcoincore-rpc/src/api.rs b/test-bitcoincore-rpc/src/api.rs index 17728d3c6d..fc88b0e121 100644 --- a/test-bitcoincore-rpc/src/api.rs +++ b/test-bitcoincore-rpc/src/api.rs @@ -64,7 +64,7 @@ pub trait Api { #[rpc(name = "sendtoaddress")] fn send_to_address( &self, - address: Address, + address: Address, amount: f64, comment: Option, comment_to: Option, @@ -94,7 +94,7 @@ pub trait Api { &self, minconf: Option, maxconf: Option, - address: Option, + address: Option>, include_unsafe: Option, query_options: Option, ) -> Result, jsonrpc_core::Error>; @@ -106,7 +106,7 @@ pub trait Api { fn get_raw_change_address( &self, address_type: Option, - ) -> Result; + ) -> Result; #[rpc(name = "getdescriptorinfo")] fn get_descriptor_info( @@ -125,7 +125,7 @@ pub trait Api { &self, label: Option, address_type: Option, - ) -> Result; + ) -> Result; #[rpc(name = "listtransactions")] fn list_transactions( diff --git a/test-bitcoincore-rpc/src/lib.rs b/test-bitcoincore-rpc/src/lib.rs index 7051d283d6..7a7e314a17 100644 --- a/test-bitcoincore-rpc/src/lib.rs +++ b/test-bitcoincore-rpc/src/lib.rs @@ -3,14 +3,18 @@ use { api::Api, bitcoin::{ + address::{Address, NetworkUnchecked}, + amount::SignedAmount, + block::Header, blockdata::constants::COIN_VALUE, - blockdata::script, + blockdata::{block::Version, script}, consensus::encode::{deserialize, serialize}, - hash_types::BlockHash, + hash_types::{BlockHash, TxMerkleNode}, hashes::Hash, - util::amount::SignedAmount, - Address, Amount, Block, BlockHeader, Network, OutPoint, PackedLockTime, Script, Sequence, - Transaction, TxIn, TxMerkleNode, TxOut, Txid, Witness, Wtxid, + locktime::absolute::LockTime, + pow::CompactTarget, + Amount, Block, Network, OutPoint, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, Witness, + Wtxid, }, bitcoincore_rpc::json::{ Bip125Replaceable, CreateRawTransactionInput, Descriptor, EstimateMode, GetBalancesResult, @@ -228,6 +232,7 @@ impl Handle { Network::Testnet => Network::Testnet.to_string(), Network::Signet => Network::Signet.to_string(), Network::Regtest => Network::Regtest.to_string(), + _ => panic!(), } } diff --git a/test-bitcoincore-rpc/src/server.rs b/test-bitcoincore-rpc/src/server.rs index 0ea66122dd..58c185e07d 100644 --- a/test-bitcoincore-rpc/src/server.rs +++ b/test-bitcoincore-rpc/src/server.rs @@ -1,9 +1,8 @@ use { super::*, bitcoin::{ - psbt::serialize::Deserialize, secp256k1::{rand, KeyPair, Secp256k1, XOnlyPublicKey}, - Address, Witness, + Witness, }, bitcoincore_rpc::RawTx, }; @@ -51,6 +50,7 @@ impl Api for Server { Network::Testnet => "test", Network::Signet => "signet", Network::Regtest => "regtest", + _ => panic!(), }), blocks: 0, headers: 0, @@ -128,7 +128,7 @@ impl Api for Server { nonce: 0, previous_block_hash: None, time: 0, - version: 0, + version: Version::ONE, version_hex: Some(vec![0, 0, 0, 0]), }) .unwrap(), @@ -201,12 +201,12 @@ impl Api for Server { let tx = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: utxos .iter() .map(|input| TxIn { previous_output: OutPoint::new(input.txid, input.vout), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::MAX, witness: Witness::new(), }) @@ -215,7 +215,7 @@ impl Api for Server { .values() .map(|amount| TxOut { value: (*amount * COIN_VALUE as f64) as u64, - script_pubkey: Script::new(), + script_pubkey: ScriptBuf::new(), }) .collect(), }; @@ -247,9 +247,9 @@ impl Api for Server { assert_eq!(utxos, None, "utxos param not supported"); assert_eq!(sighash_type, None, "sighash_type param not supported"); - let mut transaction = Transaction::deserialize(&hex::decode(tx).unwrap()).unwrap(); + let mut transaction: Transaction = deserialize(&hex::decode(tx).unwrap()).unwrap(); for input in &mut transaction.input { - input.witness = Witness::from_vec(vec![vec![0; 64]]); + input.witness = Witness::from_slice(&[&[0; 64]]); } Ok( @@ -271,7 +271,7 @@ impl Api for Server { fn send_to_address( &self, - address: Address, + address: Address, amount: f64, comment: Option, comment_to: Option, @@ -291,7 +291,7 @@ impl Api for Server { let locked = state.locked.iter().cloned().collect(); state.sent.push(Sent { - address, + address: address.assume_checked(), amount, locked, }); @@ -378,7 +378,7 @@ impl Api for Server { &self, minconf: Option, maxconf: Option, - address: Option, + address: Option>, include_unsafe: Option, query_options: Option, ) -> Result, jsonrpc_core::Error> { @@ -402,7 +402,7 @@ impl Api for Server { label: None, redeem_script: None, witness_script: None, - script_pub_key: Script::new(), + script_pub_key: ScriptBuf::new(), amount, confirmations: 0, spendable: true, @@ -428,7 +428,7 @@ impl Api for Server { fn get_raw_change_address( &self, _address_type: Option, - ) -> Result { + ) -> Result { let secp256k1 = Secp256k1::new(); let key_pair = KeyPair::new(&secp256k1, &mut rand::thread_rng()); let (public_key, _parity) = XOnlyPublicKey::from_keypair(&key_pair); diff --git a/test-bitcoincore-rpc/src/state.rs b/test-bitcoincore-rpc/src/state.rs index 29b2d91889..0a05039aa5 100644 --- a/test-bitcoincore-rpc/src/state.rs +++ b/test-bitcoincore-rpc/src/state.rs @@ -48,7 +48,7 @@ impl State { pub(crate) fn push_block(&mut self, subsidy: u64) -> Block { let coinbase = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input: vec![TxIn { previous_output: OutPoint::null(), script_sig: script::Builder::new() @@ -78,19 +78,19 @@ impl State { fee }) .sum::(), - script_pubkey: Script::new(), + script_pubkey: ScriptBuf::new(), }], }; self.transactions.insert(coinbase.txid(), coinbase.clone()); let block = Block { - header: BlockHeader { - version: 0, + header: Header { + version: Version::ONE, prev_blockhash: *self.hashes.last().unwrap(), merkle_root: TxMerkleNode::all_zeros(), time: self.blocks.len().try_into().unwrap(), - bits: 0, + bits: CompactTarget::from_consensus(0), nonce: self.nonce, }, txdata: std::iter::once(coinbase) @@ -136,7 +136,7 @@ impl State { total_value += tx.output[*vout].value; input.push(TxIn { previous_output: OutPoint::new(tx.txid(), *vout as u32), - script_sig: Script::new(), + script_sig: ScriptBuf::new(), sequence: Sequence::MAX, witness: template.witness.clone(), }); @@ -150,7 +150,7 @@ impl State { let tx = Transaction { version: 0, - lock_time: PackedLockTime(0), + lock_time: LockTime::ZERO, input, output: (0..template.outputs) .map(|i| TxOut { diff --git a/tests/lib.rs b/tests/lib.rs index 50a0fbee8c..cd9f4dfab1 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -3,7 +3,11 @@ use { self::{command_builder::CommandBuilder, expected::Expected, test_server::TestServer}, bip39::Mnemonic, - bitcoin::{blockdata::constants::COIN_VALUE, Network, OutPoint, Txid}, + bitcoin::{ + address::{Address, NetworkUnchecked}, + blockdata::constants::COIN_VALUE, + Network, OutPoint, Txid, + }, executable_path::executable_path, pretty_assertions::assert_eq as pretty_assert_eq, regex::Regex, diff --git a/tests/wallet/inscribe.rs b/tests/wallet/inscribe.rs index eb28a91166..03a20ee03a 100644 --- a/tests/wallet/inscribe.rs +++ b/tests/wallet/inscribe.rs @@ -374,7 +374,8 @@ fn inscribe_to_specific_destination() { .address; let txid = CommandBuilder::new(format!( - "wallet inscribe --destination {destination} degenerate.png --fee-rate 1" + "wallet inscribe --destination {} degenerate.png --fee-rate 1", + destination.clone().assume_checked() )) .write("degenerate.png", [1; 520]) .rpc_server(&rpc_server) @@ -385,7 +386,7 @@ fn inscribe_to_specific_destination() { assert_eq!(reveal_tx.txid(), txid); assert_eq!( reveal_tx.output.first().unwrap().script_pubkey, - destination.script_pubkey() + destination.payload.script_pubkey() ); } @@ -401,7 +402,7 @@ fn inscribe_to_address_on_different_network() { .write("degenerate.png", [1; 520]) .rpc_server(&rpc_server) .expected_exit_code(1) - .stderr_regex("error: Address `tb1qsgx55dp6gn53tsmyjjv4c2ye403hgxynxs0dnm` is not valid for mainnet\n") + .stderr_regex("error: address tb1qsgx55dp6gn53tsmyjjv4c2ye403hgxynxs0dnm belongs to network testnet which is different from required bitcoin\n") .run_and_extract_stdout(); } diff --git a/tests/wallet/inscriptions.rs b/tests/wallet/inscriptions.rs index 7e2b90894c..f8c9a2f5d1 100644 --- a/tests/wallet/inscriptions.rs +++ b/tests/wallet/inscriptions.rs @@ -32,11 +32,14 @@ fn inscriptions() { .run_and_check_output::() .address; - let stdout = CommandBuilder::new(format!("wallet send --fee-rate 1 {address} {inscription}")) - .rpc_server(&rpc_server) - .expected_exit_code(0) - .stdout_regex(".*") - .run_and_extract_stdout(); + let stdout = CommandBuilder::new(format!( + "wallet send --fee-rate 1 {} {inscription}", + address.assume_checked() + )) + .rpc_server(&rpc_server) + .expected_exit_code(0) + .stdout_regex(".*") + .run_and_extract_stdout(); rpc_server.mine_blocks(1); diff --git a/tests/wallet/send.rs b/tests/wallet/send.rs index 617dbb9dd7..5ecf6122c8 100644 --- a/tests/wallet/send.rs +++ b/tests/wallet/send.rs @@ -117,7 +117,7 @@ fn send_addresses_must_be_valid_for_network() { )) .rpc_server(&rpc_server) .expected_stderr( - "error: Address `tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz` is not valid for mainnet\n", + "error: address tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz belongs to network testnet which is different from required bitcoin\n", ) .expected_exit_code(1) .run_and_extract_stdout(); @@ -234,8 +234,9 @@ fn send_btc() { &[Sent { amount: 1.0, address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), locked: Vec::new(), }] ) @@ -267,8 +268,9 @@ fn send_btc_locks_inscriptions() { &[Sent { amount: 1.0, address: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" - .parse() - .unwrap(), + .parse::>() + .unwrap() + .assume_checked(), locked: vec![OutPoint { txid: reveal, vout: 0,