diff --git a/CHANGELOG.md b/CHANGELOG.md index 23962c5592..0b4b1261ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,38 @@ Changelog ========= +[0.20.1](https://github.com/ordinals/ord/releases/tag/0.20.1) - 2024-10-03 +-------------------------------------------------------------------------- + +### Fixed +- Fix non-existant output lookup ([#3968](https://github.com/ordinals/ord/pull/3968) by [raphjaph](https://github.com/raphjaph)) +- Fix output API struct ([#3957](https://github.com/ordinals/ord/pull/3957) by [raphjaph](https://github.com/raphjaph)) +- Start indexing at correct block height ([#3956](https://github.com/ordinals/ord/pull/3956) by [partialord](https://github.com/partialord)) +- Fix /output page ([#3948](https://github.com/ordinals/ord/pull/3948) by [raphjaph](https://github.com/raphjaph)) + +### Added +- Add multi parent support to wallet ([#3228](https://github.com/ordinals/ord/pull/3228) by [raphjaph](https://github.com/raphjaph)) +- Implement burn for wallet command ([#3437](https://github.com/ordinals/ord/pull/3437) by [onchainguy-btc](https://github.com/onchainguy-btc)) +- Add `/satpoint/` endpoint ([#3949](https://github.com/ordinals/ord/pull/3949) by [raphjaph](https://github.com/raphjaph)) +- Add inscription examples to handbook ([#3769](https://github.com/ordinals/ord/pull/3769) by [cryptoni9n](https://github.com/cryptoni9n)) +- Add inscription index to /status ([#3938](https://github.com/ordinals/ord/pull/3938) by [casey](https://github.com/casey)) + +### Changed +- Keep sat ranges in low-level format ([#3963](https://github.com/ordinals/ord/pull/3963) by [partialord](https://github.com/partialord)) +- Remove dependency on `ord-bitcoincore-rpc` crate ([#3959](https://github.com/ordinals/ord/pull/3959) by [raphjaph](https://github.com/raphjaph)) +- Don't log RPC connections to bitcoind ([#3952](https://github.com/ordinals/ord/pull/3952) by [raphjaph](https://github.com/raphjaph)) +- Skip serializing None in batch::File ([#3943](https://github.com/ordinals/ord/pull/3943) by [raphjaph](https://github.com/raphjaph)) +- Allow scrolling in iframe ([#3947](https://github.com/ordinals/ord/pull/3947) by [raphjaph](https://github.com/raphjaph)) +- Put AddressInfo into api module ([#3933](https://github.com/ordinals/ord/pull/3933) by [raphjaph](https://github.com/raphjaph)) + +### Misc +- Rename parents_values -> parent_values ([#3973](https://github.com/ordinals/ord/pull/3973) by [casey](https://github.com/casey)) +- Get parents using `as_slice` instead of converting to `Vec` ([#3972](https://github.com/ordinals/ord/pull/3972) by [casey](https://github.com/casey)) +- Remove unnecessary symbols in docs/src/guides/testing.md ([#3945](https://github.com/ordinals/ord/pull/3945) by [tiaoxizhan](https://github.com/tiaoxizhan)) +- Fix clippy lint ([#3937](https://github.com/ordinals/ord/pull/3937) by [casey](https://github.com/casey)) +- Add test to remind us to fix the UtxoEntry redb type name ([#3934](https://github.com/ordinals/ord/pull/3934) by [casey](https://github.com/casey)) +- Bump version to 0.20.0-dev ([#3929](https://github.com/ordinals/ord/pull/3929) by [casey](https://github.com/casey)) + [0.20.0](https://github.com/ordinals/ord/releases/tag/0.20.0) - 2024-09-03 -------------------------------------------------------------------------- diff --git a/Cargo.lock b/Cargo.lock index 11614b410f..c741155015 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -119,9 +113,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" dependencies = [ "backtrace", ] @@ -141,6 +135,12 @@ dependencies = [ "nodrop", ] +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + [[package]] name = "asn1-rs" version = "0.3.1" @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" +checksum = "998282f8f49ccd6116b0ed8a4de0fbd3151697920e7c7533416d6e25e76434a7" dependencies = [ "brotli", "flate2", @@ -267,13 +267,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -345,7 +345,7 @@ name = "audit-cache" version = "0.0.0" dependencies = [ "colored", - "reqwest", + "reqwest 0.12.8", ] [[package]] @@ -353,14 +353,14 @@ name = "audit-content-security-policy" version = "0.0.0" dependencies = [ "colored", - "reqwest", + "reqwest 0.12.8", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -374,8 +374,8 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "itoa", "matchit", "memchr", @@ -387,7 +387,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tower", "tower-layer", @@ -404,7 +404,7 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -421,29 +421,29 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.30", "pin-project-lite", "rustls 0.21.12", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -476,13 +476,27 @@ version = "0.10.0-beta" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98f7eed2b2781a6f0b5c903471d48e15f56fb4e1165df8a9a2337fd1a59d45ea" +[[package]] +name = "bip322" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1ce446a2647b907e2b39a956e1739c9f49f12fea948a3a5ead25e5d2bf2c67c" +dependencies = [ + "base64 0.22.1", + "bitcoin 0.31.2", + "bitcoin_hashes 0.14.0", + "hex", + "miniscript", + "snafu", +] + [[package]] name = "bip39" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +checksum = "33415e24172c1b7d6066f6d999545375ab8e1d95421d6784bdfff9496f292387" dependencies = [ - "bitcoin_hashes 0.11.0", + "bitcoin_hashes 0.13.0", "serde", "unicode-normalization", ] @@ -510,7 +524,7 @@ dependencies = [ "bech32 0.10.0-beta", "bitcoin-internals", "bitcoin_hashes 0.13.0", - "hex-conservative", + "hex-conservative 0.1.2", "hex_lit", "secp256k1 0.28.2", "serde", @@ -526,16 +540,16 @@ dependencies = [ ] [[package]] -name = "bitcoin-private" -version = "0.1.0" +name = "bitcoin-io" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" +checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" [[package]] -name = "bitcoin_hashes" -version = "0.11.0" +name = "bitcoin-private" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" +checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" [[package]] name = "bitcoin_hashes" @@ -554,10 +568,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1930a4dabfebb8d7d9992db18ebe3ae2876f0a305fab206fd168df931ede293b" dependencies = [ "bitcoin-internals", - "hex-conservative", + "hex-conservative 0.1.2", "serde", ] +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative 0.2.1", +] + [[package]] name = "bitcoincore-rpc" version = "0.18.0" @@ -627,14 +651,14 @@ dependencies = [ "new_mime_guess", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -675,9 +699,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" [[package]] name = "cast" @@ -687,9 +711,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.15" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ "shlex", ] @@ -756,9 +780,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -766,9 +790,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -778,14 +802,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -850,9 +874,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -974,7 +998,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -985,7 +1009,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1020,33 +1044,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "derive_builder_macro" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1066,7 +1090,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "unicode-xid", ] @@ -1124,7 +1148,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1237,12 +1261,12 @@ checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -1277,9 +1301,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1292,9 +1316,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1302,15 +1326,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1319,9 +1343,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" @@ -1350,13 +1374,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -1372,21 +1396,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1432,15 +1456,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -1486,10 +1510,29 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.5.0", + "indexmap 2.6.0", "slab", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap 2.6.0", + "slab", + "tokio", + "tokio-util 0.7.12", "tracing", ] @@ -1511,9 +1554,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" [[package]] name = "heck" @@ -1551,6 +1594,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212ab92002354b4819390025006c897e8140934349e8635c9b077f47b4dcbd20" +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + [[package]] name = "hex_lit" version = "0.1.1" @@ -1596,6 +1648,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "pin-project-lite", +] + [[package]] name = "http-range-header" version = "0.3.1" @@ -1604,9 +1679,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1630,9 +1705,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -1644,6 +1719,43 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec 1.13.2", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls 0.23.14", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -1651,17 +1763,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1709,12 +1856,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", "serde", ] @@ -1753,9 +1900,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-terminal" @@ -1791,9 +1938,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1843,7 +1990,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" dependencies = [ "futures", - "hyper", + "hyper 0.14.30", "jsonrpc-core", "jsonrpc-server-utils", "log", @@ -1887,9 +2034,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libredox" @@ -1980,15 +2127,6 @@ dependencies = [ "bitcoin-internals", ] -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -2021,7 +2159,7 @@ dependencies = [ "jsonrpc-derive", "jsonrpc-http-server", "ord-bitcoincore-rpc", - "reqwest", + "reqwest 0.12.8", "serde", "serde_json", "tempfile", @@ -2176,9 +2314,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.4" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] @@ -2194,9 +2332,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -2227,7 +2365,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2256,13 +2394,14 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ord" -version = "0.20.0-dev" +version = "0.20.1" dependencies = [ "anyhow", "async-trait", "axum", "axum-server", "base64 0.22.1", + "bip322", "bip39", "bitcoin 0.31.2", "bitcoincore-rpc", @@ -2282,7 +2421,7 @@ dependencies = [ "html-escaper", "http 0.2.12", "humantime", - "hyper", + "hyper 0.14.30", "indicatif", "lazy_static", "log", @@ -2297,7 +2436,7 @@ dependencies = [ "redb", "ref-cast", "regex", - "reqwest", + "reqwest 0.11.27", "rss", "rust-embed", "rustls 0.22.4", @@ -2313,7 +2452,7 @@ dependencies = [ "tempfile", "tokio", "tokio-stream", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-http", "unindent", "urlencoding", @@ -2360,9 +2499,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -2406,22 +2545,22 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -2449,15 +2588,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plotters" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" dependencies = [ "num-traits", "plotters-backend", @@ -2468,15 +2607,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" [[package]] name = "plotters-svg" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" dependencies = [ "plotters-backend", ] @@ -2499,9 +2638,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" [[package]] name = "powerfmt" @@ -2520,9 +2659,9 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -2539,18 +2678,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "encoding_rs", "memchr", @@ -2629,9 +2768,9 @@ dependencies = [ [[package]] name = "redb" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58323dc32ea52a8ae105ff94bc0460c5d906307533ba3401aa63db3cbe491fe5" +checksum = "e4760ad04a88ef77075ba86ba9ea79b919e6bab29c1764c5747237cd6eaedcaa" dependencies = [ "libc", ] @@ -2673,14 +2812,14 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -2690,9 +2829,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -2701,9 +2840,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2717,11 +2856,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", - "http-body", - "hyper", - "hyper-tls", + "http-body 0.4.6", + "hyper 0.14.30", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -2730,15 +2869,15 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-service", "url", "wasm-bindgen", @@ -2747,6 +2886,50 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "system-configuration 0.6.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + [[package]] name = "ring" version = "0.16.20" @@ -2809,7 +2992,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.77", + "syn 2.0.79", "walkdir", ] @@ -2854,9 +3037,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -2886,7 +3069,20 @@ dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.7", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls" +version = "0.23.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -2915,7 +3111,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "webpki-roots", "x509-parser", ] @@ -2929,11 +3125,20 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" [[package]] name = "rustls-webpki" @@ -2947,9 +3152,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -2979,11 +3184,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3059,9 +3264,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -3069,9 +3274,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -3089,22 +3294,22 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "memchr", "ryu", @@ -3135,15 +3340,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.5.0", + "indexmap 2.6.0", "serde", "serde_derive", "serde_json", @@ -3153,14 +3358,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.9.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3169,7 +3374,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.5.0", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -3229,23 +3434,23 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "snafu" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b835cb902660db3415a672d862905e791e54d306c6e8189168c7f3d9ae1c79d" +checksum = "223891c85e2a29c3fe8fb900c1fae5e69c2e42415e3177752e8718475efa5019" dependencies = [ "snafu-derive", ] [[package]] name = "snafu-derive" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d1e02fca405f6280643174a50c942219f0bbf4dbf7d480f1dd864d6f211ae5" +checksum = "03c3c6b7927ffe7ecaa769ee0e3994da3b8cafc8f444578982c83ecb161af917" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3327,9 +3532,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -3342,6 +3547,15 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -3376,7 +3590,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -3389,37 +3614,47 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if 1.0.0", "fastrand 2.1.1", "once_cell", - "rustix 0.38.35", + "rustix 0.38.37", "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3502,7 +3737,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3525,11 +3760,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.14", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -3552,9 +3798,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -3602,12 +3848,12 @@ dependencies = [ "futures-core", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "http-range-header", "mime", "pin-project-lite", "tokio", - "tokio-util 0.7.11", + "tokio-util 0.7.12", "tower-layer", "tower-service", ] @@ -3667,15 +3913,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" @@ -3688,15 +3934,15 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unindent" @@ -3803,9 +4049,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -3814,24 +4060,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3841,9 +4087,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3851,28 +4097,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3942,7 +4188,7 @@ checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ "windows-implement", "windows-interface", - "windows-result", + "windows-result 0.1.2", "windows-targets 0.52.6", ] @@ -3954,7 +4200,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] @@ -3965,7 +4211,18 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", ] [[package]] @@ -3977,6 +4234,25 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -4155,9 +4431,9 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yasna" @@ -4186,7 +4462,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.79", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 10ac2ee661..b16e44ba16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ord" description = "◉ Ordinal wallet and block explorer" -version = "0.20.0-dev" +version = "0.20.1" license = "CC0-1.0" edition = "2021" autotests = false @@ -23,11 +23,12 @@ async-trait = "0.1.72" axum = { version = "0.6.1", features = ["http2"] } axum-server = "0.5.0" base64 = "0.22.0" +bip322 = "0.0.7" bip39 = "2.0.0" bitcoin = { version = "0.31.2", features = ["rand"] } bitcoincore-rpc = "0.18.0" boilerplate = { version = "1.0.0", features = ["axum"] } -brotli = "6.0.0" +brotli = "7.0.0" chrono = { version = "0.4.19", features = ["serde"] } ciborium = "0.2.1" clap = { version = "4.4.2", features = ["derive"] } diff --git a/batch.yaml b/batch.yaml index 20c05b3831..3d60bd79fb 100644 --- a/batch.yaml +++ b/batch.yaml @@ -7,8 +7,9 @@ # - `shared-output`: inscribe on a single output separated by postage mode: separate-outputs -# parent inscription: -parent: 6ac5cacb768794f4fd7a78bf00f2074891fce68bd65c4ff36e77177237aacacai0 +# parent inscriptions: +parents: +- 6ac5cacb768794f4fd7a78bf00f2074891fce68bd65c4ff36e77177237aacacai0 # postage for each inscription: postage: 12345 diff --git a/crates/audit-cache/Cargo.toml b/crates/audit-cache/Cargo.toml index cd0fad6fe8..d1e9140428 100644 --- a/crates/audit-cache/Cargo.toml +++ b/crates/audit-cache/Cargo.toml @@ -6,4 +6,4 @@ publish = false [dependencies] colored = "2" -reqwest = { version = "0.11.27", features = ["blocking"] } +reqwest = { version = "0.12.8", features = ["blocking"] } diff --git a/crates/audit-content-security-policy/Cargo.toml b/crates/audit-content-security-policy/Cargo.toml index adf5d9c227..03a4eb6c04 100644 --- a/crates/audit-content-security-policy/Cargo.toml +++ b/crates/audit-content-security-policy/Cargo.toml @@ -6,4 +6,4 @@ publish = false [dependencies] colored = "2" -reqwest = { version = "0.11.27", features = ["blocking"] } +reqwest = { version = "0.12.8", features = ["blocking"] } diff --git a/crates/mockcore/Cargo.toml b/crates/mockcore/Cargo.toml index 2f895f693f..da1bb55709 100644 --- a/crates/mockcore/Cargo.toml +++ b/crates/mockcore/Cargo.toml @@ -15,7 +15,7 @@ jsonrpc-core = "18.0.0" jsonrpc-derive = "18.0.0" jsonrpc-http-server = "18.0.0" ord-bitcoincore-rpc = "0.17.2" -reqwest = { version = "0.11.27", features = ["blocking"] } +reqwest = { version = "0.12.8", features = ["blocking"] } serde = { version = "1.0.137", features = ["derive"] } serde_json = { version = "1.0.81" } tempfile = "3.2.0" diff --git a/crates/mockcore/src/lib.rs b/crates/mockcore/src/lib.rs index 219bd79593..e4a12c1545 100644 --- a/crates/mockcore/src/lib.rs +++ b/crates/mockcore/src/lib.rs @@ -137,6 +137,7 @@ pub struct TransactionTemplate<'a> { pub output_values: &'a [u64], pub outputs: usize, pub p2tr: bool, + pub recipient: Option
, } #[derive(Serialize, Deserialize, Debug)] @@ -185,6 +186,7 @@ impl<'a> Default for TransactionTemplate<'a> { output_values: &[], outputs: 1, p2tr: false, + recipient: None, } } } diff --git a/crates/mockcore/src/state.rs b/crates/mockcore/src/state.rs index be3a9dce5e..1503069c2d 100644 --- a/crates/mockcore/src/state.rs +++ b/crates/mockcore/src/state.rs @@ -232,7 +232,9 @@ impl State { .get(i) .cloned() .unwrap_or(value_per_output), - script_pubkey: if template.p2tr { + script_pubkey: if let Some(recipient) = &template.recipient { + recipient.script_pubkey() + } else if template.p2tr { let secp = Secp256k1::new(); let keypair = KeyPair::new(&secp, &mut rand::thread_rng()); let internal_key = XOnlyPublicKey::from_keypair(&keypair); diff --git a/crates/ordinals/src/sat.rs b/crates/ordinals/src/sat.rs index 189bce8561..cba16e01d8 100644 --- a/crates/ordinals/src/sat.rs +++ b/crates/ordinals/src/sat.rs @@ -57,10 +57,16 @@ impl Sat { self.into() } - /// `Sat::rarity` is expensive and is called frequently when indexing. - /// Sat::is_common only checks if self is `Rarity::Common` but is - /// much faster. + /// Is this sat common or not? Much faster than `Sat::rarity()`. pub fn common(self) -> bool { + // The block rewards for epochs 0 through 9 are all multiples + // of 9765625 (the epoch 9 reward), so any sat from epoch 9 or + // earlier that isn't divisible by 9765625 is definitely common. + if self < Epoch(10).starting_sat() && self.0 % Epoch(9).subsidy() != 0 { + return true; + } + + // Fall back to the full calculation. let epoch = self.epoch(); (self.0 - epoch.starting_sat().0) % epoch.subsidy() != 0 } @@ -754,6 +760,16 @@ mod tests { case(2067187500000000 + 1); } + #[test] + fn common_fast_path() { + // Exhaustively test the Sat::common() fast path on every + // uncommon sat. + for height in 0..Epoch::FIRST_POST_SUBSIDY.starting_height().0 { + let height = Height(height); + assert!(!Sat::common(height.starting_sat())); + } + } + #[test] fn coin() { assert!(Sat(0).coin()); diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 1961c66a03..84d33e6475 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -17,6 +17,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aho-corasick" version = "1.1.3" @@ -58,47 +64,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -106,9 +113,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] @@ -178,24 +185,23 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.0", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-compression" -version = "0.4.6" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ - "brotli 3.5.0", + "brotli", "flate2", "futures-core", "memchr", @@ -222,7 +228,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock 2.8.0", + "async-lock", "autocfg", "cfg-if", "concurrent-queue", @@ -245,17 +251,6 @@ dependencies = [ "event-listener 2.5.3", ] -[[package]] -name = "async-lock" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" -dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", - "pin-project-lite", -] - [[package]] name = "async-net" version = "1.8.0" @@ -269,19 +264,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.79" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] @@ -300,7 +295,7 @@ dependencies = [ "js-sys", "lazy_static", "log", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "thiserror", "wasm-bindgen", @@ -331,9 +326,9 @@ dependencies = [ [[package]] name = "atom_syndication" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571832dcff775e26562e8e6930cd483de5587301d40d3a3b85d532b6383e15a7" +checksum = "2a3a5ed3201df5658d1aa45060c5a57dc9dba8a8ada20d696d67cb0c479ee043" dependencies = [ "chrono", "derive_builder", @@ -350,9 +345,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" @@ -416,7 +411,7 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile", "tokio", "tokio-rustls", @@ -425,15 +420,15 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -452,9 +447,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bech32" @@ -462,12 +457,6 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" -[[package]] -name = "bech32" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" - [[package]] name = "bip39" version = "2.0.0" @@ -485,7 +474,7 @@ version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1945a5048598e4189e239d3f809b19bdad4845c4b2ba400d304d2dcf26d2c462" dependencies = [ - "bech32 0.9.1", + "bech32", "bitcoin-private", "bitcoin_hashes 0.12.0", "hex_lit", @@ -523,9 +512,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -538,71 +527,47 @@ dependencies = [ [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ "async-channel", - "async-lock 3.3.0", "async-task", - "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", - "tracing", ] [[package]] name = "boilerplate" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1906889b1f805a715eac02b2dea416e25c5cfa00f099530fa9d137a3cff93113" +checksum = "ff9f82b3395618a18fdb7b586fe5cfac0c07af07d0aab300ff3dd64e4f3ec949" dependencies = [ - "darling 0.20.8", + "darling", "mime", "new_mime_guess", "proc-macro2", "quote", - "syn 2.0.55", -] - -[[package]] -name = "brotli" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor 2.5.1", + "syn 2.0.77", ] [[package]] name = "brotli" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor 4.0.0", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", + "brotli-decompressor", ] [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -610,9 +575,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -622,18 +587,19 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.90" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -644,15 +610,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -660,7 +626,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -692,9 +658,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -702,39 +668,39 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -748,9 +714,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -786,24 +752,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -829,9 +795,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -851,89 +817,54 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.4" +version = "3.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3" dependencies = [ "nix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "darling" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - -[[package]] -name = "darling" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" -dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.55", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", + "strsim", + "syn 2.0.77", ] [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "der-parser" @@ -967,51 +898,51 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] name = "derive_builder" -version = "0.12.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.12.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" dependencies = [ - "darling 0.14.4", + "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "derive_builder_macro" -version = "0.12.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ "derive_builder_core", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -1056,20 +987,20 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1079,18 +1010,18 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -1098,9 +1029,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -1117,9 +1048,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1133,20 +1064,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.2.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1155,21 +1075,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -1184,18 +1094,18 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1309,7 +1219,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] @@ -1319,7 +1229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d8a2499f0fecc0492eb3e47eab4e92da7875e1028ad2528f214ac3346ca04e" dependencies = [ "futures-io", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", ] @@ -1383,20 +1293,11 @@ dependencies = [ "once_cell", ] -[[package]] -name = "getopts" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" -dependencies = [ - "unicode-width", -] - [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1405,9 +1306,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gloo-net" @@ -1436,9 +1337,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1446,7 +1347,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -1455,9 +1356,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" +checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ "cfg-if", "crunchy", @@ -1471,9 +1372,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -1552,9 +1453,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1570,9 +1471,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1585,7 +1486,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -1657,12 +1558,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] @@ -1681,9 +1582,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -1705,6 +1606,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itoa" version = "1.0.11" @@ -1713,18 +1620,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.28" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1751,15 +1658,15 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libfuzzer-sys" @@ -1774,13 +1681,12 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", - "redox_syscall", ] [[package]] @@ -1791,15 +1697,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchit" @@ -1815,9 +1721,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -1827,9 +1733,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1843,9 +1749,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniscript" -version = "10.0.0" +version = "10.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eb102b66b2127a872dbcc73095b7b47aeb9d92f7b03c2b2298253ffc82c7594" +checksum = "d371924f9eb7aa860ab395baaaa0bcdfa81a32f330b538c4e2c04617b2722fe3" dependencies = [ "bitcoin", "bitcoin-private", @@ -1853,22 +1759,32 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1887,11 +1803,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1911,9 +1826,9 @@ checksum = "c96aba5aa877601bb3f6dd6a63a969e1f82e60646e81e71b14496995e9853c91" [[package]] name = "new_mime_guess" -version = "4.0.1" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d684d1b59e0dc07b37e2203ef576987473288f530082512aff850585c61b1f" +checksum = "02a2dfb3559d53e90b709376af1c379462f7fb3085a0177deb73e6ea0d99eff4" dependencies = [ "mime", "unicase", @@ -1921,11 +1836,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "cfg_aliases", "libc", @@ -1958,11 +1873,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -1984,11 +1898,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -1997,23 +1910,13 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "number_prefix" version = "0.4.0" @@ -2022,9 +1925,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -2046,11 +1949,11 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -2067,7 +1970,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] @@ -2078,9 +1981,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -2096,18 +1999,17 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ord" -version = "0.18.5" +version = "0.20.0-dev" dependencies = [ "anyhow", "async-trait", "axum", "axum-server", - "base64 0.22.0", - "bech32 0.11.0", + "base64 0.22.1", "bip39", "bitcoin", "boilerplate", - "brotli 5.0.0", + "brotli", "chrono", "ciborium", "clap", @@ -2130,13 +2032,13 @@ dependencies = [ "mp4", "ord-bitcoincore-rpc", "ordinals", - "pulldown-cmark", "redb", + "ref-cast", "regex", "reqwest", "rss", "rust-embed", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-acme", "serde", "serde-hex", @@ -2144,6 +2046,7 @@ dependencies = [ "serde_with", "serde_yaml", "sha3", + "snafu", "sysinfo", "tempfile", "tokio", @@ -2181,7 +2084,7 @@ dependencies = [ [[package]] name = "ordinals" -version = "0.0.8" +version = "0.0.9" dependencies = [ "bitcoin", "derive_more", @@ -2228,7 +2131,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] @@ -2245,12 +2148,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.2", + "fastrand 2.1.1", "futures-io", ] @@ -2278,9 +2181,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -2290,43 +2193,27 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "unicode-ident", + "zerocopy", ] [[package]] -name = "pulldown-cmark" -version = "0.10.0" +name = "proc-macro2" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce76ce678ffc8e5675b22aa1405de0b7037e2fdf8913fea40d1926c6fe1e6e7" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ - "bitflags 2.5.0", - "getopts", - "memchr", - "pulldown-cmark-escape", - "unicase", + "unicode-ident", ] -[[package]] -name = "pulldown-cmark-escape" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d8f9aa0e3cbcfaf8bf00300004ee3b72f74770f9cbac93f6928771f613276b" - [[package]] name = "quick-xml" -version = "0.30.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +checksum = "96a05e2e8efddfa51a84ca47cec303fac86c8541b686d37cac5efc0e094417bc" dependencies = [ "encoding_rs", "memchr", @@ -2334,9 +2221,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2405,38 +2292,49 @@ dependencies = [ [[package]] name = "redb" -version = "2.0.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1100a056c5dcdd4e5513d5333385223b26ef1bf92f31eb38f407e8c20549256" +checksum = "58323dc32ea52a8ae105ff94bc0460c5d906307533ba3401aa63db3cbe491fe5" dependencies = [ "libc", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "redox_users" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "bitflags 1.3.2", + "getrandom", + "libredox", + "thiserror", ] [[package]] -name = "redox_users" -version = "0.4.4" +name = "ref-cast" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ - "getrandom", - "libredox", - "thiserror", + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -2446,9 +2344,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2457,9 +2355,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -2533,9 +2431,9 @@ dependencies = [ [[package]] name = "rss" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b2c77eb4450d7d5f98df52c381cd6c4e19b75dad9209a9530b85a44510219a" +checksum = "27e92048f840d98c6d6dd870af9101610ea9ff413f11f1bcebf4f4c31d96d957" dependencies = [ "atom_syndication", "derive_builder", @@ -2545,9 +2443,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "8.3.0" +version = "8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb78f46d0066053d16d4ca7b898e9343bc3530f71c61d5ad84cd404ada068745" +checksum = "fa66af4a4fdd5e7ebc276f115e895611a34739a9c1c01028383d612d550953c0" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -2556,22 +2454,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.3.0" +version = "8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91ac2a3c6c0520a3fb3dd89321177c3c692937c4eb21893378219da10c44fc8" +checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.55", + "syn 2.0.77", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "8.3.0" +version = "8.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f69089032567ffff4eada41c573fc43ff466c7db7c5688b2e7969584345581" +checksum = "2e5347777e9aacb56039b0e1f28785929a8a3b709e87482e7442c72e7c12529d" dependencies = [ "sha2", "walkdir", @@ -2579,15 +2477,15 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -2617,22 +2515,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys 0.4.14", "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", @@ -2642,14 +2540,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring 0.17.8", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.7", "subtle", "zeroize", ] @@ -2694,9 +2592,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" @@ -2710,9 +2608,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ "ring 0.17.8", "rustls-pki-types", @@ -2721,15 +2619,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -2782,11 +2680,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2795,9 +2693,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2805,15 +2703,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -2831,23 +2729,24 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "itoa", + "memchr", "ryu", "serde", ] @@ -2876,15 +2775,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.7.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -2894,14 +2793,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.7.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ - "darling 0.20.8", + "darling", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] @@ -2910,7 +2809,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "itoa", "ryu", "serde", @@ -2938,6 +2837,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "slab" version = "0.4.9" @@ -2956,6 +2861,27 @@ dependencies = [ "maybe-uninit", ] +[[package]] +name = "snafu" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b835cb902660db3415a672d862905e791e54d306c6e8189168c7f3d9ae1c79d" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d1e02fca405f6280643174a50c942219f0bbf4dbf7d480f1dd864d6f211ae5" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "socket2" version = "0.4.10" @@ -2968,9 +2894,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2990,15 +2916,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strsim" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -3024,9 +2944,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -3041,9 +2961,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.55" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -3070,9 +2990,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.30.7" +version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c385888ef380a852a16209afc8cfad22795dd8873d69c9a14d2e2088f118d18" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" dependencies = [ "cfg-if", "core-foundation-sys", @@ -3106,41 +3026,42 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.0.2", - "rustix 0.38.32", - "windows-sys 0.52.0", + "fastrand 2.1.1", + "once_cell", + "rustix 0.38.35", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -3159,9 +3080,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -3169,9 +3090,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -3184,30 +3105,29 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", ] [[package]] @@ -3226,7 +3146,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] @@ -3243,9 +3163,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -3253,7 +3173,6 @@ dependencies = [ "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -3280,7 +3199,7 @@ checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "async-compression", "base64 0.21.7", - "bitflags 2.5.0", + "bitflags 2.6.0", "bytes", "futures-core", "futures-util", @@ -3297,15 +3216,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3371,15 +3290,15 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unsafe-libyaml" @@ -3401,9 +3320,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -3424,9 +3343,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vcpkg" @@ -3436,15 +3355,15 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "waker-fn" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" @@ -3473,34 +3392,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3510,9 +3430,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3520,28 +3440,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.55", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3571,11 +3491,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -3591,7 +3511,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -3600,7 +3520,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", ] [[package]] @@ -3618,7 +3538,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3638,17 +3567,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3659,9 +3589,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3671,9 +3601,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3683,9 +3613,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3695,9 +3631,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3707,9 +3643,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3719,9 +3655,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3731,9 +3667,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -3772,8 +3708,29 @@ dependencies = [ "time", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.77", +] + [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 7aace48a45..bcfe8b5170 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -15,7 +15,7 @@ debug = 1 [dependencies] arbitrary = { version = "1", features = ["derive"] } -bitcoin = { version = "0.30.0", features = ["rand"] } +bitcoin = { version = "0.30.1", features = ["rand"] } libfuzzer-sys = "0.4" ord = { path = ".." } ordinals = { path = "../crates/ordinals" } diff --git a/fuzz/fuzz_targets/transaction_builder.rs b/fuzz/fuzz_targets/transaction_builder.rs index ecdccb0cac..7124754c45 100644 --- a/fuzz/fuzz_targets/transaction_builder.rs +++ b/fuzz/fuzz_targets/transaction_builder.rs @@ -4,7 +4,7 @@ use { arbitrary::Arbitrary, bitcoin::{ address::{Address, NetworkUnchecked}, - Amount, OutPoint, TxOut, + Amount, Network, OutPoint, TxOut, }, libfuzzer_sys::fuzz_target, ord::{FeeRate, InscriptionId, Target, TransactionBuilder}, @@ -75,10 +75,11 @@ fuzz_target!(|input: Input| { amounts, BTreeSet::new(), BTreeSet::new(), - recipient, + recipient.script_pubkey(), change, fee_rate, Target::Value(Amount::from_sat(output_value)), + Network::Bitcoin, ) .build_transaction(); } @@ -89,10 +90,11 @@ fuzz_target!(|input: Input| { amounts, BTreeSet::new(), BTreeSet::new(), - recipient, + recipient.script_pubkey(), change, fee_rate, Target::Postage, + Network::Bitcoin, ) .build_transaction(); } diff --git a/justfile b/justfile index 75b690224b..2023b0e5d7 100644 --- a/justfile +++ b/justfile @@ -46,9 +46,6 @@ deploy-mainnet-bravo branch='master' remote='ordinals/ord': \ deploy-mainnet-charlie branch='master' remote='ordinals/ord': \ (deploy branch remote 'main' 'charlie.ordinals.net') -deploy-regtest branch='master' remote='ordinals/ord': \ - (deploy branch remote 'regtest' 'regtest.ordinals.net') - deploy-signet branch='master' remote='ordinals/ord': \ (deploy branch remote 'signet' 'signet.ordinals.net') @@ -56,7 +53,6 @@ deploy-testnet branch='master' remote='ordinals/ord': \ (deploy branch remote 'test' 'testnet.ordinals.net') deploy-all: \ - deploy-regtest \ deploy-testnet \ deploy-signet \ deploy-mainnet-alpha \ @@ -64,14 +60,13 @@ deploy-all: \ deploy-mainnet-charlie delete-indices: \ - (delete-index "regtest.ordinals.net") \ (delete-index "signet.ordinals.net") \ (delete-index "testnet.ordinals.net") delete-index domain: ssh root@{{domain}} 'systemctl stop ord && rm -f /var/lib/ord/*/index.redb' -servers := 'alpha bravo charlie regtest signet testnet' +servers := 'alpha bravo charlie signet testnet' initialize-server-keys: #!/usr/bin/env bash diff --git a/src/index.rs b/src/index.rs index 6aa85fd194..05c352f0b7 100644 --- a/src/index.rs +++ b/src/index.rs @@ -169,6 +169,15 @@ impl BitcoinCoreRpcResultExt for Result { Err(bitcoincore_rpc::Error::JsonRpc(bitcoincore_rpc::jsonrpc::error::Error::Rpc( bitcoincore_rpc::jsonrpc::error::RpcError { code: -8, .. }, ))) => Ok(None), + Err(bitcoincore_rpc::Error::JsonRpc(bitcoincore_rpc::jsonrpc::error::Error::Rpc( + bitcoincore_rpc::jsonrpc::error::RpcError { + code: -5, message, .. + }, + ))) + if message.starts_with("No such mempool or blockchain transaction") => + { + Ok(None) + } Err(bitcoincore_rpc::Error::JsonRpc(bitcoincore_rpc::jsonrpc::error::Error::Rpc( bitcoincore_rpc::jsonrpc::error::RpcError { message, .. }, ))) diff --git a/src/index/updater.rs b/src/index/updater.rs index fc14bcfcc7..e93641d9ae 100644 --- a/src/index/updater.rs +++ b/src/index/updater.rs @@ -519,13 +519,14 @@ impl<'index> Updater<'index> { unbound_inscriptions, }; - let mut coinbase_inputs = VecDeque::new(); + let mut coinbase_inputs = Vec::new(); + let mut lost_sat_ranges = Vec::new(); if self.index.index_sats { let h = Height(self.height); if h.subsidy() > 0 { let start = h.starting_sat(); - coinbase_inputs.push_front((start.n(), (start + h.subsidy()).n())); + coinbase_inputs.extend(SatRange::store((start.n(), (start + h.subsidy()).n()))); self.sat_ranges_since_flush += 1; } } @@ -593,74 +594,36 @@ impl<'index> Updater<'index> { .map(|_| UtxoEntryBuf::new()) .collect::>(); - let mut orig_input_sat_ranges = None; + let input_sat_ranges; if self.index.index_sats { - let mut input_sat_ranges; + let leftover_sat_ranges; if tx_offset == 0 { - // We use mem::take() because the borrow checker isn't smart enough - // to realize that coinbase_inputs won't be used again. - input_sat_ranges = mem::take(&mut coinbase_inputs); + input_sat_ranges = Some(vec![coinbase_inputs.as_slice()]); + leftover_sat_ranges = &mut lost_sat_ranges; } else { - input_sat_ranges = VecDeque::new(); - - for input_utxo_entry in &input_utxo_entries { - for chunk in input_utxo_entry.sat_ranges().chunks_exact(11) { - input_sat_ranges.push_back(SatRange::load(chunk.try_into().unwrap())); - } - } + input_sat_ranges = Some( + input_utxo_entries + .iter() + .map(|entry| entry.sat_ranges()) + .collect(), + ); + leftover_sat_ranges = &mut coinbase_inputs; } - orig_input_sat_ranges = Some(input_sat_ranges.clone()); - self.index_transaction_sats( tx, *txid, &mut sat_to_satpoint, &mut output_utxo_entries, - &mut input_sat_ranges, + input_sat_ranges.as_ref().unwrap(), + leftover_sat_ranges, sat_ranges_written, outputs_in_block, )?; - - if tx_offset == 0 { - if !input_sat_ranges.is_empty() { - // Note that the lost-sats outpoint is special, because (unlike real - // outputs) it gets written to more than once. commit() will merge - // our new entry with any existing one. - let utxo_entry = utxo_cache - .entry(OutPoint::null()) - .or_insert(UtxoEntryBuf::empty(self.index)); - - let mut lost_sat_ranges = Vec::new(); - for (start, end) in input_sat_ranges { - if !Sat(start).common() { - sat_to_satpoint.insert( - &start, - &SatPoint { - outpoint: OutPoint::null(), - offset: lost_sats, - } - .store(), - )?; - } - - lost_sat_ranges.extend_from_slice(&(start, end).store()); - lost_sats += end - start; - } - - let mut new_utxo_entry = UtxoEntryBuf::new(); - new_utxo_entry.push_sat_ranges(&lost_sat_ranges, self.index); - if self.index.index_addresses { - new_utxo_entry.push_script_pubkey(&[], self.index); - } - - *utxo_entry = UtxoEntryBuf::merged(utxo_entry, &new_utxo_entry, self.index); - } - } else { - coinbase_inputs.extend(input_sat_ranges); - } } else { + input_sat_ranges = None; + for (vout, txout) in tx.output.iter().enumerate() { output_utxo_entries[vout].push_value(txout.value.to_sat(), self.index); } @@ -678,7 +641,7 @@ impl<'index> Updater<'index> { &mut output_utxo_entries, utxo_cache, self.index, - orig_input_sat_ranges.as_ref(), + input_sat_ranges.as_ref(), )?; } @@ -693,6 +656,39 @@ impl<'index> Updater<'index> { .insert(&self.height, inscription_updater.next_sequence_number)?; } + if !lost_sat_ranges.is_empty() { + // Note that the lost-sats outpoint is special, because (unlike real + // outputs) it gets written to more than once. commit() will merge + // our new entry with any existing one. + let utxo_entry = utxo_cache + .entry(OutPoint::null()) + .or_insert(UtxoEntryBuf::empty(self.index)); + + for chunk in lost_sat_ranges.chunks_exact(11) { + let (start, end) = SatRange::load(chunk.try_into().unwrap()); + if !Sat(start).common() { + sat_to_satpoint.insert( + &start, + &SatPoint { + outpoint: OutPoint::null(), + offset: lost_sats, + } + .store(), + )?; + } + + lost_sats += end - start; + } + + let mut new_utxo_entry = UtxoEntryBuf::new(); + new_utxo_entry.push_sat_ranges(&lost_sat_ranges, self.index); + if self.index.index_addresses { + new_utxo_entry.push_script_pubkey(&[], self.index); + } + + *utxo_entry = UtxoEntryBuf::merged(utxo_entry, &new_utxo_entry, self.index); + } + statistic_to_count.insert( &Statistic::LostSats.key(), &if self.index.index_sats { @@ -736,22 +732,43 @@ impl<'index> Updater<'index> { txid: Txid, sat_to_satpoint: &mut Table, output_utxo_entries: &mut [UtxoEntryBuf], - input_sat_ranges: &mut VecDeque<(u64, u64)>, + input_sat_ranges: &[&[u8]], + leftover_sat_ranges: &mut Vec, sat_ranges_written: &mut u64, outputs_traversed: &mut u64, ) -> Result { + let mut pending_input_sat_range = None; + let mut input_sat_ranges_iter = input_sat_ranges + .iter() + .flat_map(|slice| slice.chunks_exact(11)); + + // Preallocate our temporary array, sized to hold the combined + // sat ranges from our inputs. We'll never need more than that + // for a single output, even if we end up splitting some ranges. + let mut sats = Vec::with_capacity( + input_sat_ranges + .iter() + .map(|slice| slice.len()) + .sum::(), + ); + for (vout, output) in tx.output.iter().enumerate() { let outpoint = OutPoint { vout: vout.try_into().unwrap(), txid, }; - let mut sats = Vec::new(); let mut remaining = output.value.to_sat(); while remaining > 0 { - let range = input_sat_ranges - .pop_front() - .ok_or_else(|| anyhow!("insufficient inputs for transaction outputs"))?; + let range = pending_input_sat_range.take().unwrap_or_else(|| { + SatRange::load( + input_sat_ranges_iter + .next() + .expect("insufficient inputs for transaction outputs") + .try_into() + .unwrap(), + ) + }); if !Sat(range.0).common() { sat_to_satpoint.insert( @@ -769,7 +786,7 @@ impl<'index> Updater<'index> { let assigned = if count > remaining { self.sat_ranges_since_flush += 1; let middle = range.0 + remaining; - input_sat_ranges.push_front((middle, range.1)); + pending_input_sat_range = Some((middle, range.1)); (range.0, middle) } else { range @@ -785,7 +802,13 @@ impl<'index> Updater<'index> { *outputs_traversed += 1; output_utxo_entries[vout].push_sat_ranges(&sats, self.index); + sats.clear(); + } + + if let Some(range) = pending_input_sat_range { + leftover_sat_ranges.extend(&range.store()); } + leftover_sat_ranges.extend(input_sat_ranges_iter.flatten()); Ok(()) } diff --git a/src/index/updater/inscription_updater.rs b/src/index/updater/inscription_updater.rs index 14c5ee51c8..0d808c226c 100644 --- a/src/index/updater/inscription_updater.rs +++ b/src/index/updater/inscription_updater.rs @@ -67,7 +67,7 @@ impl<'a, 'tx> InscriptionUpdater<'a, 'tx> { output_utxo_entries: &mut [UtxoEntryBuf], utxo_cache: &mut HashMap, index: &Index, - input_sat_ranges: Option<&VecDeque<(u64, u64)>>, + input_sat_ranges: Option<&Vec<&[u8]>>, ) -> Result { let mut floating_inscriptions = Vec::new(); let mut id_counter = 0; @@ -344,14 +344,15 @@ impl<'a, 'tx> InscriptionUpdater<'a, 'tx> { } } - fn calculate_sat( - input_sat_ranges: Option<&VecDeque<(u64, u64)>>, - input_offset: u64, - ) -> Option { + fn calculate_sat(input_sat_ranges: Option<&Vec<&[u8]>>, input_offset: u64) -> Option { let input_sat_ranges = input_sat_ranges?; let mut offset = 0; - for (start, end) in input_sat_ranges { + for chunk in input_sat_ranges + .iter() + .flat_map(|slice| slice.chunks_exact(11)) + { + let (start, end) = SatRange::load(chunk.try_into().unwrap()); let size = end - start; if offset + size > input_offset { let n = start + input_offset - offset; @@ -365,7 +366,7 @@ impl<'a, 'tx> InscriptionUpdater<'a, 'tx> { fn update_inscription_location( &mut self, - input_sat_ranges: Option<&VecDeque<(u64, u64)>>, + input_sat_ranges: Option<&Vec<&[u8]>>, flotsam: Flotsam, new_satpoint: SatPoint, op_return: bool, diff --git a/src/lib.rs b/src/lib.rs index c8944e60a6..55f028423e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,6 +24,7 @@ use { teleburn, ParsedEnvelope, }, into_usize::IntoUsize, + outgoing::Outgoing, representation::Representation, settings::Settings, subcommand::{OutputFormat, Subcommand, SubcommandResult}, @@ -65,7 +66,7 @@ use { std::{ backtrace::BacktraceStatus, cmp, - collections::{BTreeMap, BTreeSet, HashMap, HashSet, VecDeque}, + collections::{BTreeMap, BTreeSet, HashMap, HashSet}, env, ffi::OsString, fmt::{self, Display, Formatter}, diff --git a/src/subcommand.rs b/src/subcommand.rs index 3b4a9b1a31..3b607ceee3 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -15,6 +15,7 @@ pub mod subsidy; pub mod supply; pub mod teleburn; pub mod traits; +pub mod verify; pub mod wallet; pub mod wallets; @@ -50,6 +51,8 @@ pub(crate) enum Subcommand { Teleburn(teleburn::Teleburn), #[command(about = "Display satoshi traits")] Traits(traits::Traits), + #[command(about = "Verify BIP322 signature")] + Verify(verify::Verify), #[command(about = "Wallet commands")] Wallet(wallet::WalletCommand), #[command(about = "List all Bitcoin Core wallets")] @@ -79,6 +82,7 @@ impl Subcommand { Self::Supply => supply::run(), Self::Teleburn(teleburn) => teleburn.run(), Self::Traits(traits) => traits.run(), + Self::Verify(verify) => verify.run(), Self::Wallet(wallet) => wallet.run(settings), Self::Wallets => wallets::run(settings), } diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index 95b459dcd8..95318363aa 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -7152,4 +7152,14 @@ next } ); } + + #[test] + fn unknown_output_returns_404() { + let server = TestServer::builder().chain(Chain::Regtest).build(); + server.assert_response( + "/output/0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef:123", + StatusCode::NOT_FOUND, + "output 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef:123 not found", + ); + } } diff --git a/src/subcommand/verify.rs b/src/subcommand/verify.rs new file mode 100644 index 0000000000..1c2dd71a42 --- /dev/null +++ b/src/subcommand/verify.rs @@ -0,0 +1,40 @@ +use super::*; + +#[derive(Debug, Parser)] +#[clap(group( + ArgGroup::new("signature") + .required(true) + .args(&["transaction", "witness"])) +)] +pub(crate) struct Verify { + #[arg(long, help = "Verify signature made by
.")] + address: Address, + #[arg(long, help = "Verify signature over .")] + message: String, + #[arg(long, help = "Verify base64-encoded .")] + witness: Option, + #[arg(long, help = "Verify base64-encoded .")] + transaction: Option, +} + +impl Verify { + pub(crate) fn run(self) -> SubcommandResult { + if let Some(witness) = self.witness { + bip322::verify_simple_encoded( + &self.address.assume_checked().to_string(), + &self.message, + &witness, + )?; + } else if let Some(transaction) = self.transaction { + bip322::verify_full_encoded( + &self.address.assume_checked().to_string(), + &self.message, + &transaction, + )?; + } else { + unreachable!(); + } + + Ok(None) + } +} diff --git a/src/subcommand/wallet.rs b/src/subcommand/wallet.rs index 6ccdee909e..e1d7343f07 100644 --- a/src/subcommand/wallet.rs +++ b/src/subcommand/wallet.rs @@ -6,6 +6,7 @@ use { pub mod balance; mod batch_command; +pub mod burn; pub mod cardinals; pub mod create; pub mod dump; @@ -46,6 +47,8 @@ pub(crate) enum Subcommand { Balance, #[command(about = "Create inscriptions and runes")] Batch(batch_command::Batch), + #[command(about = "Burn an inscription")] + Burn(burn::Burn), #[command(about = "List unspent cardinal outputs in wallet")] Cardinals, #[command(about = "Create new wallet")] @@ -105,6 +108,7 @@ impl WalletCommand { match self.subcommand { Subcommand::Balance => balance::run(wallet), Subcommand::Batch(batch) => batch.run(wallet), + Subcommand::Burn(burn) => burn.run(wallet), Subcommand::Cardinals => cardinals::run(wallet), Subcommand::Create(_) | Subcommand::Restore(_) => unreachable!(), Subcommand::Dump => dump::run(wallet), diff --git a/src/subcommand/wallet/batch_command.rs b/src/subcommand/wallet/batch_command.rs index fdd719dfd1..16480d6a90 100644 --- a/src/subcommand/wallet/batch_command.rs +++ b/src/subcommand/wallet/batch_command.rs @@ -17,7 +17,7 @@ impl Batch { let batchfile = batch::File::load(&self.batch)?; - let parent_info = wallet.get_parent_info(batchfile.parent)?; + let parent_info = wallet.get_parent_info(&batchfile.parents)?; let (inscriptions, reveal_satpoints, postages, destinations) = batchfile.inscriptions( &wallet, @@ -204,7 +204,8 @@ mod tests { &batch_path, format!( "mode: separate-outputs -parent: {parent} +parents: +- {parent} inscriptions: - file: {} metadata: @@ -241,7 +242,7 @@ inscriptions: ..default() } ], - parent: Some(parent), + parents: vec![parent], ..default() } ); diff --git a/src/subcommand/wallet/burn.rs b/src/subcommand/wallet/burn.rs new file mode 100644 index 0000000000..2268784652 --- /dev/null +++ b/src/subcommand/wallet/burn.rs @@ -0,0 +1,94 @@ +use {super::*, bitcoin::opcodes}; + +#[derive(Debug, Parser)] +pub struct Burn { + #[arg(long, help = "Don't sign or broadcast transaction.")] + dry_run: bool, + #[arg(long, help = "Use fee rate of sats/vB.")] + fee_rate: FeeRate, + #[arg( + long, + help = "Target postage with sent inscriptions. [default: 10000 sat]", + value_name = "AMOUNT" + )] + postage: Option, + inscription: InscriptionId, +} + +impl Burn { + pub(crate) fn run(self, wallet: Wallet) -> SubcommandResult { + let inscription_info = wallet + .inscription_info() + .get(&self.inscription) + .ok_or_else(|| anyhow!("inscription {} not found", self.inscription))? + .clone(); + + let Some(value) = inscription_info.value else { + bail!("Cannot burn unbound inscription"); + }; + + ensure! { + value <= TARGET_POSTAGE.to_sat(), + "Cannot burn inscription contained in UTXO exceeding {TARGET_POSTAGE}", + } + + ensure! { + self.postage.unwrap_or_default() <= TARGET_POSTAGE, + "Postage may not exceed {TARGET_POSTAGE}", + } + + let unsigned_transaction = Self::create_unsigned_burn_transaction( + &wallet, + inscription_info.satpoint, + self.postage, + self.fee_rate, + )?; + + let (txid, psbt, fee) = wallet.sign_transaction(unsigned_transaction, self.dry_run)?; + + Ok(Some(Box::new(send::Output { + txid, + psbt, + outgoing: Outgoing::InscriptionId(self.inscription), + fee, + }))) + } + + fn create_unsigned_burn_transaction( + wallet: &Wallet, + satpoint: SatPoint, + postage: Option, + fee_rate: FeeRate, + ) -> Result { + let runic_outputs = wallet.get_runic_outputs()?; + + ensure!( + !runic_outputs.contains(&satpoint.outpoint), + "runic outpoints may not be burned" + ); + + let change = [wallet.get_change_address()?, wallet.get_change_address()?]; + + let postage = postage.map(Target::ExactPostage).unwrap_or(Target::Postage); + + let script_pubkey = script::Builder::new() + .push_opcode(opcodes::all::OP_RETURN) + .into_script(); + + Ok( + TransactionBuilder::new( + satpoint, + wallet.inscriptions().clone(), + wallet.utxos().clone(), + wallet.locked_utxos().clone().into_keys().collect(), + runic_outputs, + script_pubkey, + change, + fee_rate, + postage, + wallet.chain().network(), + ) + .build_transaction()?, + ) + } +} diff --git a/src/subcommand/wallet/inscribe.rs b/src/subcommand/wallet/inscribe.rs index 24cf80a7de..6a69a71935 100644 --- a/src/subcommand/wallet/inscribe.rs +++ b/src/subcommand/wallet/inscribe.rs @@ -37,7 +37,8 @@ pub(crate) struct Inscribe { pub(crate) parent: Option, #[arg( long, - help = "Include postage with inscription. [default: 10000sat]" + help = "Include postage with inscription. [default: 10000sat]", + value_name = "AMOUNT" )] pub(crate) postage: Option, #[clap(long, help = "Allow reinscription.")] @@ -81,7 +82,7 @@ impl Inscribe { mode: batch::Mode::SeparateOutputs, no_backup: self.shared.no_backup, no_limit: self.shared.no_limit, - parent_info: wallet.get_parent_info(self.parent)?, + parent_info: wallet.get_parent_info(self.parent.as_slice())?, postages: vec![self.postage.unwrap_or(TARGET_POSTAGE)], reinscribe: self.reinscribe, reveal_fee_rate: self.shared.fee_rate, diff --git a/src/subcommand/wallet/send.rs b/src/subcommand/wallet/send.rs index 10225e3a3d..b3557f245f 100644 --- a/src/subcommand/wallet/send.rs +++ b/src/subcommand/wallet/send.rs @@ -1,4 +1,4 @@ -use {super::*, crate::outgoing::Outgoing, base64::Engine, bitcoin::psbt::Psbt}; +use super::*; #[derive(Debug, Parser)] pub(crate) struct Send { @@ -8,7 +8,8 @@ pub(crate) struct Send { fee_rate: FeeRate, #[arg( long, - help = "Target postage with sent inscriptions. [default: 10000 sat]" + help = "Target postage with sent inscriptions. [default: 10000 sat]", + value_name = "AMOUNT" )] pub(crate) postage: Option, address: Address, @@ -72,56 +73,7 @@ impl Send { )?, }; - let unspent_outputs = wallet.utxos(); - - let (txid, psbt) = if self.dry_run { - let psbt = wallet - .bitcoin_client() - .wallet_process_psbt( - &base64::engine::general_purpose::STANDARD - .encode(Psbt::from_unsigned_tx(unsigned_transaction.clone())?.serialize()), - Some(false), - None, - None, - )? - .psbt; - - (unsigned_transaction.txid(), psbt) - } else { - let psbt = wallet - .bitcoin_client() - .wallet_process_psbt( - &base64::engine::general_purpose::STANDARD - .encode(Psbt::from_unsigned_tx(unsigned_transaction.clone())?.serialize()), - Some(true), - None, - None, - )? - .psbt; - - let signed_tx = wallet - .bitcoin_client() - .finalize_psbt(&psbt, None)? - .hex - .ok_or_else(|| anyhow!("unable to sign transaction"))?; - - ( - wallet.bitcoin_client().send_raw_transaction(&signed_tx)?, - psbt, - ) - }; - - let mut fee = 0; - for txin in unsigned_transaction.input.iter() { - let Some(txout) = unspent_outputs.get(&txin.previous_output) else { - panic!("input {} not found in utxos", txin.previous_output); - }; - fee += txout.value.to_sat(); - } - - for txout in unsigned_transaction.output.iter() { - fee = fee.checked_sub(txout.value.to_sat()).unwrap(); - } + let (txid, psbt, fee) = wallet.sign_transaction(unsigned_transaction, self.dry_run)?; Ok(Some(Box::new(Output { txid, @@ -196,10 +148,11 @@ impl Send { wallet.utxos().clone(), wallet.locked_utxos().clone().into_keys().collect(), runic_outputs, - destination.clone(), + destination.script_pubkey(), change, fee_rate, postage, + wallet.chain().network(), ) .build_transaction()?, ) diff --git a/src/test.rs b/src/test.rs index c8164638cb..5614c23e2f 100644 --- a/src/test.rs +++ b/src/test.rs @@ -39,7 +39,11 @@ pub(crate) fn address() -> Address { .assume_checked() } -pub(crate) fn recipient() -> Address { +pub(crate) fn recipient() -> ScriptBuf { + recipient_address().script_pubkey() +} + +pub(crate) fn recipient_address() -> Address { "tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz" .parse::>() .unwrap() diff --git a/src/wallet.rs b/src/wallet.rs index 509291f5b6..645bdd3b87 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -216,18 +216,16 @@ impl Wallet { ) } - pub(crate) fn get_parent_info( - &self, - parent: Option, - ) -> Result> { - if let Some(parent_id) = parent { - if !self.inscription_exists(parent_id)? { + pub(crate) fn get_parent_info(&self, parents: &[InscriptionId]) -> Result> { + let mut parent_info = Vec::new(); + for parent_id in parents { + if !self.inscription_exists(*parent_id)? { return Err(anyhow!("parent {parent_id} does not exist")); } let satpoint = self .inscription_info - .get(&parent_id) + .get(parent_id) .ok_or_else(|| anyhow!("parent {parent_id} not in wallet"))? .satpoint; @@ -237,15 +235,15 @@ impl Wallet { .ok_or_else(|| anyhow!("parent {parent_id} not in wallet"))? .clone(); - Ok(Some(ParentInfo { + parent_info.push(ParentInfo { destination: self.get_change_address()?, - id: parent_id, + id: *parent_id, location: satpoint, tx_out, - })) - } else { - Ok(None) + }); } + + Ok(parent_info) } pub(crate) fn get_runic_outputs(&self) -> Result> { @@ -741,4 +739,63 @@ impl Wallet { .collect::, StorageError>>()?, ) } + + pub(super) fn sign_transaction( + &self, + unsigned_transaction: Transaction, + dry_run: bool, + ) -> Result<(Txid, String, u64)> { + let unspent_outputs = self.utxos(); + + let (txid, psbt) = if dry_run { + let psbt = self + .bitcoin_client() + .wallet_process_psbt( + &base64::engine::general_purpose::STANDARD + .encode(Psbt::from_unsigned_tx(unsigned_transaction.clone())?.serialize()), + Some(false), + None, + None, + )? + .psbt; + + (unsigned_transaction.txid(), psbt) + } else { + let psbt = self + .bitcoin_client() + .wallet_process_psbt( + &base64::engine::general_purpose::STANDARD + .encode(Psbt::from_unsigned_tx(unsigned_transaction.clone())?.serialize()), + Some(true), + None, + None, + )? + .psbt; + + let signed_tx = self + .bitcoin_client() + .finalize_psbt(&psbt, None)? + .hex + .ok_or_else(|| anyhow!("unable to sign transaction"))?; + + ( + self.bitcoin_client().send_raw_transaction(&signed_tx)?, + psbt, + ) + }; + + let mut fee = 0; + for txin in unsigned_transaction.input.iter() { + let Some(txout) = unspent_outputs.get(&txin.previous_output) else { + panic!("input {} not found in utxos", txin.previous_output); + }; + fee += txout.value; + } + + for txout in unsigned_transaction.output.iter() { + fee = fee.checked_sub(txout.value).unwrap(); + } + + Ok((txid, psbt, fee)) + } } diff --git a/src/wallet/batch.rs b/src/wallet/batch.rs index 9e8e71dc9a..aa82d70f78 100644 --- a/src/wallet/batch.rs +++ b/src/wallet/batch.rs @@ -34,7 +34,7 @@ pub struct Output { pub commit: Txid, pub commit_psbt: Option, pub inscriptions: Vec, - pub parent: Option, + pub parents: Vec, pub reveal: Txid, pub reveal_broadcast: bool, pub reveal_psbt: Option, @@ -77,7 +77,7 @@ mod tests { let utxos = vec![(outpoint(1), tx_out(20000, address()))]; let inscription = inscription("text/plain", "ord"); let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let reveal_change = [commit_address, change(1)]; let batch::Transactions { @@ -86,7 +86,7 @@ mod tests { .. } = batch::Plan { satpoint: Some(satpoint(1, 0)), - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(1.0).unwrap(), @@ -123,7 +123,7 @@ mod tests { let utxos = vec![(outpoint(1), tx_out(20000, address()))]; let inscription = inscription("text/plain", "ord"); let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let reveal_change = [commit_address, change(1)]; let batch::Transactions { @@ -132,7 +132,7 @@ mod tests { .. } = batch::Plan { satpoint: Some(satpoint(1, 0)), - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(1.0).unwrap(), @@ -173,11 +173,11 @@ mod tests { let inscription = inscription("text/plain", "ord"); let satpoint = None; let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let error = batch::Plan { satpoint, - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(1.0).unwrap(), @@ -225,11 +225,11 @@ mod tests { let inscription = inscription("text/plain", "ord"); let satpoint = None; let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); assert!(batch::Plan { satpoint, - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(1.0).unwrap(), @@ -270,7 +270,7 @@ mod tests { let inscription = inscription("text/plain", "ord"); let satpoint = None; let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let fee_rate = 3.3; let batch::Transactions { @@ -279,7 +279,7 @@ mod tests { .. } = batch::Plan { satpoint, - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(fee_rate).unwrap(), @@ -358,7 +358,7 @@ mod tests { .into(); let commit_address = change(1); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let fee_rate = 4.0; let batch::Transactions { @@ -367,7 +367,7 @@ mod tests { .. } = batch::Plan { satpoint: None, - parent_info: Some(parent_info.clone()), + parent_info: vec![parent_info.clone()], inscriptions: vec![child_inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(fee_rate).unwrap(), @@ -444,7 +444,7 @@ mod tests { let inscription = inscription("text/plain", "ord"); let satpoint = None; let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let commit_fee_rate = 3.3; let fee_rate = 1.0; @@ -454,7 +454,7 @@ mod tests { .. } = batch::Plan { satpoint, - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(commit_fee_rate).unwrap(), @@ -509,11 +509,11 @@ mod tests { let inscription = inscription("text/plain", [0; MAX_STANDARD_TX_WEIGHT as usize]); let satpoint = None; let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let error = batch::Plan { satpoint, - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(1.0).unwrap(), @@ -550,11 +550,11 @@ mod tests { let inscription = inscription("text/plain", [0; MAX_STANDARD_TX_WEIGHT as usize]); let satpoint = None; let commit_address = change(0); - let reveal_address = recipient(); + let reveal_address = recipient_address(); let batch::Transactions { reveal_tx, .. } = batch::Plan { satpoint, - parent_info: None, + parent_info: Vec::new(), inscriptions: vec![inscription], destinations: vec![reveal_address], commit_fee_rate: FeeRate::try_from(1.0).unwrap(), @@ -605,7 +605,7 @@ mod tests { wallet_inscriptions.insert(parent_info.location, vec![parent]); let commit_address = change(1); - let reveal_addresses = vec![recipient()]; + let reveal_addresses = vec![recipient_address()]; let inscriptions = vec![ InscriptionTemplate { @@ -635,7 +635,7 @@ mod tests { .. } = batch::Plan { satpoint: None, - parent_info: Some(parent_info.clone()), + parent_info: vec![parent_info.clone()], inscriptions, destinations: reveal_addresses, commit_fee_rate: fee_rate, @@ -718,7 +718,11 @@ mod tests { wallet_inscriptions.insert(parent_info.location, vec![parent]); let commit_address = change(1); - let reveal_addresses = vec![recipient(), recipient(), recipient()]; + let reveal_addresses = vec![ + recipient_address(), + recipient_address(), + recipient_address(), + ]; let inscriptions = vec![ InscriptionTemplate { @@ -762,7 +766,7 @@ mod tests { .. } = batch::Plan { reveal_satpoints: reveal_satpoints.clone(), - parent_info: Some(parent_info.clone()), + parent_info: vec![parent_info.clone()], inscriptions, destinations: reveal_addresses, commit_fee_rate: fee_rate, @@ -860,11 +864,11 @@ mod tests { ]; let commit_address = change(1); - let reveal_addresses = vec![recipient()]; + let reveal_addresses = vec![recipient_address()]; let error = batch::Plan { satpoint: None, - parent_info: Some(parent_info.clone()), + parent_info: vec![parent_info.clone()], inscriptions, destinations: reveal_addresses, commit_fee_rate: 4.0.try_into().unwrap(), @@ -937,11 +941,11 @@ mod tests { ]; let commit_address = change(1); - let reveal_addresses = vec![recipient(), recipient()]; + let reveal_addresses = vec![recipient_address(), recipient_address()]; let _ = batch::Plan { satpoint: None, - parent_info: Some(parent_info.clone()), + parent_info: vec![parent_info.clone()], inscriptions, destinations: reveal_addresses, commit_fee_rate: 4.0.try_into().unwrap(), @@ -976,11 +980,11 @@ mod tests { ]; let commit_address = change(1); - let reveal_addresses = vec![recipient()]; + let reveal_addresses = vec![recipient_address()]; let error = batch::Plan { satpoint: None, - parent_info: None, + parent_info: Vec::new(), inscriptions, destinations: reveal_addresses, commit_fee_rate: 1.0.try_into().unwrap(), @@ -1020,7 +1024,11 @@ mod tests { let wallet_inscriptions = BTreeMap::new(); let commit_address = change(1); - let reveal_addresses = vec![recipient(), recipient(), recipient()]; + let reveal_addresses = vec![ + recipient_address(), + recipient_address(), + recipient_address(), + ]; let inscriptions = vec![ inscription("text/plain", [b'O'; 100]), @@ -1034,7 +1042,7 @@ mod tests { let batch::Transactions { reveal_tx, .. } = batch::Plan { satpoint: None, - parent_info: None, + parent_info: Vec::new(), inscriptions, destinations: reveal_addresses, commit_fee_rate: fee_rate, @@ -1089,7 +1097,11 @@ mod tests { wallet_inscriptions.insert(parent_info.location, vec![parent]); let commit_address = change(1); - let reveal_addresses = vec![recipient(), recipient(), recipient()]; + let reveal_addresses = vec![ + recipient_address(), + recipient_address(), + recipient_address(), + ]; let inscriptions = vec![ InscriptionTemplate { @@ -1119,7 +1131,7 @@ mod tests { .. } = batch::Plan { satpoint: None, - parent_info: Some(parent_info.clone()), + parent_info: vec![parent_info.clone()], inscriptions, destinations: reveal_addresses, commit_fee_rate: fee_rate, diff --git a/src/wallet/batch/file.rs b/src/wallet/batch/file.rs index 8bead5ff0d..1bbfda4e52 100644 --- a/src/wallet/batch/file.rs +++ b/src/wallet/batch/file.rs @@ -5,7 +5,8 @@ use super::*; #[serde(deny_unknown_fields)] pub struct File { pub mode: Mode, - pub parent: Option, + #[serde(default)] + pub parents: Vec, pub postage: Option, #[serde(default)] pub reinscribe: bool, @@ -108,7 +109,7 @@ impl File { &self, wallet: &Wallet, utxos: &BTreeMap, - parent_value: Option, + parent_values: Vec, compress: bool, ) -> Result<( Vec, @@ -120,7 +121,7 @@ impl File { let mut reveal_satpoints = Vec::new(); let mut postages = Vec::new(); - let mut pointer = parent_value.unwrap_or_default(); + let mut pointer = parent_values.iter().sum(); for (i, entry) in self.inscriptions.iter().enumerate() { if let Some(delegate) = entry.delegate { @@ -136,7 +137,7 @@ impl File { entry.delegate, entry.metadata()?, entry.metaprotocol.clone(), - self.parent.into_iter().collect(), + self.parents.clone(), entry.file.clone(), Some(pointer), self @@ -363,11 +364,11 @@ inscriptions: batch::File::load(Path::new("batch.yaml")).unwrap(), batch::File { mode: batch::Mode::SeparateOutputs, - parent: Some( + parents: vec![ "6ac5cacb768794f4fd7a78bf00f2074891fce68bd65c4ff36e77177237aacacai0" .parse() .unwrap() - ), + ], postage: Some(12345), reinscribe: true, sat: None, diff --git a/src/wallet/batch/plan.rs b/src/wallet/batch/plan.rs index d518afa846..1354e94220 100644 --- a/src/wallet/batch/plan.rs +++ b/src/wallet/batch/plan.rs @@ -9,7 +9,7 @@ pub struct Plan { pub(crate) mode: Mode, pub(crate) no_backup: bool, pub(crate) no_limit: bool, - pub(crate) parent_info: Option, + pub(crate) parent_info: Vec, pub(crate) postages: Vec, pub(crate) reinscribe: bool, pub(crate) reveal_fee_rate: FeeRate, @@ -28,7 +28,7 @@ impl Default for Plan { mode: Mode::SharedOutput, no_backup: false, no_limit: false, - parent_info: None, + parent_info: Vec::new(), postages: vec![Amount::from_sat(10_000)], reinscribe: false, reveal_fee_rate: 1.0.try_into().unwrap(), @@ -206,19 +206,9 @@ impl Plan { let index = u32::try_from(i).unwrap(); let vout = match self.mode { - Mode::SharedOutput | Mode::SameSat => { - if self.parent_info.is_some() { - 1 - } else { - 0 - } - } + Mode::SharedOutput | Mode::SameSat => self.parent_info.len().try_into().unwrap(), Mode::SeparateOutputs | Mode::SatPoints => { - if self.parent_info.is_some() { - index + 1 - } else { - index - } + index + u32::try_from(self.parent_info.len()).unwrap() } }; @@ -252,7 +242,7 @@ impl Plan { commit, commit_psbt, inscriptions: inscriptions_output, - parent: self.parent_info.clone().map(|info| info.id), + parents: self.parent_info.iter().map(|info| info.id).collect(), reveal, reveal_broadcast, reveal_psbt, @@ -271,10 +261,15 @@ impl Plan { commit_change: [Address; 2], reveal_change: Address, ) -> Result { - if let Some(parent_info) = &self.parent_info { - for inscription in &self.inscriptions { - assert_eq!(inscription.parents(), vec![parent_info.id]); - } + for inscription in &self.inscriptions { + assert_eq!( + inscription.parents(), + self + .parent_info + .iter() + .map(|info| info.id) + .collect::>() + ); } match self.mode { @@ -396,12 +391,12 @@ impl Plan { let mut reveal_inputs = Vec::new(); let mut reveal_outputs = Vec::new(); - if let Some(ParentInfo { + for ParentInfo { location, id: _, destination, tx_out, - }) = self.parent_info.clone() + } in &self.parent_info { reveal_inputs.push(location.outpoint); reveal_outputs.push(TxOut { @@ -505,7 +500,7 @@ impl Plan { runestone = None; } - let commit_input = usize::from(self.parent_info.is_some()) + self.reveal_satpoints.len(); + let commit_input = self.parent_info.len() + self.reveal_satpoints.len(); let (_reveal_tx, reveal_fee) = Self::build_reveal_transaction( commit_input, @@ -533,10 +528,11 @@ impl Plan { utxos.clone(), locked_utxos.clone(), runic_utxos, - commit_tx_address.clone(), + commit_tx_address.script_pubkey(), commit_change, self.commit_fee_rate, Target::Value(target_value), + chain.network(), ) .build_transaction()?; @@ -571,8 +567,8 @@ impl Plan { let mut prevouts = Vec::new(); - if let Some(parent_info) = self.parent_info.clone() { - prevouts.push(parent_info.tx_out); + for parent_info in &self.parent_info { + prevouts.push(parent_info.tx_out.clone()); } if self.mode == Mode::SatPoints { diff --git a/src/wallet/entry.rs b/src/wallet/entry.rs index 78331754cc..223c9302df 100644 --- a/src/wallet/entry.rs +++ b/src/wallet/entry.rs @@ -76,7 +76,7 @@ mod tests { commit: txid, commit_psbt: None, inscriptions: Vec::new(), - parent: None, + parents: Vec::new(), reveal: txid, reveal_broadcast: true, reveal_psbt: None, diff --git a/src/wallet/transaction_builder.rs b/src/wallet/transaction_builder.rs index 9ed0b72449..3a0d7e436d 100644 --- a/src/wallet/transaction_builder.rs +++ b/src/wallet/transaction_builder.rs @@ -43,6 +43,7 @@ pub enum Error { output_value: Amount, dust_value: Amount, }, + InvalidAddress(bitcoin::address::Error), NotEnoughCardinalUtxos, NotInWallet(SatPoint), OutOfRange(SatPoint, u64), @@ -68,6 +69,7 @@ impl Display for Error { output_value, dust_value, } => write!(f, "output value is below dust value: {output_value} < {dust_value}"), + Error::InvalidAddress(source) => write!(f, "invalid address: {source}", ), Error::NotInWallet(outgoing_satpoint) => write!(f, "outgoing satpoint {outgoing_satpoint} not in wallet"), Error::OutOfRange(outgoing_satpoint, maximum) => write!(f, "outgoing satpoint {outgoing_satpoint} offset higher than maximum {maximum}"), Error::NotEnoughCardinalUtxos => write!( @@ -91,6 +93,12 @@ impl Display for Error { impl std::error::Error for Error {} +impl From for Error { + fn from(source: bitcoin::address::Error) -> Self { + Self::InvalidAddress(source) + } +} + #[derive(Debug, PartialEq)] pub struct TransactionBuilder { amounts: BTreeMap, @@ -99,9 +107,10 @@ pub struct TransactionBuilder { inputs: Vec, inscriptions: BTreeMap>, locked_utxos: BTreeSet, + network: Network, outgoing: SatPoint, - outputs: Vec<(Address, Amount)>, - recipient: Address, + outputs: Vec, + recipient: ScriptBuf, runic_utxos: BTreeSet, target: Target, unused_change_addresses: Vec
, @@ -122,10 +131,11 @@ impl TransactionBuilder { amounts: BTreeMap, locked_utxos: BTreeSet, runic_utxos: BTreeSet, - recipient: Address, + recipient: ScriptBuf, change: [Address; 2], fee_rate: FeeRate, target: Target, + network: Network, ) -> Self { Self { utxos: amounts.keys().cloned().collect(), @@ -141,6 +151,7 @@ impl TransactionBuilder { runic_utxos, target, unused_change_addresses: change.to_vec(), + network, } } @@ -151,13 +162,15 @@ impl TransactionBuilder { )); } - if self.change_addresses.contains(&self.recipient) { - return Err(Error::DuplicateAddress(self.recipient)); - } + if !self.recipient.is_op_return() { + let recipient_as_address = Address::from_script(self.recipient.as_script(), self.network)?; - match self.target { - Target::Value(output_value) | Target::ExactPostage(output_value) => { - let dust_value = self.recipient.script_pubkey().dust_value(); + if self.change_addresses.contains(&recipient_as_address) { + return Err(Error::DuplicateAddress(recipient_as_address)); + } + + if let Target::Value(output_value) | Target::ExactPostage(output_value) = self.target { + let dust_value = self.recipient.dust_value(); if output_value < dust_value { return Err(Error::Dust { @@ -166,7 +179,6 @@ impl TransactionBuilder { }); } } - _ => (), } self @@ -214,9 +226,10 @@ impl TransactionBuilder { self.utxos.remove(&self.outgoing.outpoint); self.inputs.push(self.outgoing.outpoint); - self - .outputs - .push((self.recipient.clone(), Amount::from_sat(amount))); + self.outputs.push(TxOut { + script_pubkey: self.recipient.clone(), + value: amount, + }); tprintln!( "selected outgoing outpoint {} with value {}", @@ -231,7 +244,7 @@ impl TransactionBuilder { assert_eq!(self.outputs.len(), 1, "invariant: only one output"); assert_eq!( - self.outputs[0].0, self.recipient, + self.outputs[0].script_pubkey, self.recipient, "invariant: first output is recipient" ); @@ -243,22 +256,23 @@ impl TransactionBuilder { tprintln!("aligned outgoing with {sat_offset} sat padding output"); self.outputs.insert( 0, - ( - self + TxOut { + script_pubkey: self .unused_change_addresses .pop() - .expect("not enough change addresses"), - Amount::from_sat(sat_offset), - ), + .unwrap_or_else(|| panic!("not enough change addresses")) + .script_pubkey(), + value: sat_offset, + }, ); - self.outputs.last_mut().expect("no output").1 -= Amount::from_sat(sat_offset); + self.outputs.last_mut().expect("no output").value -= sat_offset; } self } fn pad_alignment_output(mut self) -> Result { - if self.outputs[0].0 == self.recipient { + if self.outputs[0].script_pubkey == self.recipient { tprintln!("no alignment output"); } else { let dust_limit = self @@ -266,21 +280,21 @@ impl TransactionBuilder { .last() .unwrap() .script_pubkey() - .dust_value(); + .dust_value() + .to_sat(); - if self.outputs[0].1 >= dust_limit { + if self.outputs[0].value >= dust_limit { tprintln!("no padding needed"); } else { - while self.outputs[0].1 < dust_limit { - let (utxo, size) = - self.select_cardinal_utxo((dust_limit - self.outputs[0].1).to_sat(), true)?; + while self.outputs[0].value < dust_limit { + let (utxo, size) = self.select_cardinal_utxo(dust_limit - self.outputs[0].value, true)?; self.inputs.insert(0, utxo); - self.outputs[0].1 += size; + self.outputs[0].value += size.to_sat(); tprintln!( "padded alignment output to {} with additional {size} sat input", - self.outputs[0].1 + self.outputs[0].value ); } } @@ -293,7 +307,7 @@ impl TransactionBuilder { let estimated_fee = self.estimate_fee(); let min_value = match self.target { - Target::Postage => self.outputs.last().unwrap().0.script_pubkey().dust_value(), + Target::Postage => self.outputs.last().unwrap().script_pubkey.dust_value(), Target::Value(value) | Target::ExactPostage(value) => value, }; @@ -301,7 +315,9 @@ impl TransactionBuilder { .checked_add(estimated_fee) .ok_or(Error::ValueOverflow)?; - if let Some(mut deficit) = total.checked_sub(self.outputs.last().unwrap().1) { + if let Some(mut deficit) = + total.checked_sub(Amount::from_sat(self.outputs.last().unwrap().value)) + { while deficit > Amount::ZERO { let additional_fee = self.fee_rate.fee(Self::ADDITIONAL_INPUT_VBYTES); @@ -317,7 +333,7 @@ impl TransactionBuilder { self.inputs.push(utxo); - self.outputs.last_mut().unwrap().1 += value; + self.outputs.last_mut().unwrap().value += value.to_sat(); if benefit > deficit { tprintln!("added {value} sat input to cover {deficit} sat deficit"); @@ -338,13 +354,13 @@ impl TransactionBuilder { let total_output_amount = self .outputs .iter() - .map(|(_address, amount)| *amount) + .map(|tx_out| Amount::from_sat(tx_out.value)) .sum::(); self .outputs .iter() - .find(|(address, _amount)| address == &self.recipient) + .find(|tx_out| tx_out.script_pubkey == self.recipient) .expect("couldn't find output that contains the index"); let value = total_output_amount - Amount::from_sat(sat_offset); @@ -369,14 +385,15 @@ impl TransactionBuilder { .fee(self.estimate_vbytes() + Self::ADDITIONAL_OUTPUT_VBYTES) { tprintln!("stripped {} sats", (value - target).to_sat()); - self.outputs.last_mut().expect("no outputs found").1 = target; - self.outputs.push(( - self + self.outputs.last_mut().expect("no outputs found").value = target.to_sat(); + self.outputs.push(TxOut { + script_pubkey: self .unused_change_addresses .pop() - .expect("not enough change addresses"), - value - target, - )); + .unwrap_or_else(|| panic!("not enough change addresses")) + .script_pubkey(), + value: (value - target).to_sat(), + }); } } @@ -391,10 +408,10 @@ impl TransactionBuilder { let total_output_amount = self .outputs .iter() - .map(|(_address, amount)| *amount) + .map(|tx_out| Amount::from_sat(tx_out.value)) .sum::(); - let (_address, last_output_amount) = self + let last_tx_out = self .outputs .last_mut() .expect("No output to deduct fee from"); @@ -405,13 +422,13 @@ impl TransactionBuilder { ); assert!( - *last_output_amount >= fee, + last_tx_out.value >= fee.to_sat(), "invariant: last output can pay fee: {} {}", - *last_output_amount, + last_tx_out.value, fee, ); - *last_output_amount -= fee; + last_tx_out.value -= fee.to_sat(); self } @@ -421,18 +438,10 @@ impl TransactionBuilder { /// inputs are taproot key path spends, which allows us to know that witnesses /// will all consist of single Schnorr signatures. fn estimate_vbytes(&self) -> usize { - Self::estimate_vbytes_with( - self.inputs.len(), - self - .outputs - .iter() - .map(|(address, _amount)| address) - .cloned() - .collect(), - ) + Self::estimate_vbytes_with(self.inputs.len(), &self.outputs) } - fn estimate_vbytes_with(inputs: usize, outputs: Vec
) -> usize { + fn estimate_vbytes_with(inputs: usize, outputs: &[TxOut]) -> usize { Transaction { version: Version(2), lock_time: LockTime::ZERO, @@ -444,13 +453,7 @@ impl TransactionBuilder { witness: Witness::from_slice(&[&[0; Self::SCHNORR_SIGNATURE_SIZE]]), }) .collect(), - output: outputs - .into_iter() - .map(|address| TxOut { - value: Amount::from_sat(0), - script_pubkey: address.script_pubkey(), - }) - .collect(), + output: outputs.to_vec(), } .vsize() } @@ -460,7 +463,6 @@ impl TransactionBuilder { } fn build(self) -> Result { - let recipient = self.recipient.script_pubkey(); let transaction = Transaction { version: Version(2), lock_time: LockTime::ZERO, @@ -474,14 +476,7 @@ impl TransactionBuilder { witness: Witness::new(), }) .collect(), - output: self - .outputs - .iter() - .map(|(address, amount)| TxOut { - value: *amount, - script_pubkey: address.script_pubkey(), - }) - .collect(), + output: self.outputs.clone(), }; assert_eq!( @@ -524,7 +519,7 @@ impl TransactionBuilder { output_end += tx_out.value.to_sat(); if output_end > sat_offset { assert_eq!( - tx_out.script_pubkey, recipient, + tx_out.script_pubkey, self.recipient, "invariant: outgoing sat is sent to recipient" ); found = true; @@ -537,7 +532,7 @@ impl TransactionBuilder { transaction .output .iter() - .filter(|tx_out| tx_out.script_pubkey == self.recipient.script_pubkey()) + .filter(|tx_out| tx_out.script_pubkey == self.recipient) .count(), 1, "invariant: recipient address appears exactly once in outputs", @@ -558,7 +553,7 @@ impl TransactionBuilder { let mut offset = 0; for output in &transaction.output { - if output.script_pubkey == self.recipient.script_pubkey() { + if output.script_pubkey == self.recipient { let slop = self.fee_rate.fee(Self::ADDITIONAL_OUTPUT_VBYTES); match self.target { @@ -744,6 +739,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap(); @@ -756,10 +752,10 @@ mod tests { assert_eq!(tx_builder.inputs, [outpoint(2)]); assert_eq!( tx_builder.outputs, - [( - recipient(), - Amount::from_sat(100 * COIN_VALUE - 51 * COIN_VALUE) - )] + [TxOut { + script_pubkey: recipient(), + value: 100 * COIN_VALUE - 51 * COIN_VALUE + }] ) } @@ -783,11 +779,21 @@ mod tests { change_addresses: vec![change(0), change(1)].into_iter().collect(), inputs: vec![outpoint(1), outpoint(2), outpoint(3)], outputs: vec![ - (recipient(), Amount::from_sat(5_000)), - (change(0), Amount::from_sat(5_000)), - (change(1), Amount::from_sat(1_724)), + TxOut { + script_pubkey: recipient(), + value: 5_000, + }, + TxOut { + script_pubkey: change(0).script_pubkey(), + value: 5_000, + }, + TxOut { + script_pubkey: change(1).script_pubkey(), + value: 1_724, + }, ], target: Target::Postage, + network: Network::Testnet, }; pretty_assert_eq!( @@ -797,7 +803,7 @@ mod tests { 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()), + tx_out(5_000, recipient_address()), tx_out(5_000, change(0)), tx_out(1_724, change(1)) ], @@ -819,6 +825,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction() .unwrap() @@ -840,13 +847,14 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(4901, recipient())], + output: vec![tx_out(4901, recipient_address())], }) ) } @@ -866,6 +874,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap() @@ -892,13 +901,14 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, 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())], + output: vec![tx_out(4_950, change(1)), tx_out(4_862, recipient_address())], }) ) } @@ -918,6 +928,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos), @@ -941,7 +952,8 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), - Target::Postage + Target::Postage, + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos), @@ -966,6 +978,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { @@ -974,7 +987,7 @@ mod tests { input: vec![tx_in(outpoint(1)), tx_in(outpoint(2))], output: vec![ tx_out(4_950, change(1)), - tx_out(TARGET_POSTAGE.to_sat(), recipient()), + tx_out(TARGET_POSTAGE.to_sat(), recipient_address()), tx_out(14_831, change(0)), ], }) @@ -996,6 +1009,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build() .unwrap(); @@ -1016,6 +1030,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build() .unwrap(); @@ -1036,6 +1051,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build() .unwrap(); @@ -1056,14 +1072,16 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap(); - builder.outputs[0].0 = "tb1qx4gf3ya0cxfcwydpq8vr2lhrysneuj5d7lqatw" + builder.outputs[0].script_pubkey = "tb1qx4gf3ya0cxfcwydpq8vr2lhrysneuj5d7lqatw" .parse::>() .unwrap() - .assume_checked(); + .assume_checked() + .script_pubkey(); builder.build().unwrap(); } @@ -1083,11 +1101,12 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap(); - builder.outputs[0].1 = Amount::from_sat(0); + builder.outputs[0].value = 0; builder.build().unwrap(); } @@ -1107,6 +1126,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { @@ -1114,7 +1134,7 @@ mod tests { lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![ - tx_out(TARGET_POSTAGE.to_sat(), recipient()), + tx_out(TARGET_POSTAGE.to_sat(), recipient_address()), tx_out(989_870, change(1)) ], }) @@ -1136,6 +1156,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1158,13 +1179,14 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(3_333, change(1)), tx_out(6_537, recipient())], + output: vec![tx_out(3_333, change(1)), tx_out(6_537, recipient_address())], }) ) } @@ -1187,13 +1209,17 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, 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())], + output: vec![ + tx_out(10_001, change(1)), + tx_out(9_811, recipient_address()) + ], }) ) } @@ -1213,6 +1239,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1242,6 +1269,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1269,6 +1297,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1293,6 +1322,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1322,11 +1352,21 @@ mod tests { change_addresses: vec![change(0), change(1)].into_iter().collect(), inputs: vec![outpoint(1), outpoint(2), outpoint(3)], outputs: vec![ - (recipient(), Amount::from_sat(5_000)), - (recipient(), Amount::from_sat(5_000)), - (change(1), Amount::from_sat(1_774)), + TxOut { + script_pubkey: recipient(), + value: 5_000, + }, + TxOut { + script_pubkey: recipient(), + value: 5_000, + }, + TxOut { + script_pubkey: change(1).script_pubkey(), + value: 1_774, + }, ], target: Target::Postage, + network: Network::Testnet, } .build() .unwrap(); @@ -1353,11 +1393,21 @@ mod tests { change_addresses: vec![change(0), change(1)].into_iter().collect(), inputs: vec![outpoint(1), outpoint(2), outpoint(3)], outputs: vec![ - (recipient(), Amount::from_sat(5_000)), - (change(0), Amount::from_sat(5_000)), - (change(0), Amount::from_sat(1_774)), + TxOut { + script_pubkey: recipient(), + value: 5_000, + }, + TxOut { + script_pubkey: change(0).script_pubkey(), + value: 5_000, + }, + TxOut { + script_pubkey: change(0).script_pubkey(), + value: 1_774, + }, ], target: Target::Postage, + network: Network::Testnet, } .build() .unwrap(); @@ -1381,6 +1431,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos) @@ -1405,6 +1456,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos) @@ -1426,6 +1478,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Err(Error::UtxoContainsAdditionalInscriptions { @@ -1452,6 +1505,7 @@ mod tests { [change(0), change(1)], fee_rate, Target::Postage, + Network::Testnet, ) .build_transaction() .unwrap(); @@ -1465,7 +1519,7 @@ mod tests { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(10_000 - fee.to_sat(), recipient())], + output: vec![tx_out(10_000 - fee.to_sat(), recipient_address())], } ) } @@ -1484,14 +1538,15 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(1000, recipient()), tx_out(3870, change(1))], + output: vec![tx_out(1000, recipient_address()), tx_out(3870, change(1))], }) ) } @@ -1513,14 +1568,15 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), - Target::Value(Amount::from_sat(1500)) + Target::Value(Amount::from_sat(1500)), + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, 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))], + output: vec![tx_out(1500, recipient_address()), tx_out(312, change(1))], }) ) } @@ -1539,7 +1595,8 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), - Target::Value(Amount::from_sat(1)) + Target::Value(Amount::from_sat(1)), + Network::Testnet, ) .build_transaction(), Err(Error::Dust { @@ -1566,7 +1623,8 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos), @@ -1590,7 +1648,8 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(4.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos), @@ -1599,22 +1658,24 @@ mod tests { #[test] fn additional_input_size_is_correct() { - let before = TransactionBuilder::estimate_vbytes_with(0, Vec::new()); - let after = TransactionBuilder::estimate_vbytes_with(1, Vec::new()); + let before = TransactionBuilder::estimate_vbytes_with(0, &[]); + let after = TransactionBuilder::estimate_vbytes_with(1, &[]); assert_eq!(after - before, TransactionBuilder::ADDITIONAL_INPUT_VBYTES); } #[test] fn additional_output_size_is_correct() { - let before = TransactionBuilder::estimate_vbytes_with(0, Vec::new()); + let before = TransactionBuilder::estimate_vbytes_with(0, &[]); let after = TransactionBuilder::estimate_vbytes_with( 0, - vec![ - "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" + &[TxOut { + script_pubkey: "bc1pxwww0ct9ue7e8tdnlmug5m2tamfn7q06sahstg39ys4c9f3340qqxrdu9k" .parse::>() .unwrap() - .assume_checked(), - ], + .assume_checked() + .script_pubkey(), + value: 0, + }], ); assert_eq!(after - before, TransactionBuilder::ADDITIONAL_OUTPUT_VBYTES); } @@ -1633,14 +1694,15 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), - Target::Value(Amount::from_sat(707)) + Target::Value(Amount::from_sat(707)), + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(901, recipient())], + output: vec![tx_out(901, recipient_address())], }), ); } @@ -1660,13 +1722,14 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(20_000, recipient())], + output: vec![tx_out(20_000, recipient_address())], }), ); } @@ -1685,14 +1748,15 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(5.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(1005, recipient())], + output: vec![tx_out(1005, recipient_address())], }), ); } @@ -1711,7 +1775,8 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(6.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), Err(Error::NotEnoughCardinalUtxos) @@ -1730,12 +1795,13 @@ mod tests { BTreeSet::new(), BTreeSet::new(), recipient(), - [recipient(), change(1)], + [recipient_address(), change(1)], FeeRate::try_from(0.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), - Err(Error::DuplicateAddress(recipient())) + Err(Error::DuplicateAddress(recipient_address())) ); } @@ -1753,7 +1819,8 @@ mod tests { recipient(), [change(0), change(0)], FeeRate::try_from(0.0).unwrap(), - Target::Value(Amount::from_sat(1000)) + Target::Value(Amount::from_sat(1000)), + Network::Testnet, ) .build_transaction(), Err(Error::DuplicateAddress(change(0))) @@ -1774,14 +1841,15 @@ mod tests { recipient(), [change(0), change(1)], FeeRate::try_from(2.0).unwrap(), - Target::Value(Amount::from_sat(1500)) + Target::Value(Amount::from_sat(1500)), + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(1802, recipient())], + output: vec![tx_out(1802, recipient_address())], }), ); } @@ -1801,13 +1869,14 @@ mod tests { [change(0), change(1)], FeeRate::try_from(250.0).unwrap(), Target::Postage, + Network::Testnet, ) .build_transaction(), Ok(Transaction { version: 2, lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], - output: vec![tx_out(20250, recipient())], + output: vec![tx_out(20250, recipient_address())], }), ); } @@ -1833,6 +1902,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1853,7 +1923,10 @@ mod tests { ); // value inputs are pushed at the end assert_eq!( tx_builder.outputs, - [(recipient(), Amount::from_sat(3_003 + 3_006 + 3_005 + 3_001))] + [TxOut { + script_pubkey: recipient(), + value: 3_003 + 3_006 + 3_005 + 3_001 + }] ) } @@ -1879,6 +1952,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ) .select_outgoing() .unwrap() @@ -1901,8 +1975,14 @@ mod tests { assert_eq!( tx_builder.outputs, [ - (change(1), Amount::from_sat(101 + 104 + 105 + 1)), - (recipient(), Amount::from_sat(19_999)) + TxOut { + script_pubkey: change(1).script_pubkey(), + value: 101 + 104 + 105 + 1 + }, + TxOut { + script_pubkey: recipient(), + value: 19_999 + } ] ) } @@ -1932,6 +2012,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ); assert_eq!( @@ -1988,6 +2069,7 @@ mod tests { [change(0), change(1)], fee_rate, Target::ExactPostage(Amount::from_sat(66_000)), + Network::Testnet, ) .build_transaction() .unwrap(); @@ -2002,7 +2084,7 @@ mod tests { lock_time: LockTime::ZERO, input: vec![tx_in(outpoint(1))], output: vec![ - tx_out(66_000, recipient()), + tx_out(66_000, recipient_address()), tx_out(1_000_000 - 66_000 - fee.to_sat(), change(1)) ], } @@ -2024,6 +2106,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ); assert_eq!( @@ -2050,6 +2133,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ); assert_eq!( @@ -2075,6 +2159,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ); assert_eq!( @@ -2100,6 +2185,7 @@ mod tests { [change(0), change(1)], FeeRate::try_from(1.0).unwrap(), Target::Value(Amount::from_sat(10_000)), + Network::Testnet, ); assert_eq!( diff --git a/tests/lib.rs b/tests/lib.rs index 80f794f332..12e2c620fb 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -68,6 +68,7 @@ mod settings; mod subsidy; mod supply; mod traits; +mod verify; mod version; mod wallet; @@ -98,17 +99,27 @@ fn sats( .run_and_deserialize_output::>() } -fn inscribe(core: &mockcore::Handle, ord: &TestServer) -> (InscriptionId, Txid) { +fn inscribe_with_postage( + core: &mockcore::Handle, + ord: &TestServer, + postage: Option, +) -> (InscriptionId, Txid) { core.mine_blocks(1); - let output = CommandBuilder::new(format!( + let mut command_str = format!( "--chain {} wallet inscribe --fee-rate 1 --file foo.txt", core.network() - )) - .write("foo.txt", "FOO") - .core(core) - .ord(ord) - .run_and_deserialize_output::(); + ); + + if let Some(postage_value) = postage { + command_str.push_str(&format!(" --postage {}sat", postage_value)); + } + + let output = CommandBuilder::new(command_str) + .write("foo.txt", "FOO") + .core(core) + .ord(ord) + .run_and_deserialize_output::(); core.mine_blocks(1); @@ -117,6 +128,10 @@ fn inscribe(core: &mockcore::Handle, ord: &TestServer) -> (InscriptionId, Txid) (output.inscriptions[0].id, output.reveal) } +fn inscribe(core: &mockcore::Handle, ord: &TestServer) -> (InscriptionId, Txid) { + inscribe_with_postage(core, ord, None) +} + fn drain(core: &mockcore::Handle, ord: &TestServer) { let balance = CommandBuilder::new("--regtest --index-runes wallet balance") .core(core) diff --git a/tests/verify.rs b/tests/verify.rs new file mode 100644 index 0000000000..f33233137f --- /dev/null +++ b/tests/verify.rs @@ -0,0 +1,66 @@ +use super::*; + +#[test] +fn verify() { + assert_eq!( + CommandBuilder::new([ + "verify", + "--address", "bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l", + "--message", "Hello World", + "--witness", "AkcwRAIgZRfIY3p7/DoVTty6YZbWS71bc5Vct9p9Fia83eRmw2QCICK/ENGfwLtptFluMGs2KsqoNSk89pO7F29zJLUx9a/sASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=" + ]) + .run_and_extract_stdout(), + "" + ); +} + +#[test] +fn verify_fails() { + CommandBuilder::new([ + "verify", + "--address", "bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l", + "--message", "Hello World - this should fail", + "--witness", "AkcwRAIgZRfIY3p7/DoVTty6YZbWS71bc5Vct9p9Fia83eRmw2QCICK/ENGfwLtptFluMGs2KsqoNSk89pO7F29zJLUx9a/sASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=" + ]) + .expected_exit_code(1) + .stderr_regex("error: Invalid signature.*") + .run_and_extract_stdout(); +} + +#[test] +fn witness_and_transaction_conflict() { + CommandBuilder::new([ + "verify", + "--address", "bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l", + "--message", "Hello World", + "--transaction", "asdf", + "--witness", "AkcwRAIgZRfIY3p7/DoVTty6YZbWS71bc5Vct9p9Fia83eRmw2QCICK/ENGfwLtptFluMGs2KsqoNSk89pO7F29zJLUx9a/sASECx/EgAxlkQpQ9hYjgGu6EBCPMVPwVIVJqO4XCsMvViHI=" + ]) + .expected_exit_code(2) + .stderr_regex(".*error.*") + .run_and_extract_stdout(); +} + +#[test] +fn verify_with_transaction() { + let tx = bip322::sign_full_encoded( + "bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l", + "Hello World", + "L3VFeEujGtevx9w18HD1fhRbCH67Az2dpCymeRE1SoPK6XQtaN2k", + ) + .unwrap(); + + assert_eq!( + CommandBuilder::new([ + "verify", + "--address", + "bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l", + "--message", + "Hello World", + "--transaction", + &tx, + ]) + .run_and_extract_stdout(), + "" + ); +} diff --git a/tests/wallet.rs b/tests/wallet.rs index efa75d628e..9ca09a3305 100644 --- a/tests/wallet.rs +++ b/tests/wallet.rs @@ -3,6 +3,7 @@ use super::*; mod authentication; mod balance; mod batch_command; +mod burn; mod cardinals; mod create; mod dump; diff --git a/tests/wallet/batch_command.rs b/tests/wallet/batch_command.rs index 781e3c06d9..4da3159e89 100644 --- a/tests/wallet/batch_command.rs +++ b/tests/wallet/batch_command.rs @@ -145,7 +145,7 @@ fn batch_inscribe_with_multiple_inscriptions_with_parent() { .write("meow.wav", [0; 2048]) .write( "batch.yaml", - format!("parent: {parent_id}\nmode: shared-output\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + format!("parents:\n- {parent_id}\nmode: shared-output\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") ) .core(&core) .ord(&ord) @@ -168,6 +168,129 @@ fn batch_inscribe_with_multiple_inscriptions_with_parent() { assert_eq!(request.headers().get("content-type").unwrap(), "audio/wav"); } +#[test] +fn batch_inscribe_inscriptions_with_multiple_parents() { + let core = mockcore::spawn(); + + let ord = TestServer::spawn_with_server_args(&core, &[], &[]); + + create_wallet(&core, &ord); + + core.mine_blocks(1); + + let parent_output_1 = CommandBuilder::new("wallet inscribe --fee-rate 5.0 --file parent.png") + .write("parent.png", [1; 520]) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + let parent_output_2 = CommandBuilder::new("wallet inscribe --fee-rate 5.0 --file parent.png") + .write("parent.png", [1; 520]) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + let parent_output_3 = CommandBuilder::new("wallet inscribe --fee-rate 5.0 --file parent.png") + .write("parent.png", [1; 520]) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + let parent_id_1 = parent_output_1.inscriptions[0].id; + let parent_id_2 = parent_output_2.inscriptions[0].id; + let parent_id_3 = parent_output_3.inscriptions[0].id; + + let output = CommandBuilder::new("wallet batch --fee-rate 1 --batch batch.yaml") + .write("inscription.txt", "Hello World") + .write("tulip.png", [0; 555]) + .write("meow.wav", [0; 2048]) + .write( + "batch.yaml", + format!("parents:\n- {parent_id_1}\n- {parent_id_2}\n- {parent_id_3}\nmode: separate-outputs\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + ) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + ord.assert_response_regex( + format!("/inscription/{}", output.inscriptions[0].id), + format!(r".*
parents
\s*
.*{parent_id_1}.*{parent_id_2}.*{parent_id_3}.*",), + ); + + ord.assert_response_regex( + format!("/inscription/{}", output.inscriptions[1].id), + format!(r".*
parents
\s*
.*{parent_id_1}.*{parent_id_2}.*{parent_id_3}.*",), + ); +} + +#[test] +fn batch_inscribe_and_etch_with_two_parents() { + let core = mockcore::spawn(); + + let ord = TestServer::spawn_with_server_args(&core, &[], &[]); + + create_wallet(&core, &ord); + + core.mine_blocks(1); + + let parent_output_1 = CommandBuilder::new("wallet inscribe --fee-rate 5.0 --file parent.png") + .write("parent.png", [1; 520]) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + let parent_output_2 = CommandBuilder::new("wallet inscribe --fee-rate 5.0 --file parent.png") + .write("parent.png", [1; 520]) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + assert_eq!(core.descriptors().len(), 4); + + let parent_id_1 = parent_output_1.inscriptions[0].id; + let parent_id_2 = parent_output_2.inscriptions[0].id; + + let output = CommandBuilder::new("wallet batch --fee-rate 1 --batch batch.yaml") + .write("inscription.txt", "Hello World") + .write("tulip.png", [0; 555]) + .write("meow.wav", [0; 2048]) + .write( + "batch.yaml", + format!("parents:\n- {parent_id_1}\n- {parent_id_2}\nmode: shared-output\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + ) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(1); + + ord.assert_response_regex( + format!("/inscription/{}", output.inscriptions[0].id), + format!(r".*
parents
\s*
.*{parent_id_1}.*{parent_id_2}.*",), + ); + + ord.assert_response_regex( + format!("/inscription/{}", output.inscriptions[1].id), + format!(r".*
parents
\s*
.*{parent_id_1}.*{parent_id_2}.*",), + ); + + let request = ord.request(format!("/content/{}", output.inscriptions[2].id)); + assert_eq!(request.status(), 200); + assert_eq!(request.headers().get("content-type").unwrap(), "audio/wav"); +} + #[test] fn batch_inscribe_respects_dry_run_flag() { let core = mockcore::spawn(); @@ -342,7 +465,7 @@ fn batch_in_separate_outputs_with_parent() { .write("meow.wav", [0; 2048]) .write( "batch.yaml", - format!("parent: {parent_id}\nmode: separate-outputs\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + format!("parents:\n- {parent_id}\nmode: separate-outputs\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") ) .core(&core) .ord(&ord) @@ -351,6 +474,7 @@ fn batch_in_separate_outputs_with_parent() { for inscription in &output.inscriptions { assert_eq!(inscription.location.offset, 0); } + let mut outpoints = output .inscriptions .iter() @@ -419,7 +543,7 @@ fn batch_in_separate_outputs_with_parent_and_non_default_postage() { .write("meow.wav", [0; 2048]) .write( "batch.yaml", - format!("parent: {parent_id}\nmode: separate-outputs\npostage: 777\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + format!("parents:\n- {parent_id}\nmode: separate-outputs\npostage: 777\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") ) .core(&core) .ord(&ord) @@ -661,7 +785,7 @@ fn batch_same_sat_with_parent() { .write("meow.wav", [0; 2048]) .write( "batch.yaml", - format!("mode: same-sat\nparent: {parent_id}\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + format!("mode: same-sat\nparents:\n- {parent_id}\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") ) .core(&core) .ord(&ord) @@ -821,7 +945,7 @@ fn batch_inscribe_with_sat_argument_with_parent() { .write("meow.wav", [0; 2048]) .write( "batch.yaml", - format!("parent: {parent_id}\nmode: same-sat\nsat: 5000111111\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") + format!("parents:\n- {parent_id}\nmode: same-sat\nsat: 5000111111\ninscriptions:\n- file: inscription.txt\n- file: tulip.png\n- file: meow.wav\n") ) .core(&core) .ord(&ord) @@ -1115,7 +1239,8 @@ fn batch_inscribe_with_satpoints_with_parent() { format!( r#" mode: satpoints -parent: {parent_id} +parents: +- {parent_id} inscriptions: - file: inscription.txt satpoint: {} diff --git a/tests/wallet/burn.rs b/tests/wallet/burn.rs new file mode 100644 index 0000000000..9824eb2372 --- /dev/null +++ b/tests/wallet/burn.rs @@ -0,0 +1,214 @@ +use super::*; + +#[test] +fn inscriptions_can_be_burned() { + let core = mockcore::spawn(); + + let ord = TestServer::spawn_with_server_args(&core, &[], &[]); + + create_wallet(&core, &ord); + + core.mine_blocks(1); + + let (inscription, _) = inscribe(&core, &ord); + + core.mine_blocks(1); + + let output = CommandBuilder::new(format!("wallet burn --fee-rate 1 {inscription}",)) + .core(&core) + .ord(&ord) + .stdout_regex(r".*") + .run_and_deserialize_output::(); + + let txid = core.mempool()[0].txid(); + assert_eq!(txid, output.txid); + + core.mine_blocks(1); + + ord.assert_response_regex( + format!("/inscription/{inscription}"), + ".*

Inscription 0

.*
.* +
charms
+
+ 🔥 +
+ .* +
content length
+
3 bytes
+
content type
+
text/plain;charset=utf-8
+ .* +
+.*", + ); +} + +#[test] +fn runic_outputs_are_protected() { + let core = mockcore::builder().network(Network::Regtest).build(); + + let ord = TestServer::spawn_with_server_args(&core, &["--regtest", "--index-runes"], &[""]); + + create_wallet(&core, &ord); + + let (inscription, _) = inscribe_with_postage(&core, &ord, Some(1000)); + let height = core.height(); + + let rune = Rune(RUNE); + etch(&core, &ord, rune); + + let address = CommandBuilder::new("--regtest wallet receive") + .core(&core) + .ord(&ord) + .run_and_deserialize_output::() + .addresses + .into_iter() + .next() + .unwrap(); + + CommandBuilder::new(format!( + "--regtest --index-runes wallet send --fee-rate 1 {} 1000:{} --postage 1000sat", + address.clone().require_network(Network::Regtest).unwrap(), + Rune(RUNE) + )) + .core(&core) + .ord(&ord) + .run_and_deserialize_output::(); + + core.mine_blocks(2); + + let txid = core.broadcast_tx(TransactionTemplate { + inputs: &[ + // send rune and inscription to the same output + (height as usize, 2, 0, Witness::new()), + ((core.height() - 1) as usize, 1, 0, Witness::new()), + // fees + (core.height() as usize, 0, 0, Witness::new()), + ], + outputs: 2, + output_values: &[2000, 50 * COIN_VALUE], + recipient: Some(address.require_network(Network::Regtest).unwrap()), + ..default() + }); + + core.mine_blocks(1); + + ord.assert_response_regex( + format!("/output/{}:0", txid), + format!(r".*.*.*", inscription), + ); + + ord.assert_response_regex( + format!("/output/{}:0", txid), + format!(r".*{rune}.*"), + ); + + CommandBuilder::new(format!( + "--regtest --index-runes wallet burn --fee-rate 1 {inscription}", + )) + .core(&core) + .ord(&ord) + .expected_stderr("error: runic outpoints may not be burned\n") + .expected_exit_code(1) + .run_and_extract_stdout(); +} + +#[test] +fn cannot_burn_inscriptions_on_large_utxos() { + let core = mockcore::spawn(); + + let ord = TestServer::spawn_with_server_args(&core, &[], &[]); + + create_wallet(&core, &ord); + + core.mine_blocks(1); + + let (inscription, _) = inscribe_with_postage(&core, &ord, Some(10_001)); + + CommandBuilder::new(format!("wallet burn --fee-rate 1 {inscription}",)) + .core(&core) + .ord(&ord) + .expected_stderr("error: Cannot burn inscription contained in UTXO exceeding 0.0001 BTC\n") + .expected_exit_code(1) + .run_and_extract_stdout(); +} + +#[test] +fn cannot_burn_inscription_sharing_utxo_with_another_inscription() { + let core = mockcore::builder().network(Network::Regtest).build(); + + let ord = TestServer::spawn_with_server_args(&core, &["--regtest"], &[]); + + create_wallet(&core, &ord); + + let address = CommandBuilder::new("--regtest wallet receive") + .core(&core) + .ord(&ord) + .run_and_deserialize_output::() + .addresses + .into_iter() + .next() + .unwrap(); + + let (inscription0, _) = inscribe_with_postage(&core, &ord, Some(1000)); + let height0 = core.height(); + let (inscription1, _) = inscribe_with_postage(&core, &ord, Some(1000)); + let height1 = core.height(); + let (inscription2, _) = inscribe_with_postage(&core, &ord, Some(1000)); + let height2 = core.height(); + + let txid = core.broadcast_tx(TransactionTemplate { + inputs: &[ + // send all 3 inscriptions on a single output + (height0 as usize, 2, 0, Witness::new()), + (height1 as usize, 2, 0, Witness::new()), + (height2 as usize, 2, 0, Witness::new()), + // fees + (core.height() as usize, 0, 0, Witness::new()), + ], + outputs: 2, + output_values: &[3000, 50 * COIN_VALUE], + recipient: Some(address.require_network(Network::Regtest).unwrap()), + ..default() + }); + + core.mine_blocks(1); + + ord.assert_response_regex( + format!("/output/{}:0", txid), + format!(r".*.*.*.*.*.*.*", inscription0, inscription1, inscription2), + ); + + CommandBuilder::new(format!("--regtest wallet burn --fee-rate 1 {inscription0}",)) + .core(&core) + .ord(&ord) + .expected_stderr(format!( + "error: cannot send {txid}:0:0 without also sending inscription {inscription2} at {txid}:0:2000\n" + )) + .expected_exit_code(1) + .run_and_extract_stdout(); +} + +#[test] +fn cannot_burn_with_excess_postage() { + let core = mockcore::spawn(); + + let ord = TestServer::spawn_with_server_args(&core, &[], &[]); + + create_wallet(&core, &ord); + + core.mine_blocks(1); + + let (inscription, _) = inscribe(&core, &ord); + + core.mine_blocks(1); + + CommandBuilder::new(format!( + "wallet burn --fee-rate 1 {inscription} --postage 10001sat", + )) + .core(&core) + .ord(&ord) + .expected_stderr("error: Postage may not exceed 0.0001 BTC\n") + .expected_exit_code(1) + .run_and_extract_stdout(); +} diff --git a/tests/wallet/inscribe.rs b/tests/wallet/inscribe.rs index 36d063e918..b65af8fc69 100644 --- a/tests/wallet/inscribe.rs +++ b/tests/wallet/inscribe.rs @@ -623,7 +623,7 @@ fn inscribe_with_parent_inscription_and_fee_rate() { .run_and_deserialize_output::(); assert_eq!(core.descriptors().len(), 4); - assert_eq!(parent_id, child_output.parent.unwrap()); + assert_eq!(parent_id, *child_output.parents.first().unwrap()); let commit_tx = &core.mempool()[0]; let reveal_tx = &core.mempool()[1]; @@ -639,7 +639,7 @@ fn inscribe_with_parent_inscription_and_fee_rate() { core.mine_blocks(1); ord.assert_response_regex( - format!("/inscription/{}", child_output.parent.unwrap()), + format!("/inscription/{}", child_output.parents.first().unwrap()), format!( ".*
children
.*.*", child_output.inscriptions[0].id @@ -650,7 +650,7 @@ fn inscribe_with_parent_inscription_and_fee_rate() { format!("/inscription/{}", child_output.inscriptions[0].id), format!( ".*
parents
.*
.*", - child_output.parent.unwrap() + child_output.parents.first().unwrap() ), ); }