diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0802240..101f871 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,15 @@ name: Build on: push: - branches: [ master ] + branches: + - master + tags: + - 'v[0-9]+\.*' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always @@ -14,67 +20,55 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - # NOTE: Don't use nix here: everything should be based on the ubuntu-latest - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Latest Ubuntu build check - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace + - uses: dtolnay/rust-toolchain@stable + - run: cargo check --workspace + no-default: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo check --workspace --no-default-features features: runs-on: ubuntu-latest strategy: fail-fast: false matrix: feature: - - hot - - serde - - esplora - electrum + - esplora - mempool - fs - cli - - cli,hot - - serde,esplora + - clap + - log steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v26 - - name: Check feature ${{ matrix.feature }} only - run: nix develop .#stable -c cargo check --no-default-features --features=${{ matrix.feature }} - - name: Check feature ${{ matrix.feature }} with defaults - run: nix develop .#stable -c cargo check --features=${{ matrix.feature }} + - uses: dtolnay/rust-toolchain@stable + - name: Feature ${{matrix.feature}} + run: cargo check --workspace --no-default-features --features=${{matrix.feature}} + - name: Feature ${{matrix.feature}} + run: cargo check --workspace --features=${{matrix.feature}} platforms: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, ubuntu-24.04, macos-13, macos-latest, windows-2019, windows-latest ] + os: [ ubuntu-22.04, ubuntu-latest, macos-13, macos-latest, windows-2019, windows-latest ] steps: - uses: actions/checkout@v4 - # NOTE: Don't use nix in platform checks: everything should be based on the host system - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Build with all features - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-targets --all-features + - uses: dtolnay/rust-toolchain@stable + - name: Platform ${{matrix.os}} + run: cargo check --workspace --all-features # we skip test targets here to be sure that the main library can be built toolchains: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - toolchain: [ nightly, beta, stable, msrv ] + toolchain: [ nightly, beta, stable, 1.76.0 ] steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@v26 - - name: Check rgb-core - run: nix develop ".#${{ matrix.toolchain }}" -c cargo check --workspace --all-targets --all-features + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{matrix.toolchain}} + - name: Toolchain ${{matrix.toolchain}} + run: cargo +${{matrix.toolchain}} check --workspace --all-targets --all-features diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 238fae7..3711d7a 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -2,9 +2,15 @@ name: Codecov on: push: - branches: [ master ] + branches: + - master + tags: + - 'v[0-9]+\.*' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always @@ -14,22 +20,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@v26 - - name: Build - run: nix develop .#codecov -c cargo build --release - - name: Test - run: nix develop .#codecov -c cargo test --all-features --no-fail-fast - - name: Install grcov - run: nix develop .#codecov -c cargo install grcov - - name: Generate coverage - run: nix develop .#codecov -c grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov - - name: Upload coverage + - uses: dtolnay/rust-toolchain@nightly + with: + components: llvm-tools-preview + - uses: taiki-e/install-action@cargo-llvm-cov + - uses: taiki-e/install-action@nextest + - name: Collect coverage data (including doctests) + run: | + cargo +nightly llvm-cov --no-report nextest --workspace --all-features + cargo +nightly llvm-cov --no-report --doc --workspace --all-features + cargo +nightly llvm-cov report --doctests --lcov --output-path lcov.info + - name: Upload coverage data to codecov uses: codecov/codecov-action@v4 with: - files: ./coverage.lcov flags: rust - # TODO: set true when CODECOV_TOKEN is set - fail_ci_if_error: false - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e8e3c0e..ab5249d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,10 +1,11 @@ name: Lints on: - push: - branches: [ master ] pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always @@ -14,23 +15,31 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@v26 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt - name: Formatting - run: nix develop .#nightly -c cargo fmt --all -- --check + run: cargo +nightly fmt --all -- --check clippy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@v26 - - name: Clippy - run: nix develop .#stable -c cargo clippy --workspace --all-features --all-targets + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Formatting + run: cargo clippy --workspace --all-features --all-targets -- -D warnings doc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@v26 - - name: Doc - run: nix develop .#nightly -c cargo doc --workspace --all-features + - uses: dtolnay/rust-toolchain@nightly + with: + components: rust-docs + - name: Formatting + run: cargo +nightly doc --workspace --all-features + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7325c0c..edcc11e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,19 +2,28 @@ name: Tests on: push: - branches: [ master ] + branches: + - master + tags: + - 'v[0-9]+\.*' pull_request: - branches: [ master ] + branches: + - master + - develop + - 'v[0-9]+.[0-9]+' env: CARGO_TERM_COLOR: always jobs: testing: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-13, macos-latest, windows-latest ] steps: - uses: actions/checkout@v4 - - name: Install Nix - uses: cachix/install-nix-action@v26 - - name: Build & test - run: nix develop .#stable -c cargo test --workspace --all-features --no-fail-fast + - uses: dtolnay/rust-toolchain@stable + - name: Test ${{matrix.os}} + run: cargo test --workspace --all-features --no-fail-fast diff --git a/.rustfmt.toml b/.rustfmt.toml index 35c1d1e..98e9b85 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,4 +1,5 @@ edition = "2021" +version = "Two" max_width = 100 array_width = 100 @@ -8,9 +9,10 @@ chain_width = 100 fn_call_width = 100 single_line_if_else_max_width = 100 -format_code_in_doc_comments = true fn_single_line = true +format_code_in_doc_comments = true format_macro_matchers = true +format_macro_bodies = true format_strings = true merge_derives = false overflow_delimited_expr = true @@ -22,4 +24,4 @@ where_single_line = true unstable_features = true imports_granularity = "Module" -group_imports = "StdExternalCrate" \ No newline at end of file +group_imports = "StdExternalCrate" diff --git a/Cargo.lock b/Cargo.lock index 6182949..24de82d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "amplify" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e711289a6cb28171b4f0e6c8019c69ff9476050508dc082167575d458ff74d0" +checksum = "7147b742325842988dd6c793d55f58df3ae36bccf7d9b6e07db10ab035be343d" dependencies = [ "amplify_apfloat", "amplify_derive", @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "amplify_apfloat" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e23f5ede99065fa6957a633498d2728d51016d61dae23b69c866112b7c61ee" +checksum = "695e433882668b55b3d7fb0ba22bf9be66a91abe30d7ca1f1a774f8b90b4db4c" dependencies = [ "amplify_num", "bitflags", @@ -81,9 +81,9 @@ dependencies = [ [[package]] name = "amplify_derive" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759dcbfaf94d838367a86d493ec34ccc8aa6fe365cb7880d6bf89006de24d9c1" +checksum = "2a6309e6b8d89b36b9f959b7a8fa093583b94922a0f6438a24fb08936de4d428" dependencies = [ "amplify_syn", "proc-macro2", @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "amplify_num" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c009c5c4de814911b177e2ea59e4930bb918978ed3cce4900d846a6ceb0838" +checksum = "99bcb75a2982047f733547042fc3968c0f460dfcf7d90b90dea3b2744580e9ad" dependencies = [ "serde", "wasm-bindgen", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -144,44 +144,38 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", ] -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - [[package]] name = "ascii" version = "1.1.0" @@ -199,9 +193,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "aws-lc-rs" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a47f2fb521b70c11ce7369a6c5fa4bd6af7e5d62ec06303875bafe7c6ba245" +checksum = "4ae74d9bd0a7530e8afd1770739ad34b36838829d6ad61818f9230f683f5ad77" dependencies = [ "aws-lc-sys", "mirai-annotations", @@ -211,9 +205,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.19.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2927c7af777b460b7ccd95f8b67acd7b4c04ec8896bf0c8e80ba30523cffc057" +checksum = "0f0e249228c6ad2d240c2dc94b714d711629d52bad946075d8e9b2f5391f0703" dependencies = [ "bindgen", "cc", @@ -267,7 +261,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.71", + "syn 2.0.75", "which", ] @@ -277,33 +271,17 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ - "bitcoin_hashes 0.11.0", + "bitcoin_hashes", "serde", "unicode-normalization", ] -[[package]] -name = "bitcoin-io" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340e09e8399c7bd8912f495af6aa58bea0c9214773417ffaa8f6460f93aaee56" - [[package]] name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" -[[package]] -name = "bitcoin_hashes" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" -dependencies = [ - "bitcoin-io", - "hex-conservative", -] - [[package]] name = "bitflags" version = "2.6.0" @@ -321,8 +299,9 @@ dependencies = [ [[package]] name = "bp-consensus" -version = "0.11.0-beta.6" -source = "git+https://github.com/BP-WG/bp-core?branch=master#1989b57875a33243070b387158f5061e5df5be49" +version = "0.11.0-beta.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23ea438647522d1f1a8fc8fa1420cc56321433d5d5964636294991f18f9e0c9" dependencies = [ "amplify", "chrono", @@ -334,42 +313,44 @@ dependencies = [ [[package]] name = "bp-derive" -version = "0.11.0-beta.6" -source = "git+https://github.com/BP-WG/bp-std?branch=master#b664d65aeec68b11b42fa55d6b82d0e66228a0be" +version = "0.11.0-beta.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a1a38a6324920d6aa183245be6f13acde5aef1008b24fecf5f8e4036f33fe8" dependencies = [ "amplify", - "bitcoin_hashes 0.14.0", "bp-consensus", "bp-invoice", "commit_verify", - "indexmap 2.2.6", + "hmac", + "indexmap 2.4.0", "serde", + "sha2", ] [[package]] name = "bp-electrum" -version = "0.11.0-beta.6" +version = "0.11.0-beta.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21146e28b615c9b6f55b4af2240818ff218d823c6525b0572c673d1f3f0273fe" +checksum = "760cbe0955ad8b3531e113b9c7917ab78646b979a0c1a450ce3c6356c7bd80e5" dependencies = [ "amplify", "bp-std", "byteorder", "libc", "log", - "rustls 0.23.11", + "rustls", "serde", "serde_json", "sha2", - "webpki-roots 0.25.4", + "webpki-roots", "winapi", ] [[package]] name = "bp-esplora" -version = "0.11.0-beta.6" +version = "0.11.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ffba40457f99cf5e7715858cdc743e05925686d23798b6b21221a4bb50b118" +checksum = "b894bcb5df729d67e0d2a802fabbf889ff41cf8820cd35a468df36ac407f3630" dependencies = [ "amplify", "bp-std", @@ -382,34 +363,38 @@ dependencies = [ [[package]] name = "bp-invoice" -version = "0.11.0-beta.6" -source = "git+https://github.com/BP-WG/bp-std?branch=master#b664d65aeec68b11b42fa55d6b82d0e66228a0be" +version = "0.11.0-beta.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddcb55fe081418fc6e508370eaf8431001274727862e57e6672b6c892b8d3d66" dependencies = [ "amplify", "bech32", - "bitcoin_hashes 0.14.0", "bp-consensus", + "commit_verify", "serde", ] [[package]] name = "bp-std" -version = "0.11.0-beta.6" -source = "git+https://github.com/BP-WG/bp-std?branch=master#b664d65aeec68b11b42fa55d6b82d0e66228a0be" +version = "0.11.0-beta.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac66f7e326e203f228fd60f1fb1f5629f6ec20f37c61b580a627c3194e85d7fc" dependencies = [ "amplify", "bp-consensus", "bp-derive", "bp-invoice", "descriptors", + "getrandom", "psbt", "secp256k1", "serde", + "wasm-bindgen", ] [[package]] name = "bp-wallet" -version = "0.11.0-beta.6.1" +version = "0.11.0-beta.7" dependencies = [ "aes-gcm", "amplify", @@ -449,12 +434,13 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.1.5" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -510,9 +496,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.9" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -520,9 +506,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -532,36 +518,36 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cmake" -version = "0.1.50" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" dependencies = [ "cc", ] [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -575,9 +561,9 @@ dependencies = [ [[package]] name = "commit_encoding_derive" -version = "0.11.0-beta.5" +version = "0.11.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d660fdac917fb67edd1707bc9481e51ed9062ab4ba1c4e56ed7856977fff9f3" +checksum = "ca41bd14a6c400486463a5b0e7e8916b1c7bad554a382f62c3b11bd58dea5934" dependencies = [ "amplify", "amplify_syn", @@ -588,9 +574,9 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.11.0-beta.6" +version = "0.11.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b350bc4d1c5992571e3323810921d0eb4a65a3171cbf06fd1b9d1249cf1c3339" +checksum = "538b69bbb2f7259c1d07334fa8adae0006c8b559efbdb6daafacb6df249b897b" dependencies = [ "amplify", "commit_encoding_derive", @@ -603,15 +589,15 @@ 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", ] @@ -672,7 +658,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -683,7 +669,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -698,12 +684,13 @@ dependencies = [ [[package]] name = "descriptors" -version = "0.11.0-beta.6" -source = "git+https://github.com/BP-WG/bp-std?branch=master#b664d65aeec68b11b42fa55d6b82d0e66228a0be" +version = "0.11.0-beta.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b6883b7b23aedc5a2ff149a54b0f57496935be3fd4b453f0c76361b08f5649" dependencies = [ "amplify", "bp-derive", - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", ] @@ -715,6 +702,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", + "subtle", ] [[package]] @@ -740,9 +728,9 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "either" @@ -752,9 +740,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[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", @@ -762,9 +750,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", @@ -791,9 +779,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" dependencies = [ "crc32fast", "miniz_oxide", @@ -837,8 +825,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -879,12 +869,6 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -898,12 +882,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] -name = "hex-conservative" -version = "0.2.1" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "arrayvec", + "digest", ] [[package]] @@ -973,9 +957,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -993,9 +977,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -1014,18 +998,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +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", ] @@ -1044,18 +1028,18 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1188,9 +1172,12 @@ 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" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "prettyplease" @@ -1199,7 +1186,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1213,15 +1200,16 @@ dependencies = [ [[package]] name = "psbt" -version = "0.11.0-beta.6" -source = "git+https://github.com/BP-WG/bp-std?branch=master#b664d65aeec68b11b42fa55d6b82d0e66228a0be" +version = "0.11.0-beta.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2afd0eef00260666da5c2c72e61c23bd2e07076e0791ea4cc3e79ab408246a17" dependencies = [ "amplify", "base64", "bp-derive", "chrono", "descriptors", - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", ] @@ -1277,9 +1265,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -1370,27 +1358,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.4" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls" -version = "0.23.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "aws-lc-rs", "log", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -1399,15 +1374,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "aws-lc-rs", "ring", @@ -1443,40 +1418,41 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -1501,7 +1477,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_derive", "serde_json", @@ -1518,7 +1494,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1527,7 +1503,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.4.0", "itoa", "ryu", "serde", @@ -1579,23 +1555,24 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strict_encoding" -version = "2.7.0-beta.4" +version = "2.7.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2854135bbecf01fac5bae609ec3408e130259670424e2cd755660556d239c92" +checksum = "662b8c3ff360ff33370e6875dd5bdcbf3cecc992241f30e5f7071227ef693451" dependencies = [ "amplify", "half", "strict_encoding_derive", + "wasm-bindgen", ] [[package]] name = "strict_encoding_derive" -version = "2.7.0-beta.3" +version = "2.7.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475fa6f1fdde6e0555422b5111ad34bde30a1459af3599f920c3af9829772c0e" +checksum = "0ad171ee0ac09497f5f87d90bb36acc21992fb58f3565ad8c2663160c07c306d" dependencies = [ "amplify_syn", - "heck 0.4.1", + "heck", "proc-macro2", "quote", "syn 1.0.109", @@ -1603,17 +1580,18 @@ dependencies = [ [[package]] name = "strict_types" -version = "2.7.0-beta.4" +version = "2.7.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a5479921604482fd8775ec07fbb9075c92e12649358d1f70dc9552783d0d1e" +checksum = "e6e182f593e9c4f02ccfcea7929bef866cff12a3f8e213338ce48a706bb263c1" dependencies = [ "amplify", "baid64", "half", - "indexmap 2.2.6", + "indexmap 2.4.0", "sha2", "strict_encoding", "vesper-lang", + "wasm-bindgen", ] [[package]] @@ -1651,9 +1629,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.71" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -1662,22 +1640,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] [[package]] @@ -1728,9 +1706,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -1740,20 +1718,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.15" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", @@ -1811,22 +1789,21 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.7" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ "base64", "flate2", "log", "once_cell", - "rustls 0.22.4", + "rustls", "rustls-pki-types", - "rustls-webpki", "serde", "serde_json", "socks", "url", - "webpki-roots 0.26.3", + "webpki-roots", ] [[package]] @@ -1848,9 +1825,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[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 = "vesper-lang" @@ -1870,34 +1847,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.71", + "syn 2.0.75", "wasm-bindgen-shared", ] [[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", @@ -1905,28 +1883,22 @@ 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.71", + "syn 2.0.75", "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" - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "webpki-roots" @@ -2121,13 +2093,34 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.13" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] +[[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.75", +] + [[package]] name = "zeroize" version = "1.8.1" @@ -2145,5 +2138,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn 2.0.75", ] diff --git a/Cargo.toml b/Cargo.toml index 275cb43..d632e42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,23 +3,23 @@ members = ["."] exclude = ["convert"] [workspace.package] -version = "0.11.0-beta.6.1" +version = "0.11.0-beta.7" keywords = ["bitcoin", "wallet", "descriptor-wallet", "psbt", "taproot"] categories = ["cryptography::cryptocurrencies"] authors = ["Dr Maxim Orlovsky "] homepage = "https://lnp-bp.org" repository = "https://github.com/BP-WG/bp-wallet" -rust-version = "1.75.0" # Due to bp-std +rust-version = "1.76.0" # Due to inspect_err edition = "2021" license = "Apache-2.0" [workspace.dependencies] -amplify = "4.6.0" -bp-std = "0.11.0-beta.6" -psbt = "0.11.0-beta.6" -descriptors = "0.11.0-beta.6" -bp-esplora = { version = "0.11.0-beta.6", default-features = false, features = ["blocking"] } -bp-electrum = "0.11.0-beta.6" +amplify = "4.7.0" +bp-std = "0.11.0-beta.7" +psbt = "0.11.0-beta.7" +descriptors = "0.11.0-beta.7" +bp-esplora = { version = "0.11.0-beta.7", default-features = false, features = ["blocking"] } +bp-electrum = "0.11.0-beta.7" serde_crate = { package = "serde", version = "1", features = ["derive"] } serde_json = "1.0.114" serde_yaml = "0.9.19" @@ -76,8 +76,8 @@ colored = { version = "2", optional = true } # Cli-only: base64 = { version = "0.22.1", optional = true } -env_logger = { version = "0.11.3", optional = true } -clap = { version = "4.4.8", features = ["derive", "env"], optional = true } +env_logger = { version = "0.11.5", optional = true } +clap = { version = "4.5.16", features = ["derive", "env"], optional = true } shellexpand = { version = "3.1.0", optional = true } [features] @@ -91,11 +91,3 @@ esplora = ["bp-esplora"] mempool = ["esplora"] fs = ["serde"] serde = ["serde_crate", "serde_yaml", "toml", "bp-std/serde"] - -[patch.crates-io] -bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "master" } -bp-invoice = { git = "https://github.com/BP-WG/bp-std", branch = "master" } -bp-derive = { git = "https://github.com/BP-WG/bp-std", branch = "master" } -descriptors = { git = "https://github.com/BP-WG/bp-std", branch = "master" } -psbt = { git = "https://github.com/BP-WG/bp-std", branch = "master" } -bp-std = { git = "https://github.com/BP-WG/bp-std", branch = "master" } diff --git a/MANIFEST.yml b/MANIFEST.yml index 3e30cdd..33b1364 100644 --- a/MANIFEST.yml +++ b/MANIFEST.yml @@ -3,7 +3,7 @@ Type: Library Kind: Free software License: Apache-2.0 Language: Rust -Compiler: 1.70 +Compiler: 1.75 Author: Maxim Orlovsky Maintained: LNP/BP Standards Association, Switzerland Maintainers: diff --git a/README.md b/README.md index 2b269f7..8f22d5b 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,21 @@ # Bitcoin protocol command-line wallet & tools -![Build](https://github.com/BP-WG/bp-tools/workflows/Build/badge.svg) -![Tests](https://github.com/BP-WG/bp-tools/workflows/Tests/badge.svg) -![Lints](https://github.com/BP-WG/bp-tools/workflows/Lints/badge.svg) -[![codecov](https://codecov.io/gh/BP-WG/bp-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/BP-WG/bp-tools) +![Build](https://github.com/BP-WG/bp-wallet/workflows/Build/badge.svg) +![Tests](https://github.com/BP-WG/bp-wallet/workflows/Tests/badge.svg) +![Lints](https://github.com/BP-WG/bp-wallet/workflows/Lints/badge.svg) +[![codecov](https://codecov.io/gh/BP-WG/bp-wallet/branch/master/graph/badge.svg)](https://codecov.io/gh/BP-WG/bp-wallet) -[![crates.io](https://img.shields.io/crates/v/bp-tools)](https://crates.io/crates/bp-tools) -[![Docs](https://docs.rs/bp-tools/badge.svg)](https://docs.rs/bp-tools) -[![Apache-2 licensed](https://img.shields.io/crates/l/bp-tools)](./LICENSE) +[![crates.io](https://img.shields.io/crates/v/bp-wallet)](https://crates.io/crates/bp-wallet) +[![Docs](https://docs.rs/bp-wallet/badge.svg)](https://docs.rs/bp-wallet) +[![Apache-2 licensed](https://img.shields.io/crates/l/bp-wallet)](./LICENSE) -Modern, minimalistic & standard-compliant cold wallet from [LNP/BP Standards +Modern, minimalistic & standard-compliant cold wallet from [LNP/BP Standards Association][Assoc]. - ## Contributing Contribution guidelines can be found in [CONTRIBUTING](CONTRIBUTING.md) - ## More information ### MSRV diff --git a/SECURITY.md b/SECURITY.md index 22101c1..78489f2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,10 +1,10 @@ # Security -We take the security of our software products and services seriously, which +We take the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations. -If you believe you have found a security vulnerability in any of our repository -that meets [definition of a security vulnerability][definition], please report +If you believe you have found a security vulnerability in any of our repository +that meets [definition of a security vulnerability][definition], please report it to us as described below. ## Reporting Security Issues @@ -14,8 +14,8 @@ it to us as described below. Instead, please report them to the repository maintainers by sending a **GPG encrypted e-mail** to _all maintainers of a specific repo_ using their GPG keys. -A list of repository maintainers and their keys and e-mail addresses are -provided inside MAINTANERS.md file and MANIFEST.yml, with the latter also +A list of repository maintainers and their keys and e-mail addresses are +provided inside MAINTAINERS.md file and MANIFEST.yml, with the latter also included in the README.md as a manifest block, which looks in the following way: ```yaml @@ -30,11 +30,11 @@ Maintainers: ... ``` -You should receive a response within 72 hours. If for some reason you do not, -please follow up via email to ensure we received your original message. +You should receive a response within 72 hours. If for some reason you do not, +please follow up via email to ensure we received your original message. -Please include the requested information listed below (as much as you can -provide) to help us better understand the nature and scope of the possible +Please include the requested information listed below (as much as you can +provide) to help us better understand the nature and scope of the possible issue: * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) @@ -56,4 +56,5 @@ We prefer all communications to be in English. We follow the principle of [Coordinated Vulnerability Disclosure][disclosure]. [definition]: https://aka.ms/opensource/security/definition + [disclosure]: https://aka.ms/opensource/security/cvd diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 0000000..0af4aa1 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,8 @@ +[files] +# exclude the directory "stl/" +extend-exclude = ["stl/"] + +[default.extend-words] +# Don't correct the name "Jon Atack". +Atack = "Atack" +deriver = "deriver" diff --git a/convert/Cargo.toml b/convert/Cargo.toml index 3a8d64e..01deaac 100644 --- a/convert/Cargo.toml +++ b/convert/Cargo.toml @@ -2,11 +2,11 @@ [package] name = "bp-convert" -version = "0.11.0-beta.6" +version = "0.11.0-beta.7" description = "Convertor between bp-wallet and rust-bitcoin data types" keywords = ["bitcoin", "wallet"] categories = ["cryptography::cryptocurrencies"] -readme = "README.md" +readme = "../README.md" authors = ["Dr Maxim Orlovsky "] homepage = "https://lnp-bp.org" repository = "https://github.com/BP-WG/bp-wallet" diff --git a/flake.lock b/flake.lock deleted file mode 100644 index c034e7d..0000000 --- a/flake.lock +++ /dev/null @@ -1,85 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1713714899, - "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "flake-utils" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713924823, - "narHash": "sha256-kOeyS3GFwgnKvzuBMmFqEAX0xwZ7Nj4/5tXuvpZ0d4U=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "8a2edac3ae926a2a6ce60f4595dcc4540fc8cad4", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index d7629d6..0000000 --- a/flake.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-utils.follows = "flake-utils"; - }; - - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { self, rust-overlay, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - overlays = [ (import rust-overlay) ]; - pkgs = import nixpkgs { - inherit system overlays; - }; - - commonPackages = with pkgs; [ - openssl - pkg-config - ]; - cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); - - stableWithLlvm = pkgs.rust-bin.nightly.latest.default.override { - extensions = [ "rustfmt" "llvm-tools-preview" ]; - targets = [ ]; - }; - in - with pkgs; - { - devShells = rec { - default = msrv; - - msrv = mkShell { - buildInputs = commonPackages ++ [ - rust-bin.stable."${cargoToml.workspace."rust-version"}".default - ]; - }; - - stable = mkShell { - buildInputs = commonPackages ++ [ - rust-bin.stable.latest.default - ]; - }; - - beta = mkShell { - buildInputs = commonPackages ++ [ - rust-bin.beta.latest.default - ]; - }; - - nightly = mkShell { - buildInputs = commonPackages ++ [ - rust-bin.nightly.latest.default - ]; - }; - - codecov = mkShell { - buildInputs = commonPackages ++ [ - stableWithLlvm - ]; - CARGO_INCREMENTAL = "0"; - RUSTFLAGS = "-Cinstrument-coverage"; - RUSTDOCFLAGS = "-Cinstrument-coverage"; - }; - }; - } - ); -} diff --git a/src/bip43.rs b/src/bip43.rs index 0228aa6..a827329 100644 --- a/src/bip43.rs +++ b/src/bip43.rs @@ -393,7 +393,7 @@ impl DerivationStandard for Bip43 { fn to_origin_derivation(&self, testnet: bool) -> DerivationPath { let mut path = Vec::with_capacity(2); if let Some(purpose) = self.purpose() { - path.push(purpose.into()) + path.push(purpose) } path.push(if testnet { HardenedIndex::ONE } else { HardenedIndex::ZERO }); path.into() @@ -407,9 +407,9 @@ impl DerivationStandard for Bip43 { let mut path = Vec::with_capacity(4); path.push(account_index); if self == &Bip43::Bip48Native { - path.push(HardenedIndex::from(2u8).into()); + path.push(HardenedIndex::from(2u8)); } else if self == &Bip43::Bip48Nested { - path.push(HardenedIndex::from(1u8).into()); + path.push(HardenedIndex::ONE); } let mut derivation = self.to_origin_derivation(testnet); derivation.extend(&path); diff --git a/src/cli/args.rs b/src/cli/args.rs index 8a9c716..dae8539 100644 --- a/src/cli/args.rs +++ b/src/cli/args.rs @@ -67,7 +67,7 @@ pub struct Args Args { pub fn translate(&self, cmd: &C1) -> Args { Args { - verbose: self.verbose.clone(), + verbose: self.verbose, wallet: self.wallet.clone(), resolver: self.resolver.clone(), sync: self.sync, @@ -114,6 +114,7 @@ impl Args { }) } + #[allow(clippy::multiple_bound_locations)] pub fn bp_wallet( &self, conf: &Config, diff --git a/src/cli/command.rs b/src/cli/command.rs index e1d6349..23c2a9c 100644 --- a/src/cli/command.rs +++ b/src/cli/command.rs @@ -314,7 +314,7 @@ impl Exec for Args { psbt: psbt_path, tx, } => { - let mut psbt = psbt_read(&psbt_path)?; + let mut psbt = psbt_read(psbt_path)?; if psbt.is_finalized() { eprintln!("The PSBT is already finalized"); } else { @@ -322,7 +322,7 @@ impl Exec for Args { psbt_finalize(&mut psbt, wallet.descriptor())?; } - psbt_write(&psbt, &psbt_path)?; + psbt_write(&psbt, psbt_path)?; if let Ok(tx) = psbt_extract(&psbt, *publish, tx.as_deref()) { if *publish { let indexer = self.indexer()?; @@ -337,7 +337,7 @@ impl Exec for Args { psbt: psbt_path, tx, } => { - let mut psbt = psbt_read(&psbt_path)?; + let mut psbt = psbt_read(psbt_path)?; if !psbt.is_finalized() { let wallet = self.bp_wallet::(&config)?; psbt_finalize(&mut psbt, wallet.descriptor())?; @@ -492,7 +492,7 @@ impl Exec for Args { ); } BpCommand::Inspect { psbt } => { - let psbt = psbt_read(&psbt)?; + let psbt = psbt_read(psbt)?; println!( "{}", serde_yaml::to_string(&psbt).expect("unable to generate YAML representation") @@ -549,7 +549,7 @@ fn psbt_read(psbt_path: &Path) -> Result { fn psbt_write(psbt: &Psbt, psbt_path: &Path) -> Result<(), ExecError> { eprint!("Saving PSBT to file {} ... ", psbt_path.display()); - let mut psbt_file = File::create(&psbt_path)?; + let mut psbt_file = File::create(psbt_path)?; psbt.encode(psbt.version, &mut psbt_file)?; eprintln!("success"); Ok(()) @@ -558,7 +558,7 @@ fn psbt_write(psbt: &Psbt, psbt_path: &Path) -> Result<(), ExecError> { fn psbt_write_or_print(psbt: &Psbt, psbt_path: Option<&Path>) -> Result<(), ExecError> { match psbt_path { Some(file_name) => { - psbt_write(&psbt, file_name)?; + psbt_write(psbt, file_name)?; } None => match psbt.version { PsbtVer::V0 => println!("{psbt}"), diff --git a/src/cli/config.rs b/src/cli/config.rs index acc888e..0d51515 100644 --- a/src/cli/config.rs +++ b/src/cli/config.rs @@ -43,12 +43,10 @@ impl Config { fs::read_to_string(conf_path) .map_err(|err| { error!("Unable to read config file: {err:?}"); - () }) .and_then(|s| { toml::from_str(&s).map_err(|err| { error!("Unable to parse config file: {err}"); - () }) }) .unwrap_or_else(|_| { diff --git a/src/cli/opts.rs b/src/cli/opts.rs index 6060d86..224931e 100644 --- a/src/cli/opts.rs +++ b/src/cli/opts.rs @@ -29,7 +29,7 @@ use descriptors::{Descriptor, StdDescr, TrKey, Wpkh}; use strict_encoding::Ident; pub const DATA_DIR_ENV: &str = "LNPBP_DATA_DIR"; -#[cfg(any(target_os = "linux"))] +#[cfg(target_os = "linux")] pub const DATA_DIR: &str = "~/.lnp-bp"; #[cfg(any(target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))] pub const DATA_DIR: &str = "~/.lnp-bp"; @@ -114,10 +114,8 @@ impl DescriptorOpts for DescrStdOpts { fn descriptor(&self) -> Option { if let Some(ref x) = self.tr_key_only { Some(TrKey::from(x.clone()).into()) - } else if let Some(ref x) = self.wpkh { - Some(Wpkh::from(x.clone()).into()) } else { - None + self.wpkh.as_ref().map(|x| Wpkh::from(x.clone()).into()) } } } diff --git a/src/hot/command.rs b/src/hot/command.rs index 0d976b8..b5812dd 100644 --- a/src/hot/command.rs +++ b/src/hot/command.rs @@ -171,7 +171,7 @@ fn get_password( return Err(std::io::Error::new( std::io::ErrorKind::Other, "password set by environment is not a valid unicode string", - )) + )); } Err(VarError::NotPresent) => None, } @@ -209,11 +209,10 @@ fn seed(output_file: &Path) -> Result<(), DataError> { let seed_password = get_password(Some(SEED_PASSWORD_ENVVAR), "Seed password:", false)?; seed.write(output_file, &seed_password)?; - if let Err(e) = Seed::read(output_file, &seed_password) { + Seed::read(output_file, &seed_password).inspect_err(|_| { eprintln!("Unable to save seed file"); - fs::remove_file(output_file)?; - return Err(e.into()); - } + let _ = fs::remove_file(output_file); + })?; info_seed(seed, false); @@ -298,11 +297,10 @@ fn derive( let account = seed.derive(scheme, !mainnet, account); account.write(output_file, &account_password)?; - if let Err(e) = XprivAccount::read(output_file, &account_password) { + XprivAccount::read(output_file, &account_password).inspect_err(|_| { eprintln!("Unable to save account file"); - fs::remove_file(output_file)?; - return Err(e.into()); - } + let _ = fs::remove_file(output_file); + })?; info_account(account, false); diff --git a/src/hot/mod.rs b/src/hot/mod.rs index 812db55..f029a5c 100644 --- a/src/hot/mod.rs +++ b/src/hot/mod.rs @@ -62,7 +62,7 @@ mod io { let key = Sha256::digest(key.as_ref()); let key = aes_gcm::Key::::from_slice(key.as_slice()); let nonce = Nonce::::from_slice(&encrypted[..12]); - Aes256Gcm::new(key).decrypt(&nonce, &encrypted[12..]) + Aes256Gcm::new(key).decrypt(nonce, &encrypted[12..]) } #[derive(Clone, Eq, PartialEq, Debug, Display, Error, From)] diff --git a/src/hot/password.rs b/src/hot/password.rs index 352b268..c93226c 100644 --- a/src/hot/password.rs +++ b/src/hot/password.rs @@ -10,18 +10,16 @@ pub fn calculate_entropy(password: &str) -> f64 { fn calculate_charset(password: &str) -> f64 { let mut charset = 0u32; - if password.bytes().any(|byte| byte >= b'0' && byte <= b'9') { + if password.as_bytes().iter().any(u8::is_ascii_digit) { charset += 10; // Numbers } - if password.bytes().any(|byte| byte >= b'a' && byte <= b'z') { + if password.as_bytes().iter().any(u8::is_ascii_lowercase) { charset += 26; // Lowercase letters } - if password.bytes().any(|byte| byte >= b'A' && byte <= b'Z') { + if password.as_bytes().iter().any(u8::is_ascii_uppercase) { charset += 26; // Uppercase letters } - if password.bytes().any(|byte| { - byte < b'0' || (byte > b'9' && byte < b'A') || (byte > b'Z' && byte < b'a') || byte > b'z' - }) { + if !password.as_bytes().iter().all(u8::is_ascii_alphanumeric) { charset += 33; // Special characters, rough estimation } diff --git a/src/hot/signer.rs b/src/hot/signer.rs index da4841b..ae73630 100644 --- a/src/hot/signer.rs +++ b/src/hot/signer.rs @@ -40,9 +40,9 @@ pub struct SignTxInfo { pub struct ConsoleSigner<'descr, 'me, D: Descriptor> where Self: 'me { - descriptor: &'descr D, - account: XprivAccount, - signer: XprivSigner<'me>, + pub descriptor: &'descr D, + pub account: XprivAccount, + pub signer: XprivSigner<'me>, } pub struct XprivSigner<'xpriv> { diff --git a/src/indexers/electrum.rs b/src/indexers/electrum.rs index a9d4748..3c9d8a4 100644 --- a/src/indexers/electrum.rs +++ b/src/indexers/electrum.rs @@ -164,7 +164,7 @@ impl Indexer for Client { .unwrap_or(NonZeroU32::MIN), time: blocktime, block_hash: BlockHash::from_str(blockhash) - .expect("blockhash sould deserialize"), + .expect("blockhash should deserialize"), }) }; // get inputs to build TxCredit's and total amount, @@ -336,11 +336,7 @@ impl Indexer for Client { .insert(wallet_addr.expect_transmute()); } - if errors.is_empty() { - MayError::ok(cache) - } else { - MayError::err(cache, errors) - } + if errors.is_empty() { MayError::ok(cache) } else { MayError::err(cache, errors) } } fn update, L2: Layer2>( diff --git a/src/indexers/esplora.rs b/src/indexers/esplora.rs index 3e64889..41c9c81 100644 --- a/src/indexers/esplora.rs +++ b/src/indexers/esplora.rs @@ -72,6 +72,7 @@ impl Client { /// # Errors /// /// Returns an error if the client fails to connect to the Esplora server. + #[allow(clippy::result_large_err)] pub fn new_esplora(url: &str) -> Result { let inner = esplora::Builder::new(url).build_blocking()?; let client = Self { @@ -156,6 +157,7 @@ impl From for WalletTx { /// # Errors /// /// Returns an error if there was a problem retrieving the transactions. +#[allow(clippy::result_large_err)] fn get_scripthash_txs_all( client: &Client, derive: &DerivedAddr, @@ -300,11 +302,7 @@ impl Indexer for Client { .insert(wallet_addr.expect_transmute()); } - if errors.is_empty() { - MayError::ok(cache) - } else { - MayError::err(cache, errors) - } + if errors.is_empty() { MayError::ok(cache) } else { MayError::err(cache, errors) } } fn update, L2: Layer2>( diff --git a/src/indexers/mempool.rs b/src/indexers/mempool.rs index b615a8b..19292ad 100644 --- a/src/indexers/mempool.rs +++ b/src/indexers/mempool.rs @@ -34,6 +34,7 @@ impl super::esplora::Client { /// /// A `Result` containing the new mempool client if successful, or an `esplora::Error` if an /// error occurred. + #[allow(clippy::result_large_err)] pub fn new_mempool(url: &str) -> Result { let inner = esplora::Builder::new(url).build_blocking()?; let client = Self { @@ -45,9 +46,10 @@ impl super::esplora::Client { } pub trait Mempool { + #[allow(clippy::result_large_err)] fn address_txs( &self, - address: &String, + address: &str, last_seen: Option, ) -> Result, esplora::Error>; } @@ -68,7 +70,7 @@ impl Mempool for BlockingClient { /// during the retrieval process. fn address_txs( &self, - address: &String, + address: &str, last_seen: Option, ) -> Result, esplora::Error> { let url = self.url(); diff --git a/src/indexers/mod.rs b/src/indexers/mod.rs index 2ffb561..defa819 100644 --- a/src/indexers/mod.rs +++ b/src/indexers/mod.rs @@ -37,7 +37,7 @@ use descriptors::Descriptor; use crate::{Layer2, MayError, WalletCache, WalletDescr}; #[cfg(any(feature = "electrum", feature = "esplora"))] -pub(self) const BATCH_SIZE: u8 = 10; +const BATCH_SIZE: u8 = 10; pub trait Indexer { type Error; diff --git a/src/wallet.rs b/src/wallet.rs index 443fdb3..a4a1f89 100644 --- a/src/wallet.rs +++ b/src/wallet.rs @@ -412,8 +412,7 @@ where Self: Save let keychain = keychain.into(); let index = self.next_derivation_index(keychain, shift); self.addresses(keychain) - .skip(index.index() as usize) - .next() + .nth(index.index() as usize) .expect("address iterator always can produce address") .addr } @@ -579,9 +578,7 @@ pub mod fs { let cache = fs::read_to_string(files.cache) .map_err(|_| Warning::CacheAbsent) - .and_then(|cache| { - serde_yaml::from_str(&cache).map_err(|err| Warning::CacheDamaged(err)) - }) + .and_then(|cache| serde_yaml::from_str(&cache).map_err(Warning::CacheDamaged)) .unwrap_or_else(|warn| { warnings.push(warn); WalletCache::default()