├── .github └── workflows │ ├── cron-daily-fuzz.yml │ └── rust.yaml ├── .gitignore ├── CHANGELOG.md ├── Cargo-minimal.lock ├── Cargo-recent.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── client ├── CHANGELOG.md ├── Cargo.toml ├── LICENSE ├── README.md ├── contrib │ └── test_vars.sh └── src │ ├── client_sync │ ├── error.rs │ ├── mod.rs │ ├── v17 │ │ ├── blockchain.rs │ │ ├── control.rs │ │ ├── generating.rs │ │ ├── mod.rs │ │ ├── network.rs │ │ ├── raw_transactions.rs │ │ └── wallet.rs │ ├── v18.rs │ ├── v19 │ │ ├── mod.rs │ │ └── wallet.rs │ ├── v20.rs │ ├── v21.rs │ ├── v22 │ │ ├── mod.rs │ │ └── wallet.rs │ ├── v23.rs │ ├── v24.rs │ ├── v25.rs │ ├── v26.rs │ ├── v27.rs │ └── v28.rs │ └── lib.rs ├── clippy.toml ├── contrib ├── crates.sh ├── run_bitcoind.sh └── update-lock-files.sh ├── fuzz ├── .gitignore ├── Cargo.toml ├── README.md ├── cycle.sh ├── fuzz-util.sh ├── fuzz.sh ├── fuzz_targets │ ├── minreq_http.rs │ └── simple_http.rs └── generate-files.sh ├── integration_test ├── Cargo.toml ├── src │ ├── lib.rs │ ├── v17 │ │ ├── blockchain.rs │ │ ├── control.rs │ │ ├── generating.rs │ │ ├── mod.rs │ │ ├── network.rs │ │ ├── raw_transactions.rs │ │ └── wallet.rs │ ├── v19 │ │ ├── mod.rs │ │ └── wallet.rs │ └── v22 │ │ ├── mod.rs │ │ └── wallet.rs └── tests │ ├── v17_api.rs │ ├── v18_api.rs │ ├── v19_api.rs │ ├── v20_api.rs │ ├── v21_api.rs │ ├── v22_api.rs │ ├── v23_api.rs │ ├── v24_api.rs │ ├── v25_api.rs │ ├── v26_api.rs │ ├── v27_api.rs │ └── v28_api.rs ├── json ├── CHANGELOG.md ├── Cargo.toml ├── LICENSE ├── README.md ├── contrib │ └── test_vars.sh └── src │ ├── lib.rs │ ├── model │ ├── blockchain.rs │ ├── control.rs │ ├── generating.rs │ ├── mining.rs │ ├── mod.rs │ ├── network.rs │ ├── raw_transactions.rs │ ├── util.rs │ ├── wallet.rs │ └── zmq.rs │ ├── v17 │ ├── blockchain.rs │ ├── control.rs │ ├── generating.rs │ ├── mining.rs │ ├── mod.rs │ ├── network.rs │ ├── raw_transactions.rs │ ├── rpc-api.txt │ ├── util.rs │ ├── wallet.rs │ └── zmq.rs │ ├── v18 │ ├── mod.rs │ └── rpc-api.txt │ ├── v19 │ ├── blockchain.rs │ ├── mod.rs │ ├── rpc-api.txt │ └── wallet.rs │ ├── v20 │ ├── mod.rs │ └── rpc-api.txt │ ├── v21 │ ├── mod.rs │ └── rpc-api.txt │ ├── v22 │ ├── mod.rs │ ├── rpc-api.txt │ └── wallet.rs │ ├── v23 │ ├── mod.rs │ └── rpc-api.txt │ ├── v24 │ ├── mod.rs │ └── rpc-api.txt │ ├── v25 │ ├── mod.rs │ ├── rpc-api.txt │ └── wallet.rs │ ├── v26 │ ├── mod.rs │ └── rpc-api.txt │ ├── v27 │ ├── mod.rs │ └── rpc-api.txt │ └── v28 │ ├── blockchain.rs │ ├── mod.rs │ ├── network.rs │ └── rpc-api.txt ├── jsonrpc ├── Cargo.toml ├── README.md ├── contrib │ └── test_vars.sh └── src │ ├── client.rs │ ├── error.rs │ ├── http │ ├── minreq_http.rs │ ├── mod.rs │ └── simple_http.rs │ ├── lib.rs │ ├── simple_tcp.rs │ └── simple_uds.rs ├── justfile ├── nightly-version ├── notes.md ├── regtest ├── CHANGELOG.md ├── Cargo.toml ├── LICENSE ├── README.md ├── build.rs ├── sha256 │ ├── bitcoin-core-0.17.1-SHA256SUMS.asc │ ├── bitcoin-core-0.18.1-SHA256SUMS.asc │ ├── bitcoin-core-0.19.1-SHA256SUMS.asc │ ├── bitcoin-core-0.20.2-SHA256SUMS.asc │ ├── bitcoin-core-0.21.2-SHA256SUMS.asc │ ├── bitcoin-core-22.0-SHA256SUMS │ ├── bitcoin-core-22.1-SHA256SUMS │ ├── bitcoin-core-23.0-SHA256SUMS │ ├── bitcoin-core-23.1-SHA256SUMS │ ├── bitcoin-core-23.2-SHA256SUMS │ ├── bitcoin-core-24.0.1-SHA256SUMS │ ├── bitcoin-core-24.1-SHA256SUMS │ ├── bitcoin-core-24.2-SHA256SUMS │ ├── bitcoin-core-25.0-SHA256SUMS │ ├── bitcoin-core-25.1-SHA256SUMS │ ├── bitcoin-core-25.2-SHA256SUMS │ ├── bitcoin-core-26.0-SHA256SUMS │ ├── bitcoin-core-26.1-SHA256SUMS │ ├── bitcoin-core-26.2-SHA256SUMS │ ├── bitcoin-core-27.0-SHA256SUMS │ ├── bitcoin-core-27.1-SHA256SUMS │ └── bitcoin-core-28.0-SHA256SUMS └── src │ ├── client_versions.rs │ ├── lib.rs │ └── versions.rs └── rustfmt.toml /.github/workflows/cron-daily-fuzz.yml: -------------------------------------------------------------------------------- 1 | # Automatically generated by fuzz/generate-files.sh 2 | name: Fuzz 3 | on: 4 | schedule: 5 | # 6am every day UTC, this correlates to: 6 | # - 11pm PDT 7 | # - 7am CET 8 | # - 5pm AEDT 9 | - cron: '00 06 * * *' 10 | 11 | jobs: 12 | fuzz: 13 | if: ${{ !github.event.act }} 14 | runs-on: ubuntu-latest 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | # We only get 20 jobs at a time, we probably don't want to go 19 | # over that limit with fuzzing because of the hour run time. 20 | fuzz_target: [ 21 | minreq_http, 22 | simple_http, 23 | ] 24 | steps: 25 | - name: Install test dependencies 26 | run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev 27 | - uses: actions/checkout@v4 28 | - uses: actions/cache@v4 29 | id: cache-fuzz 30 | with: 31 | path: | 32 | ~/.cargo/bin 33 | fuzz/target 34 | target 35 | key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} 36 | - uses: dtolnay/rust-toolchain@stable 37 | with: 38 | toolchain: '1.65.0' 39 | - name: fuzz 40 | run: | 41 | if [[ "${{ matrix.fuzz_target }}" =~ ^bitcoin ]]; then 42 | export RUSTFLAGS='--cfg=hashes_fuzz --cfg=secp256k1_fuzz' 43 | fi 44 | echo "Using RUSTFLAGS $RUSTFLAGS" 45 | cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}" 46 | - run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }} 47 | - uses: actions/upload-artifact@v3 48 | with: 49 | name: executed_${{ matrix.fuzz_target }} 50 | path: executed_${{ matrix.fuzz_target }} 51 | 52 | verify-execution: 53 | if: ${{ !github.event.act }} 54 | needs: fuzz 55 | runs-on: ubuntu-latest 56 | steps: 57 | - uses: actions/checkout@v4 58 | - uses: actions/download-artifact@v3 59 | - name: Display structure of downloaded files 60 | run: ls -R 61 | - run: find executed_* -type f -exec cat {} + | sort > executed 62 | - run: source ./fuzz/fuzz-util.sh && listTargetNames | sort | diff - executed 63 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # gitignore for rust-bitcoin-core-json-rpc 2 | 3 | Cargo.lock 4 | **/target 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # unreleased 2 | 3 | - Add support for Bitcoin Core versions `26.1`, `26.2`, `27.0`, and `27.1` [#21](https://github.com/rust-bitcoin/rust-bitcoind-json-rpc/pull/21) 4 | - Import `jsonrpc` crate [#19](https://github.com/rust-bitcoin/rust-bitcoind-json-rpc/pull/19) 5 | - Bump MSRV to Rust `v1.63.0` [#17](https://github.com/rust-bitcoin/rust-bitcoind-json-rpc/pull/17) 6 | - Migrate repo to `github.com/rust-bitcoin` org (from `github.com/tcharding`). 7 | 8 | # 0.3 - June 2024 9 | 10 | - Switch from implementing `TryFrom` to implementing inherent `into_model` function [#9](https://github.com/rust-bitcoin/rust-bitcoind-json-rpc/pull/9) 11 | 12 | # 0.2 - June 2024 13 | 14 | The first two versions were what was needed to get integration testing 15 | in `rust-miniscript` to be able to use this crate. -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = ["client", "json", "jsonrpc"] 3 | exclude = ["integration_test", "regtest"] 4 | resolver = "2" 5 | 6 | [patch.crates-io.bitcoind-json-rpc-client] 7 | path = "client" 8 | 9 | [patch.crates-io.bitcoind-json-rpc-types] 10 | path = "json" 11 | 12 | [patch.crates-io.jsonrpc] 13 | path = "jsonrpc" 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ARCHIVED `bitcoind` JSON-RPC support 2 | 3 | This repository has been archived because it was re-named (see issue 4 | #48). All development is now done at https://github.com/rust-bitcoin/corepc 5 | 6 | So long and thanks for all the fish. 7 | -------------------------------------------------------------------------------- /client/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.3.0 - 2024-06-21 2 | 3 | - Fix bugs in `AddressType` 4 | 5 | # 0.2.1 - 2024-06-17 6 | 7 | - Enable all features in docs build. 8 | - Fix typos in crate level docs. 9 | 10 | # 0.2.0 - 2024-06-13 11 | 12 | - Use Bitcoin Core 0.17.1 (0.17.2 seems to not exist and have been a mistake). 13 | 14 | # 0.1.0 - 2024-06-13 15 | 16 | Initial release. 17 | 18 | -------------------------------------------------------------------------------- /client/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitcoind-json-rpc-client" 3 | version = "0.3.0" 4 | authors = ["Tobin C. Harding "] 5 | license = "CC0-1.0" 6 | repository = "https://github.com/rust-bitcoin/rust-bitcoind-json-rpc" 7 | description = "Bitcoin Core JSON-RPC client" 8 | categories = ["cryptography::cryptocurrencies"] 9 | keywords = ["bitcoin", "bitcoind", "json-rpc"] 10 | readme = "README.md" 11 | edition = "2021" 12 | rust-version = "1.63.0" 13 | exclude = ["tests", "contrib"] 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | rustdoc-args = ["--cfg", "docsrs"] 18 | 19 | [features] 20 | # Enable this feature to get a blocking JSON-RPC client. 21 | client-sync = ["jsonrpc"] 22 | 23 | [dependencies] 24 | bitcoin = { version = "0.32.0", default-features = false, features = ["std", "serde"] } 25 | json = { package = "bitcoind-json-rpc-types", version = "0.3.0", default-features = false, features = [] } 26 | log = "0.4" 27 | serde = { version = "1.0.103", default-features = false, features = [ "derive", "alloc" ] } 28 | serde_json = { version = "1.0.117" } 29 | 30 | jsonrpc = { version = "0.18.0", features = ["minreq_http"], optional = true } 31 | 32 | [dev-dependencies] 33 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # bitcoind-json-rpc-client 2 | 3 | Rust client for the Bitcoin Core daemon's JSON-RPC API. Currently this 4 | is only a blocking client and is intended to be used in integration testing. 5 | 6 | ## Minimum Supported Rust Version (MSRV) 7 | 8 | This library should always compile with any combination of features on **Rust 1.56.1**. 9 | 10 | ## Licensing 11 | 12 | The code in this project is licensed under the [Creative Commons CC0 1.0 Universal license](LICENSE). 13 | We use the [SPDX license list](https://spdx.org/licenses/) and [SPDX IDs](https://spdx.dev/ids/). 14 | -------------------------------------------------------------------------------- /client/contrib/test_vars.sh: -------------------------------------------------------------------------------- 1 | # No shebang, this file should not be executed. 2 | # shellcheck disable=SC2148 3 | # 4 | # disable verify unused vars, despite the fact that they are used when sourced 5 | # shellcheck disable=SC2034 6 | 7 | # Test all these features with "std" enabled. 8 | FEATURES_WITH_STD="" 9 | 10 | # Test all these features without "std" enabled. 11 | FEATURES_WITHOUT_STD="client-sync" 12 | 13 | # Run these examples. 14 | EXAMPLES="" 15 | -------------------------------------------------------------------------------- /client/src/client_sync/error.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | use std::{error, fmt, io}; 4 | 5 | use bitcoin::{hex, secp256k1}; 6 | 7 | /// The error type for errors produced in this library. 8 | #[derive(Debug)] 9 | pub enum Error { 10 | JsonRpc(jsonrpc::error::Error), 11 | HexToArray(hex::HexToArrayError), 12 | HexToBytes(hex::HexToBytesError), 13 | Json(serde_json::error::Error), 14 | BitcoinSerialization(bitcoin::consensus::encode::FromHexError), 15 | Secp256k1(secp256k1::Error), 16 | Io(io::Error), 17 | InvalidAmount(bitcoin::amount::ParseAmountError), 18 | InvalidCookieFile, 19 | /// The JSON result had an unexpected structure. 20 | UnexpectedStructure, 21 | /// The daemon returned an error string. 22 | Returned(String), 23 | /// The server version did not match what was expected. 24 | ServerVersion(UnexpectedServerVersionError), 25 | /// Missing user/password 26 | MissingUserPassword, 27 | } 28 | 29 | impl From for Error { 30 | fn from(e: jsonrpc::error::Error) -> Error { Error::JsonRpc(e) } 31 | } 32 | 33 | impl From for Error { 34 | fn from(e: hex::HexToArrayError) -> Self { Self::HexToArray(e) } 35 | } 36 | 37 | impl From for Error { 38 | fn from(e: hex::HexToBytesError) -> Self { Self::HexToBytes(e) } 39 | } 40 | 41 | impl From for Error { 42 | fn from(e: serde_json::error::Error) -> Error { Error::Json(e) } 43 | } 44 | 45 | impl From for Error { 46 | fn from(e: bitcoin::consensus::encode::FromHexError) -> Error { Error::BitcoinSerialization(e) } 47 | } 48 | 49 | impl From for Error { 50 | fn from(e: secp256k1::Error) -> Error { Error::Secp256k1(e) } 51 | } 52 | 53 | impl From for Error { 54 | fn from(e: io::Error) -> Error { Error::Io(e) } 55 | } 56 | 57 | impl From for Error { 58 | fn from(e: bitcoin::amount::ParseAmountError) -> Error { Error::InvalidAmount(e) } 59 | } 60 | 61 | impl fmt::Display for Error { 62 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 63 | use Error::*; 64 | 65 | match *self { 66 | JsonRpc(ref e) => write!(f, "JSON-RPC error: {}", e), 67 | HexToArray(ref e) => write!(f, "hex to array decode error: {}", e), 68 | HexToBytes(ref e) => write!(f, "hex to bytes decode error: {}", e), 69 | Json(ref e) => write!(f, "JSON error: {}", e), 70 | BitcoinSerialization(ref e) => write!(f, "Bitcoin serialization error: {}", e), 71 | Secp256k1(ref e) => write!(f, "secp256k1 error: {}", e), 72 | Io(ref e) => write!(f, "I/O error: {}", e), 73 | InvalidAmount(ref e) => write!(f, "invalid amount: {}", e), 74 | InvalidCookieFile => write!(f, "invalid cookie file"), 75 | UnexpectedStructure => write!(f, "the JSON result had an unexpected structure"), 76 | Returned(ref s) => write!(f, "the daemon returned an error string: {}", s), 77 | ServerVersion(ref e) => write!(f, "server version: {}", e), 78 | MissingUserPassword => write!(f, "missing user and/or password"), 79 | } 80 | } 81 | } 82 | 83 | impl error::Error for Error { 84 | fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { 85 | use Error::*; 86 | 87 | match *self { 88 | JsonRpc(ref e) => Some(e), 89 | HexToArray(ref e) => Some(e), 90 | HexToBytes(ref e) => Some(e), 91 | Json(ref e) => Some(e), 92 | BitcoinSerialization(ref e) => Some(e), 93 | Secp256k1(ref e) => Some(e), 94 | Io(ref e) => Some(e), 95 | InvalidAmount(ref e) => Some(e), 96 | ServerVersion(ref e) => Some(e), 97 | InvalidCookieFile | UnexpectedStructure | Returned(_) | MissingUserPassword => None, 98 | } 99 | } 100 | } 101 | 102 | /// Error returned when RPC client expects a different version than bitcoind reports. 103 | #[derive(Debug, Clone, PartialEq, Eq)] 104 | pub struct UnexpectedServerVersionError { 105 | /// Version from server. 106 | pub got: usize, 107 | /// Expected server version. 108 | pub expected: Vec, 109 | } 110 | 111 | impl fmt::Display for UnexpectedServerVersionError { 112 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 113 | let mut expected = String::new(); 114 | for version in &self.expected { 115 | let v = format!(" {} ", version); 116 | expected.push_str(&v); 117 | } 118 | write!(f, "unexpected bitcoind version, got: {} expected one of: {}", self.got, expected) 119 | } 120 | } 121 | 122 | impl error::Error for UnexpectedServerVersionError {} 123 | 124 | impl From for Error { 125 | fn from(e: UnexpectedServerVersionError) -> Self { Self::ServerVersion(e) } 126 | } 127 | -------------------------------------------------------------------------------- /client/src/client_sync/v17/control.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Specifically this is methods found under the `== Control ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | //! 8 | //! All macros require `Client` to be in scope. 9 | //! 10 | //! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `getmemory` 13 | #[macro_export] 14 | macro_rules! impl_client_v17__getmemoryinfo { 15 | () => { 16 | impl Client { 17 | pub fn get_memory_info(&self) -> Result { 18 | self.call("getmemoryinfo", &[]) 19 | } 20 | } 21 | }; 22 | } 23 | 24 | /// Implements bitcoind JSON-RPC API method `logging` 25 | #[macro_export] 26 | macro_rules! impl_client_v17__logging { 27 | () => { 28 | impl Client { 29 | pub fn logging(&self) -> Result { self.call("logging", &[]) } 30 | } 31 | }; 32 | } 33 | 34 | /// Implements bitcoind JSON-RPC API method `stop` 35 | #[macro_export] 36 | macro_rules! impl_client_v17__stop { 37 | () => { 38 | impl Client { 39 | pub fn stop(&self) -> Result { self.call("stop", &[]) } 40 | } 41 | }; 42 | } 43 | 44 | /// Implements bitcoind JSON-RPC API method `uptime` 45 | #[macro_export] 46 | macro_rules! impl_client_v17__uptime { 47 | () => { 48 | impl Client { 49 | pub fn uptime(&self) -> Result { self.call("uptime", &[]) } 50 | } 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /client/src/client_sync/v17/generating.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Specifically this is methods found under the `== Generating ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | //! 8 | //! All macros require `Client` to be in scope. 9 | //! 10 | //! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `generatetoaddress` 13 | #[macro_export] 14 | macro_rules! impl_client_v17__generatetoaddress { 15 | () => { 16 | impl Client { 17 | pub fn generate_to_address( 18 | &self, 19 | nblocks: usize, 20 | address: &bitcoin::Address, 21 | ) -> Result { 22 | self.call("generatetoaddress", &[nblocks.into(), into_json(address)?]) 23 | } 24 | } 25 | }; 26 | } 27 | 28 | /// Implements bitcoind JSON-RPC API method `generate` 29 | #[macro_export] 30 | macro_rules! impl_client_v17__generate { 31 | () => { 32 | impl Client { 33 | pub fn generate(&self, nblocks: usize) -> Result { 34 | self.call("generate", &[nblocks.into()]) 35 | } 36 | } 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /client/src/client_sync/v17/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v0.17.1`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | pub mod blockchain; 8 | pub mod control; 9 | pub mod generating; 10 | pub mod network; 11 | pub mod raw_transactions; 12 | pub mod wallet; 13 | 14 | use bitcoin::address::{Address, NetworkChecked}; 15 | use bitcoin::{Amount, Block, BlockHash, Txid}; 16 | use serde::{Deserialize, Serialize}; 17 | 18 | use crate::client_sync::{handle_defaults, into_json}; 19 | use crate::json::v17::*; 20 | 21 | crate::define_jsonrpc_minreq_client!("v17"); 22 | crate::impl_client_check_expected_server_version!({ [170100] }); 23 | 24 | // == Blockchain == 25 | crate::impl_client_v17__getblockchaininfo!(); 26 | crate::impl_client_v17__getbestblockhash!(); 27 | crate::impl_client_v17__getblock!(); 28 | crate::impl_client_v17__gettxout!(); 29 | crate::impl_client_v17__getblockcount!(); 30 | crate::impl_client_v17__getblockhash!(); 31 | crate::impl_client_v17__getblockheader!(); 32 | crate::impl_client_v17__getblockstats!(); 33 | crate::impl_client_v17__getchaintips!(); 34 | crate::impl_client_v17__getchaintxstats!(); 35 | crate::impl_client_v17__getdifficulty!(); 36 | crate::impl_client_v17__getmempoolancestors!(); 37 | 38 | // == Control == 39 | crate::impl_client_v17__getmemoryinfo!(); 40 | crate::impl_client_v17__logging!(); 41 | crate::impl_client_v17__stop!(); 42 | crate::impl_client_v17__uptime!(); 43 | 44 | // == Generating == 45 | crate::impl_client_v17__generatetoaddress!(); 46 | crate::impl_client_v17__generate!(); 47 | 48 | // == Network == 49 | crate::impl_client_v17__getaddednodeinfo!(); 50 | crate::impl_client_v17__getnettotals!(); 51 | crate::impl_client_v17__getnetworkinfo!(); 52 | crate::impl_client_v17__getpeerinfo!(); 53 | 54 | // == Rawtransactions == 55 | crate::impl_client_v17__sendrawtransaction!(); 56 | 57 | // == Wallet == 58 | crate::impl_client_v17__createwallet!(); 59 | crate::impl_client_v17__unloadwallet!(); 60 | crate::impl_client_v17__loadwallet!(); 61 | crate::impl_client_v17__getnewaddress!(); 62 | crate::impl_client_v17__getbalance!(); 63 | crate::impl_client_v17__sendtoaddress!(); 64 | crate::impl_client_v17__gettransaction!(); 65 | 66 | /// Argument to the `Client::get_new_address_with_type` function. 67 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 68 | #[serde(rename_all = "kebab-case")] 69 | pub enum AddressType { 70 | Legacy, 71 | P2shSegwit, 72 | Bech32, 73 | } 74 | 75 | impl fmt::Display for AddressType { 76 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 77 | use AddressType::*; 78 | 79 | let s = match *self { 80 | Legacy => "legacy", 81 | P2shSegwit => "p2sh-segwit", 82 | Bech32 => "bech32", 83 | }; 84 | fmt::Display::fmt(s, f) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /client/src/client_sync/v17/network.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Requires `Client` to be in scope. 6 | //! 7 | //! Specifically this is methods found under the `== Network ==` section of the 8 | //! API docs of `bitcoind v0.17.1`. 9 | //! 10 | //! See, or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `getaddednodeinfo` 13 | #[macro_export] 14 | macro_rules! impl_client_v17__getaddednodeinfo { 15 | () => { 16 | impl Client { 17 | pub fn get_added_node_info(&self) -> Result { 18 | self.call("getaddednodeinfo", &[]) 19 | } 20 | } 21 | }; 22 | } 23 | 24 | /// Implements bitcoind JSON-RPC API method `getnettotals` 25 | #[macro_export] 26 | macro_rules! impl_client_v17__getnettotals { 27 | () => { 28 | impl Client { 29 | pub fn get_net_totals(&self) -> Result { self.call("getnettotals", &[]) } 30 | } 31 | }; 32 | } 33 | 34 | /// Implements bitcoind JSON-RPC API method `getnetworkinfo` 35 | #[macro_export] 36 | macro_rules! impl_client_v17__getnetworkinfo { 37 | () => { 38 | impl Client { 39 | /// Returns the server version field of `GetNetworkInfo`. 40 | pub fn server_version(&self) -> Result { 41 | let info = self.get_network_info()?; 42 | Ok(info.version) 43 | } 44 | 45 | pub fn get_network_info(&self) -> Result { 46 | self.call("getnetworkinfo", &[]) 47 | } 48 | } 49 | }; 50 | } 51 | 52 | /// Implements bitcoind JSON-RPC API method `getpeerinfo` 53 | #[macro_export] 54 | macro_rules! impl_client_v17__getpeerinfo { 55 | () => { 56 | impl Client { 57 | pub fn get_peer_info(&self) -> Result { self.call("getpeerinfo", &[]) } 58 | } 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /client/src/client_sync/v17/raw_transactions.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Specifically this is methods found under the `== Rawtransactions ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | //! 8 | //! All macros require `Client` to be in scope. 9 | //! 10 | //! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `sendrawtransaction` 13 | #[macro_export] 14 | macro_rules! impl_client_v17__sendrawtransaction { 15 | () => { 16 | impl Client { 17 | pub fn send_raw_transaction( 18 | &self, 19 | tx: &bitcoin::Transaction, 20 | ) -> Result { 21 | let hex = bitcoin::consensus::encode::serialize_hex(tx); 22 | self.call("sendrawtransaction", &[hex.into()]) 23 | } 24 | } 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /client/src/client_sync/v17/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Specifically this is methods found under the `== Wallet ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | //! 8 | //! All macros require `Client` to be in scope. 9 | //! 10 | //! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `createwallet` 13 | #[macro_export] 14 | macro_rules! impl_client_v17__createwallet { 15 | () => { 16 | impl Client { 17 | pub fn create_wallet(&self, wallet: &str) -> Result { 18 | self.call("createwallet", &[wallet.into()]) 19 | } 20 | } 21 | }; 22 | } 23 | 24 | /// Implements bitcoind JSON-RPC API method `unloadwallet` 25 | #[macro_export] 26 | macro_rules! impl_client_v17__unloadwallet { 27 | () => { 28 | impl Client { 29 | pub fn unload_wallet(&self, wallet: &str) -> Result<()> { 30 | self.call("unloadwallet", &[wallet.into()]) 31 | } 32 | } 33 | }; 34 | } 35 | 36 | /// Implements bitcoind JSON-RPC API method `loadwallet` 37 | #[macro_export] 38 | macro_rules! impl_client_v17__loadwallet { 39 | () => { 40 | impl Client { 41 | pub fn load_wallet(&self, wallet: &str) -> Result { 42 | self.call("loadwallet", &[wallet.into()]) 43 | } 44 | } 45 | }; 46 | } 47 | 48 | /// Implements bitcoind JSON-RPC API method `getbalance` 49 | #[macro_export] 50 | macro_rules! impl_client_v17__getbalance { 51 | () => { 52 | impl Client { 53 | pub fn get_balance(&self) -> Result { self.call("getbalance", &[]) } 54 | } 55 | }; 56 | } 57 | 58 | /// Implements bitcoind JSON-RPC API method `getnewaddress` 59 | #[macro_export] 60 | macro_rules! impl_client_v17__getnewaddress { 61 | () => { 62 | impl Client { 63 | /// Gets a new address from `bitcoind` and parses it assuming its correct. 64 | pub fn new_address(&self) -> Result { 65 | use core::str::FromStr; 66 | 67 | let json = self.get_new_address()?; 68 | let address = bitcoin::Address::from_str(&json.0) 69 | .expect("assume the address is valid") 70 | .assume_checked(); // Assume bitcoind will return an invalid address for the network its on. 71 | Ok(address) 72 | } 73 | 74 | /// Gets a new address from `bitcoind` and parses it assuming its correct. 75 | pub fn new_address_with_type(&self, ty: AddressType) -> Result { 76 | use core::str::FromStr; 77 | 78 | let json = self.get_new_address_with_type(ty)?; 79 | let address = bitcoin::Address::from_str(&json.0) 80 | .expect("assume the address is valid") 81 | .assume_checked(); // Assume bitcoind will return an invalid address for the network its on. 82 | Ok(address) 83 | } 84 | 85 | pub fn get_new_address(&self) -> Result { 86 | self.call("getnewaddress", &[]) 87 | } 88 | 89 | pub fn get_new_address_with_type(&self, ty: AddressType) -> Result { 90 | self.call("getnewaddress", &["".into(), into_json(ty)?]) 91 | } 92 | } 93 | }; 94 | } 95 | 96 | /// Implements bitcoind JSON-RPC API method `sendtoaddress` 97 | #[macro_export] 98 | macro_rules! impl_client_v17__sendtoaddress { 99 | () => { 100 | impl Client { 101 | pub fn send_to_address( 102 | &self, 103 | address: &Address, 104 | amount: Amount, 105 | ) -> Result { 106 | let mut args = [address.to_string().into(), into_json(amount.to_btc())?]; 107 | self.call("sendtoaddress", handle_defaults(&mut args, &["".into(), "".into()])) 108 | } 109 | } 110 | }; 111 | } 112 | 113 | /// Implements bitcoind JSON-RPC API method `gettransaction` 114 | #[macro_export] 115 | macro_rules! impl_client_v17__gettransaction { 116 | () => { 117 | impl Client { 118 | pub fn get_transaction(&self, txid: Txid) -> Result { 119 | self.call("gettransaction", &[into_json(txid)?]) 120 | } 121 | } 122 | }; 123 | } 124 | -------------------------------------------------------------------------------- /client/src/client_sync/v18.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v0.18.1`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v18::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v18"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [180100] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v17__unloadwallet!(); 37 | crate::impl_client_v17__loadwallet!(); 38 | crate::impl_client_v17__getnewaddress!(); 39 | crate::impl_client_v17__getbalance!(); 40 | crate::impl_client_v17__sendtoaddress!(); 41 | crate::impl_client_v17__gettransaction!(); 42 | 43 | pub use crate::client_sync::v17::AddressType; 44 | -------------------------------------------------------------------------------- /client/src/client_sync/v19/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v0.19.1`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | mod wallet; 8 | 9 | use bitcoin::address::{Address, NetworkChecked}; 10 | use bitcoin::{Amount, Block, BlockHash, Txid}; 11 | 12 | use crate::client_sync::{handle_defaults, into_json}; 13 | use crate::json::v19::*; 14 | 15 | crate::define_jsonrpc_minreq_client!("v19"); 16 | 17 | // == Blockchain == 18 | crate::impl_client_v17__getblockchaininfo!(); 19 | crate::impl_client_v17__getbestblockhash!(); 20 | crate::impl_client_v17__getblock!(); 21 | crate::impl_client_v17__gettxout!(); 22 | 23 | // == Control == 24 | crate::impl_client_v17__stop!(); 25 | 26 | // == Generating == 27 | crate::impl_client_v17__generatetoaddress!(); 28 | 29 | // == Network == 30 | crate::impl_client_v17__getnetworkinfo!(); 31 | crate::impl_client_check_expected_server_version!({ [190100] }); 32 | 33 | // == Rawtransactions == 34 | crate::impl_client_v17__sendrawtransaction!(); 35 | 36 | // == Wallet == 37 | crate::impl_client_v17__createwallet!(); 38 | crate::impl_client_v17__unloadwallet!(); 39 | crate::impl_client_v17__loadwallet!(); 40 | crate::impl_client_v17__getnewaddress!(); 41 | crate::impl_client_v17__getbalance!(); 42 | crate::impl_client_v19__getbalances!(); 43 | crate::impl_client_v17__sendtoaddress!(); 44 | crate::impl_client_v17__gettransaction!(); 45 | 46 | pub use crate::client_sync::v17::AddressType; 47 | -------------------------------------------------------------------------------- /client/src/client_sync/v19/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Specifically this is methods found under the `== Wallet ==` section of the 6 | //! API docs of `bitcoind v0.19.1`. 7 | //! 8 | //! All macros require `Client` to be in scope. 9 | //! 10 | //! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `getbalances` 13 | #[macro_export] 14 | macro_rules! impl_client_v19__getbalances { 15 | () => { 16 | impl Client { 17 | pub fn get_balances(&self) -> Result { self.call("getbalances", &[]) } 18 | } 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /client/src/client_sync/v20.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v0.20.2`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v20::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v20"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [200200] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v17__unloadwallet!(); 37 | crate::impl_client_v17__loadwallet!(); 38 | crate::impl_client_v17__getnewaddress!(); 39 | crate::impl_client_v17__getbalance!(); 40 | crate::impl_client_v19__getbalances!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v17::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/client_sync/v21.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v0.21.2`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v21::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v21"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [210200] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v17__unloadwallet!(); 37 | crate::impl_client_v17__loadwallet!(); 38 | crate::impl_client_v17__getnewaddress!(); 39 | crate::impl_client_v17__getbalance!(); 40 | crate::impl_client_v19__getbalances!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v17::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/client_sync/v22/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v22`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | mod wallet; 8 | 9 | use bitcoin::address::{Address, NetworkChecked}; 10 | use bitcoin::{Amount, Block, BlockHash, Txid}; 11 | 12 | use crate::client_sync::{handle_defaults, into_json}; 13 | use crate::json::v22::*; 14 | 15 | crate::define_jsonrpc_minreq_client!("v22"); 16 | 17 | // == Blockchain == 18 | crate::impl_client_v17__getblockchaininfo!(); 19 | crate::impl_client_v17__getbestblockhash!(); 20 | crate::impl_client_v17__getblock!(); 21 | crate::impl_client_v17__gettxout!(); 22 | 23 | // == Control == 24 | crate::impl_client_v17__stop!(); 25 | 26 | // == Generating == 27 | crate::impl_client_v17__generatetoaddress!(); 28 | 29 | // == Network == 30 | crate::impl_client_v17__getnetworkinfo!(); 31 | crate::impl_client_check_expected_server_version!({ [220000, 220100] }); 32 | 33 | // == Rawtransactions == 34 | crate::impl_client_v17__sendrawtransaction!(); 35 | 36 | // == Wallet == 37 | crate::impl_client_v17__createwallet!(); 38 | crate::impl_client_v22__unloadwallet!(); 39 | crate::impl_client_v22__loadwallet!(); 40 | crate::impl_client_v17__getbalance!(); 41 | crate::impl_client_v19__getbalances!(); 42 | crate::impl_client_v17__getnewaddress!(); 43 | crate::impl_client_v17__sendtoaddress!(); 44 | crate::impl_client_v17__gettransaction!(); 45 | 46 | pub use crate::client_sync::v17::AddressType; 47 | -------------------------------------------------------------------------------- /client/src/client_sync/v22/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing JSON-RPC methods on a client. 4 | //! 5 | //! Specifically this is methods found under the `== Wallet ==` section of the 6 | //! API docs of `bitcoind v22.1`. 7 | //! 8 | //! All macros require `Client` to be in scope. 9 | //! 10 | //! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. 11 | 12 | /// Implements bitcoind JSON-RPC API method `unloadwallet` 13 | #[macro_export] 14 | macro_rules! impl_client_v22__unloadwallet { 15 | () => { 16 | impl Client { 17 | pub fn unload_wallet(&self, wallet: &str) -> Result { 18 | self.call("unloadwallet", &[wallet.into()]) 19 | } 20 | } 21 | }; 22 | } 23 | 24 | /// Implements bitcoind JSON-RPC API method `loadwallet` 25 | #[macro_export] 26 | macro_rules! impl_client_v22__loadwallet { 27 | () => { 28 | impl Client { 29 | pub fn load_wallet(&self, wallet: &str) -> Result { 30 | self.call("loadwallet", &[wallet.into()]) 31 | } 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /client/src/client_sync/v23.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v23`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | use serde::{Deserialize, Serialize}; 10 | 11 | use crate::client_sync::{handle_defaults, into_json}; 12 | use crate::json::v23::*; 13 | 14 | crate::define_jsonrpc_minreq_client!("v23"); 15 | 16 | // == Blockchain == 17 | crate::impl_client_v17__getblockchaininfo!(); 18 | crate::impl_client_v17__getbestblockhash!(); 19 | crate::impl_client_v17__getblock!(); 20 | crate::impl_client_v17__gettxout!(); 21 | 22 | // == Control == 23 | crate::impl_client_v17__stop!(); 24 | 25 | // == Generating == 26 | crate::impl_client_v17__generatetoaddress!(); 27 | 28 | // == Network == 29 | crate::impl_client_v17__getnetworkinfo!(); 30 | crate::impl_client_check_expected_server_version!({ [230000, 230100, 230200] }); 31 | 32 | // == Rawtransactions == 33 | crate::impl_client_v17__sendrawtransaction!(); 34 | 35 | // == Wallet == 36 | crate::impl_client_v17__createwallet!(); 37 | crate::impl_client_v22__unloadwallet!(); 38 | crate::impl_client_v22__loadwallet!(); 39 | crate::impl_client_v17__getbalance!(); 40 | crate::impl_client_v19__getbalances!(); 41 | crate::impl_client_v17__getnewaddress!(); 42 | crate::impl_client_v17__sendtoaddress!(); 43 | crate::impl_client_v17__gettransaction!(); 44 | 45 | /// Argument to the `Client::get_new_address_with_type` function. 46 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 47 | #[serde(rename_all = "kebab-case")] 48 | pub enum AddressType { 49 | Legacy, 50 | P2shSegwit, 51 | Bech32, 52 | Bech32m, 53 | } 54 | 55 | impl fmt::Display for AddressType { 56 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 57 | use AddressType::*; 58 | 59 | let s = match *self { 60 | Legacy => "legacy", 61 | P2shSegwit => "p2sh-segwit", 62 | Bech32 => "bech32", 63 | Bech32m => "bech32m", 64 | }; 65 | fmt::Display::fmt(s, f) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /client/src/client_sync/v24.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v24`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v24::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v24"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [240001, 240100, 240200] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v22__unloadwallet!(); 37 | crate::impl_client_v22__loadwallet!(); 38 | crate::impl_client_v17__getbalance!(); 39 | crate::impl_client_v19__getbalances!(); 40 | crate::impl_client_v17__getnewaddress!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v23::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/client_sync/v25.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v25`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v25::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v25"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [250000, 250100, 250200] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v22__unloadwallet!(); 37 | crate::impl_client_v22__loadwallet!(); 38 | crate::impl_client_v17__getbalance!(); 39 | crate::impl_client_v19__getbalances!(); 40 | crate::impl_client_v17__getnewaddress!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v23::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/client_sync/v26.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v26`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v26::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v26"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [260000, 260100, 260200] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v22__unloadwallet!(); 37 | crate::impl_client_v22__loadwallet!(); 38 | crate::impl_client_v17__getbalance!(); 39 | crate::impl_client_v19__getbalances!(); 40 | crate::impl_client_v17__getnewaddress!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v23::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/client_sync/v27.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v27`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v27::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v27"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [270000, 270100] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v22__unloadwallet!(); 37 | crate::impl_client_v22__loadwallet!(); 38 | crate::impl_client_v17__getbalance!(); 39 | crate::impl_client_v19__getbalances!(); 40 | crate::impl_client_v17__getnewaddress!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v23::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/client_sync/v28.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! A JSON-RPC client for testing against Bitcoin Core `v28`. 4 | //! 5 | //! We ignore option arguments unless they effect the shape of the returned JSON data. 6 | 7 | use bitcoin::address::{Address, NetworkChecked}; 8 | use bitcoin::{Amount, Block, BlockHash, Txid}; 9 | 10 | use crate::client_sync::{handle_defaults, into_json}; 11 | use crate::json::v28::*; 12 | 13 | crate::define_jsonrpc_minreq_client!("v28"); 14 | 15 | // == Blockchain == 16 | crate::impl_client_v17__getblockchaininfo!(); 17 | crate::impl_client_v17__getbestblockhash!(); 18 | crate::impl_client_v17__getblock!(); 19 | crate::impl_client_v17__gettxout!(); 20 | 21 | // == Control == 22 | crate::impl_client_v17__stop!(); 23 | 24 | // == Generating == 25 | crate::impl_client_v17__generatetoaddress!(); 26 | 27 | // == Network == 28 | crate::impl_client_v17__getnetworkinfo!(); 29 | crate::impl_client_check_expected_server_version!({ [280000] }); 30 | 31 | // == Rawtransactions == 32 | crate::impl_client_v17__sendrawtransaction!(); 33 | 34 | // == Wallet == 35 | crate::impl_client_v17__createwallet!(); 36 | crate::impl_client_v22__unloadwallet!(); 37 | crate::impl_client_v22__loadwallet!(); 38 | crate::impl_client_v17__getbalance!(); 39 | crate::impl_client_v19__getbalances!(); 40 | crate::impl_client_v17__getnewaddress!(); 41 | crate::impl_client_v17__sendtoaddress!(); 42 | crate::impl_client_v17__gettransaction!(); 43 | 44 | pub use crate::client_sync::v23::AddressType; 45 | -------------------------------------------------------------------------------- /client/src/lib.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Support for connecting to Bitcoin Core via JSON-RPC. 4 | 5 | /// Re-export the `rust-bitcoin` crate. 6 | pub extern crate bitcoin; 7 | 8 | /// Re-export the `rust-bitcoin-json-rpc-types` crate. 9 | pub extern crate json; 10 | 11 | #[cfg(feature = "client-sync")] 12 | #[macro_use] 13 | pub mod client_sync; 14 | -------------------------------------------------------------------------------- /clippy.toml: -------------------------------------------------------------------------------- 1 | msrv = "1.63.0" 2 | too-many-arguments-threshold = 13 3 | -------------------------------------------------------------------------------- /contrib/crates.sh: -------------------------------------------------------------------------------- 1 | # No shebang, this file should not be executed. 2 | # shellcheck disable=SC2148 3 | 4 | # Crates in this workspace to test. 5 | CRATES=("json" "client" "jsonrpc") 6 | -------------------------------------------------------------------------------- /contrib/update-lock-files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Update the minimal/recent lock file 4 | 5 | set -euo pipefail 6 | 7 | for file in Cargo-minimal.lock Cargo-recent.lock; do 8 | cp --force "$file" Cargo.lock 9 | cargo check 10 | cp --force Cargo.lock "$file" 11 | done 12 | -------------------------------------------------------------------------------- /fuzz/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | target 3 | corpus 4 | artifacts 5 | -------------------------------------------------------------------------------- /fuzz/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "jsonrpc-fuzz" 3 | edition = "2021" 4 | rust-version = "1.63.0" 5 | version = "0.0.1" 6 | authors = ["Generated by fuzz/generate-files.sh"] 7 | publish = false 8 | 9 | [package.metadata] 10 | cargo-fuzz = true 11 | 12 | [dependencies] 13 | honggfuzz = { version = "0.5.55", default-features = false } 14 | jsonrpc = { path = "..", features = ["minreq_http"] } 15 | 16 | serde = { version = "1.0.103", features = [ "derive" ] } 17 | serde_json = "1.0" 18 | 19 | [lints.rust] 20 | unexpected_cfgs = { level = "deny", check-cfg = ['cfg(fuzzing)'] } 21 | 22 | [[bin]] 23 | name = "minreq_http" 24 | path = "fuzz_targets/minreq_http.rs" 25 | 26 | [[bin]] 27 | name = "simple_http" 28 | path = "fuzz_targets/simple_http.rs" 29 | -------------------------------------------------------------------------------- /fuzz/README.md: -------------------------------------------------------------------------------- 1 | # Note to devs 2 | 3 | If you are considering adding fuzzing for the other crates take a look 4 | at how we set up `fuzz_target` in `rust-bitcoin/fuzz`. 5 | -------------------------------------------------------------------------------- /fuzz/cycle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Continuosly cycle over fuzz targets running each for 1 hour. 4 | # It uses chrt SCHED_IDLE so that other process takes priority. 5 | # 6 | # For hfuzz options see https://github.com/google/honggfuzz/blob/master/docs/USAGE.md 7 | 8 | set -e 9 | REPO_DIR=$(git rev-parse --show-toplevel) 10 | # shellcheck source=./fuzz-util.sh 11 | source "$REPO_DIR/fuzz/fuzz-util.sh" 12 | 13 | while : 14 | do 15 | for targetFile in $(listTargetFiles); do 16 | targetName=$(targetFileToName "$targetFile") 17 | echo "Fuzzing target $targetName ($targetFile)" 18 | 19 | # fuzz for one hour 20 | HFUZZ_RUN_ARGS='--run_time 3600' chrt -i 0 cargo hfuzz run "$targetName" 21 | # minimize the corpus 22 | HFUZZ_RUN_ARGS="-i hfuzz_workspace/$targetName/input/ -P -M" chrt -i 0 cargo hfuzz run "$targetName" 23 | done 24 | done 25 | -------------------------------------------------------------------------------- /fuzz/fuzz-util.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | REPO_DIR=$(git rev-parse --show-toplevel) 4 | 5 | # Sort order is effected by locale. See `man sort`. 6 | # > Set LC_ALL=C to get the traditional sort order that uses native byte values. 7 | export LC_ALL=C 8 | 9 | listTargetFiles() { 10 | pushd "$REPO_DIR/fuzz" > /dev/null || exit 1 11 | find fuzz_targets/ -type f -name "*.rs" | sort 12 | popd > /dev/null || exit 1 13 | } 14 | 15 | targetFileToName() { 16 | echo "$1" \ 17 | | sed 's/^fuzz_targets\///' \ 18 | | sed 's/\.rs$//' \ 19 | | sed 's/\//_/g' 20 | } 21 | 22 | targetFileToHFuzzInputArg() { 23 | baseName=$(basename "$1") 24 | dirName="${baseName%.*}" 25 | if [ -d "hfuzz_input/$dirName" ]; then 26 | echo "HFUZZ_INPUT_ARGS=\"-f hfuzz_input/$FILE/input\"" 27 | fi 28 | } 29 | 30 | listTargetNames() { 31 | for target in $(listTargetFiles); do 32 | targetFileToName "$target" 33 | done 34 | } 35 | 36 | # Utility function to avoid CI failures on Windows 37 | checkWindowsFiles() { 38 | incorrectFilenames=$(find . -type f -name "*,*" -o -name "*:*" -o -name "*<*" -o -name "*>*" -o -name "*|*" -o -name "*\?*" -o -name "*\**" -o -name "*\"*" | wc -l) 39 | if [ "$incorrectFilenames" -gt 0 ]; then 40 | echo "Bailing early because there is a Windows-incompatible filename in the tree." 41 | exit 2 42 | fi 43 | } 44 | 45 | # Checks whether a fuzz case output some report, and dumps it in hex 46 | checkReport() { 47 | reportFile="hfuzz_workspace/$1/HONGGFUZZ.REPORT.TXT" 48 | if [ -f "$reportFile" ]; then 49 | cat "$reportFile" 50 | for CASE in "hfuzz_workspace/$1/SIG"*; do 51 | xxd -p -c10000 < "$CASE" 52 | done 53 | exit 1 54 | fi 55 | } 56 | -------------------------------------------------------------------------------- /fuzz/fuzz.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | REPO_DIR=$(git rev-parse --show-toplevel) 5 | 6 | # shellcheck source=./fuzz-util.sh 7 | source "$REPO_DIR/fuzz/fuzz-util.sh" 8 | 9 | # Check that input files are correct Windows file names 10 | checkWindowsFiles 11 | 12 | if [ "$1" == "" ]; then 13 | targetFiles="$(listTargetFiles)" 14 | else 15 | targetFiles=fuzz_targets/"$1".rs 16 | fi 17 | 18 | cargo --version 19 | rustc --version 20 | 21 | # Testing 22 | cargo install --force honggfuzz --no-default-features 23 | for targetFile in $targetFiles; do 24 | targetName=$(targetFileToName "$targetFile") 25 | echo "Fuzzing target $targetName ($targetFile)" 26 | if [ -d "hfuzz_input/$targetName" ]; then 27 | HFUZZ_INPUT_ARGS="-f hfuzz_input/$targetName/input\"" 28 | else 29 | HFUZZ_INPUT_ARGS="" 30 | fi 31 | RUSTFLAGS="--cfg=jsonrpc_fuzz" HFUZZ_RUN_ARGS="--run_time 30 --exit_upon_crash -v $HFUZZ_INPUT_ARGS" cargo hfuzz run "$targetName" 32 | 33 | checkReport "$targetName" 34 | done 35 | -------------------------------------------------------------------------------- /fuzz/fuzz_targets/minreq_http.rs: -------------------------------------------------------------------------------- 1 | extern crate jsonrpc; 2 | 3 | // Note, tests are empty if "jsonrpc_fuzz" is not set but still show up in output of `cargo test --workspace`. 4 | 5 | #[allow(unused_variables)] // `data` is not used when "jsonrpc_fuzz" is not set. 6 | fn do_test(data: &[u8]) { 7 | #[cfg(jsonrpc_fuzz)] 8 | { 9 | use std::io; 10 | 11 | use jsonrpc::minreq_http::{MinreqHttpTransport, FUZZ_TCP_SOCK}; 12 | use jsonrpc::Client; 13 | 14 | *FUZZ_TCP_SOCK.lock().unwrap() = Some(io::Cursor::new(data.to_vec())); 15 | 16 | let t = MinreqHttpTransport::builder() 17 | .url("localhost:123") 18 | .expect("parse url") 19 | .basic_auth("".to_string(), None) 20 | .build(); 21 | 22 | let client = Client::with_transport(t); 23 | let request = client.build_request("uptime", None); 24 | let _ = client.send_request(request); 25 | } 26 | } 27 | 28 | fn main() { 29 | loop { 30 | honggfuzz::fuzz!(|data| { 31 | do_test(data); 32 | }); 33 | } 34 | } 35 | 36 | #[cfg(test)] 37 | mod tests { 38 | fn extend_vec_from_hex(hex: &str) -> Vec { 39 | let mut out = vec![]; 40 | let mut b = 0; 41 | for (idx, c) in hex.as_bytes().iter().enumerate() { 42 | b <<= 4; 43 | match *c { 44 | b'A'..=b'F' => b |= c - b'A' + 10, 45 | b'a'..=b'f' => b |= c - b'a' + 10, 46 | b'0'..=b'9' => b |= c - b'0', 47 | _ => panic!("Bad hex"), 48 | } 49 | if (idx & 1) == 1 { 50 | out.push(b); 51 | b = 0; 52 | } 53 | } 54 | out 55 | } 56 | 57 | #[test] 58 | fn duplicate_crash() { super::do_test(&extend_vec_from_hex("00")); } 59 | } 60 | -------------------------------------------------------------------------------- /fuzz/fuzz_targets/simple_http.rs: -------------------------------------------------------------------------------- 1 | extern crate jsonrpc; 2 | 3 | // Note, tests are if empty "jsonrpc_fuzz" is not set but still show up in output of `cargo test --workspace`. 4 | 5 | #[allow(unused_variables)] // `data` is not used when "jsonrpc_fuzz" is not set. 6 | fn do_test(data: &[u8]) { 7 | #[cfg(jsonrpc_fuzz)] 8 | { 9 | use std::io; 10 | 11 | use jsonrpc::simple_http::{SimpleHttpTransport, FUZZ_TCP_SOCK}; 12 | use jsonrpc::Client; 13 | 14 | *FUZZ_TCP_SOCK.lock().unwrap() = Some(io::Cursor::new(data.to_vec())); 15 | 16 | let t = SimpleHttpTransport::builder() 17 | .url("localhost:123") 18 | .expect("parse url") 19 | .auth("", None) 20 | .build(); 21 | 22 | let client = Client::with_transport(t); 23 | let request = client.build_request("uptime", None); 24 | let _ = client.send_request(request); 25 | } 26 | } 27 | 28 | fn main() { 29 | loop { 30 | honggfuzz::fuzz!(|data| { 31 | do_test(data); 32 | }); 33 | } 34 | } 35 | 36 | #[cfg(test)] 37 | mod tests { 38 | fn extend_vec_from_hex(hex: &str) -> Vec { 39 | let mut out = vec![]; 40 | let mut b = 0; 41 | for (idx, c) in hex.as_bytes().iter().enumerate() { 42 | b <<= 4; 43 | match *c { 44 | b'A'..=b'F' => b |= c - b'A' + 10, 45 | b'a'..=b'f' => b |= c - b'a' + 10, 46 | b'0'..=b'9' => b |= c - b'0', 47 | _ => panic!("Bad hex"), 48 | } 49 | if (idx & 1) == 1 { 50 | out.push(b); 51 | b = 0; 52 | } 53 | } 54 | out 55 | } 56 | 57 | #[test] 58 | fn duplicate_crash() { super::do_test(&extend_vec_from_hex("00")); } 59 | } 60 | -------------------------------------------------------------------------------- /fuzz/generate-files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | REPO_DIR=$(git rev-parse --show-toplevel) 6 | 7 | # can't find the file because of the ENV var 8 | # shellcheck source=/dev/null 9 | source "$REPO_DIR/fuzz/fuzz-util.sh" 10 | 11 | # 1. Generate fuzz/Cargo.toml 12 | cat > "$REPO_DIR/fuzz/Cargo.toml" <> "$REPO_DIR/fuzz/Cargo.toml" < "$REPO_DIR/.github/workflows/cron-daily-fuzz.yml" <executed_\${{ matrix.fuzz_target }} 92 | - uses: actions/upload-artifact@v3 93 | with: 94 | name: executed_\${{ matrix.fuzz_target }} 95 | path: executed_\${{ matrix.fuzz_target }} 96 | 97 | verify-execution: 98 | if: \${{ !github.event.act }} 99 | needs: fuzz 100 | runs-on: ubuntu-latest 101 | steps: 102 | - uses: actions/checkout@v4 103 | - uses: actions/download-artifact@v3 104 | - name: Display structure of downloaded files 105 | run: ls -R 106 | - run: find executed_* -type f -exec cat {} + | sort > executed 107 | - run: source ./fuzz/fuzz-util.sh && listTargetNames | sort | diff - executed 108 | EOF 109 | -------------------------------------------------------------------------------- /integration_test/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "integration-test" 3 | version = "0.1.0" 4 | authors = ["Tobin C. Harding "] 5 | license = "CC0-1.0" 6 | description = "Integration tests for bitcoind-json-rpc-client/types" 7 | edition = "2021" 8 | 9 | # Please note, in this crate the version features are mutally exclusive. 10 | # 11 | # - `cargo test --all-features` is the same as `cargo test --features=v26_2` 12 | # - `cargo test --no-default-features` skips all tests. 13 | [features] 14 | # Enable the same feature in `bitcoind` and the version feature here. 15 | # All minor releases (but only the latest patch release). 16 | "28_0" = ["v28", "bitcoind/28_0"] 17 | "27_1" = ["v27", "bitcoind/27_1"] 18 | "27_0" = ["v27", "bitcoind/27_0"] 19 | "26_2" = ["v26", "bitcoind/26_2"] 20 | "26_1" = ["v26", "bitcoind/26_1"] 21 | "26_0" = ["v26", "bitcoind/26_0"] 22 | "25_2" = ["v25", "bitcoind/25_2"] 23 | "25_1" = ["v25", "bitcoind/25_1"] 24 | "25_0" = ["v25", "bitcoind/25_0"] 25 | "24_2" = ["v24", "bitcoind/24_2"] 26 | "24_1" = ["v24", "bitcoind/24_1"] 27 | "24_0_1" = ["v24", "bitcoind/24_0_1"] 28 | "23_2" = ["v23", "bitcoind/23_2"] 29 | "23_1" = ["v23", "bitcoind/23_1"] 30 | "23_0" = ["v23", "bitcoind/23_0"] 31 | "22_1" = ["v22", "bitcoind/22_1"] 32 | "22_0" = ["v22", "bitcoind/22_0"] 33 | # Only the latest minor version for these. 34 | "0_21_2" = ["v21", "bitcoind/0_21_2"] 35 | "0_20_2" = ["v20", "bitcoind/0_20_2"] 36 | "0_19_1" = ["v19", "bitcoind/0_19_1"] 37 | "0_18_1" = ["v18", "bitcoind/0_18_1"] 38 | "0_17_1" = ["v17", "bitcoind/0_17_1"] 39 | 40 | # Each minor version is tested with the same client. 41 | "v28" = [] 42 | "v27" = [] 43 | "v26" = [] 44 | "v25" = [] 45 | "v24" = [] 46 | "v23" = [] 47 | "v22" = [] 48 | "v21" = [] 49 | "v20" = [] 50 | "v19" = [] 51 | "v18" = [] 52 | "v17" = [] 53 | 54 | [dependencies] 55 | bitcoin = { version = "0.32.0", default-features = false, features = ["std", "serde"] } 56 | client = { package = "bitcoind-json-rpc-client", version = "0.3.0", default-features = false, features = ["client-sync"] } 57 | bitcoind = { package = "bitcoind-json-rpc-regtest", version = "0.3.0", default-features = false, features = [] } 58 | rand = "0.8.5" 59 | env_logger = "0.9.0" 60 | 61 | [dev-dependencies] 62 | 63 | [patch.crates-io.bitcoind-json-rpc-client] 64 | path = "../client" 65 | 66 | [patch.crates-io.bitcoind-json-rpc-types] 67 | path = "../json" 68 | 69 | [patch.crates-io.bitcoind-json-rpc-regtest] 70 | path = "../regtest" 71 | -------------------------------------------------------------------------------- /integration_test/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Provides a macro that implements the tests. 2 | 3 | pub mod v17; 4 | pub mod v19; 5 | pub mod v22; 6 | 7 | /// Requires `RPC_PORT` to be in scope. 8 | use bitcoind::BitcoinD; 9 | 10 | /// Initialize a logger (configure with `RUST_LOG=trace cargo test`). 11 | #[allow(dead_code)] // Not all tests use this function. 12 | pub fn init_logger() { let _ = env_logger::try_init(); } 13 | 14 | /// Returns a handle to a `bitcoind` instance with "default" wallet loaded. 15 | #[allow(dead_code)] // Not all tests use this function. 16 | pub fn bitcoind_with_default_wallet() -> BitcoinD { 17 | init_logger(); 18 | 19 | let exe = bitcoind::exe_path().expect("failed to get bitcoind executable"); 20 | 21 | let conf = bitcoind::Conf::default(); 22 | BitcoinD::with_conf(exe, &conf).expect("failed to create BitcoinD") 23 | } 24 | 25 | /// Returns a handle to a `bitcoind` instance without any wallets. 26 | #[allow(dead_code)] // Not all tests use this function. 27 | pub fn bitcoind_with_wallet(wallet: String) -> BitcoinD { 28 | let exe = bitcoind::exe_path().expect("failed to get bitcoind executable"); 29 | 30 | let mut conf = bitcoind::Conf::default(); 31 | conf.wallet = Some(wallet); 32 | BitcoinD::with_conf(exe, &conf).expect("failed to create BitcoinD") 33 | } 34 | 35 | /// Returns a handle to a `bitcoind` instance without any wallet loaded. 36 | #[allow(dead_code)] // Not all tests use this function. 37 | pub fn bitcoind_no_wallet() -> BitcoinD { 38 | let exe = bitcoind::exe_path().expect("failed to get bitcoind executable"); 39 | 40 | let mut conf = bitcoind::Conf::default(); 41 | conf.wallet = None; 42 | BitcoinD::with_conf(exe, &conf).expect("failed to create BitcoinD") 43 | } 44 | -------------------------------------------------------------------------------- /integration_test/src/v17/control.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client. 4 | //! 5 | //! Specifically this is methods found under the `== Control ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | 8 | /// Requires `Client` to be in scope and to implement `getmemoryinfo`. 9 | #[macro_export] 10 | macro_rules! impl_test_v17__getmemoryinfo { 11 | () => { 12 | #[test] 13 | fn get_memory_info() { 14 | let bitcoind = $crate::bitcoind_no_wallet(); 15 | // There is no model for `getmemoryinfo`, just check we can make the call. 16 | let _ = bitcoind.client.get_memory_info().expect("getmemoryinfo"); 17 | } 18 | }; 19 | } 20 | 21 | /// Requires `Client` to be in scope and to implement `logging`. 22 | #[macro_export] 23 | macro_rules! impl_test_v17__logging { 24 | () => { 25 | #[test] 26 | fn logging() { 27 | let bitcoind = $crate::bitcoind_no_wallet(); 28 | // There is no model for `logging`, just check we can make the call. 29 | let _ = bitcoind.client.logging().expect("logging"); 30 | } 31 | }; 32 | } 33 | 34 | /// Requires `Client` to be in scope and to implement `stop`. 35 | #[macro_export] 36 | macro_rules! impl_test_v17__stop { 37 | () => { 38 | #[test] 39 | fn stop() { 40 | let bitcoind = $crate::bitcoind_no_wallet(); 41 | // There is no json object for `stop`, we just return a string. 42 | let _ = bitcoind.client.stop().expect("stop"); 43 | } 44 | }; 45 | } 46 | 47 | /// Requires `Client` to be in scope and to implement `uptime`. 48 | #[macro_export] 49 | macro_rules! impl_test_v17__uptime { 50 | () => { 51 | #[test] 52 | fn uptime() { 53 | let bitcoind = $crate::bitcoind_no_wallet(); 54 | // There is no json object for `stop`, we just return a int. 55 | let _ = bitcoind.client.uptime().expect("uptime"); 56 | } 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /integration_test/src/v17/generating.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client. 4 | //! 5 | //! Specifically this is methods found under the `== Generating ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | 8 | /// Requires `Client` to be in scope and to implement `generate_to_address`. 9 | #[macro_export] 10 | macro_rules! impl_test_v17__generatetoaddress { 11 | () => { 12 | #[test] 13 | fn generate_to_address() { 14 | const NBLOCKS: usize = 1; 15 | 16 | let bitcoind = $crate::bitcoind_with_default_wallet(); 17 | let address = bitcoind.client.new_address().expect("failed to get new address"); 18 | let json = bitcoind.client.generate_to_address(NBLOCKS, &address).expect("generatetoaddress"); 19 | json.into_model().unwrap(); 20 | } 21 | }; 22 | } 23 | 24 | /// Requires `Client` to be in scope and to implement `generate`. 25 | #[macro_export] 26 | macro_rules! impl_test_v17__generate { 27 | () => { 28 | #[test] 29 | fn generate() { 30 | const NBLOCKS: usize = 100; 31 | 32 | let bitcoind = $crate::bitcoind_with_default_wallet(); 33 | let json = bitcoind.client.generate(NBLOCKS).expect("generate"); 34 | json.into_model().unwrap(); 35 | } 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /integration_test/src/v17/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client for `bitcoind v0.17.1`. 4 | 5 | pub mod blockchain; 6 | pub mod control; 7 | pub mod generating; 8 | pub mod network; 9 | pub mod raw_transactions; 10 | pub mod wallet; 11 | -------------------------------------------------------------------------------- /integration_test/src/v17/network.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client. 4 | //! 5 | //! Specifically this is methods found under the `== Network ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | 8 | /// Requires `Client` to be in scope and to implement `get_network_info`. 9 | #[macro_export] 10 | macro_rules! impl_test_v17__getaddednodeinfo { 11 | () => { 12 | #[test] 13 | fn get_added_node_info() { 14 | let bitcoind = $crate::bitcoind_no_wallet(); 15 | let _ = bitcoind.client.get_added_node_info().expect("getaddednodeinfo"); 16 | } 17 | }; 18 | } 19 | 20 | /// Requires `Client` to be in scope and to implement `get_network_info`. 21 | #[macro_export] 22 | macro_rules! impl_test_v17__getnettotals { 23 | () => { 24 | #[test] 25 | fn get_net_totals() { 26 | let bitcoind = $crate::bitcoind_no_wallet(); 27 | let _ = bitcoind.client.get_net_totals().expect("getnettotals"); 28 | } 29 | }; 30 | } 31 | 32 | /// Requires `Client` to be in scope and to implement `get_network_info` and 33 | /// `check_expected_server_version`. 34 | #[macro_export] 35 | macro_rules! impl_test_v17__getnetworkinfo { 36 | () => { 37 | #[test] 38 | fn get_network_info() { 39 | let bitcoind = $crate::bitcoind_no_wallet(); 40 | let json = bitcoind.client.get_network_info().expect("getnetworkinfo"); 41 | assert!(json.into_model().is_ok()); 42 | 43 | // Server version is returned as part of the getnetworkinfo method. 44 | bitcoind.client.check_expected_server_version().expect("unexpected version"); 45 | } 46 | }; 47 | } 48 | 49 | /// Requires `Client` to be in scope and to implement `get_peer_info`. 50 | #[macro_export] 51 | macro_rules! impl_test_v17__getpeerinfo { 52 | () => { 53 | #[test] 54 | fn get_peer_info() { 55 | let bitcoind = $crate::bitcoind_no_wallet(); 56 | let _ = bitcoind.client.get_peer_info().expect("getpeerinfo"); 57 | } 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /integration_test/src/v17/raw_transactions.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client. 4 | //! 5 | //! Specifically this is methods found under the `== Rawtransactions ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | 8 | /// Requires `Client` to be in scope and to implement `get_best_block_hash`. 9 | #[macro_export] 10 | macro_rules! impl_test_v17__sendrawtransaction { 11 | () => { 12 | #[test] 13 | fn send_raw_transaction() { 14 | // let bitcoind = $crate::bitcoind_no_wallet(); 15 | // // TODO: Get a transaction from somewhere and send it. 16 | // let _ = bitcoind.client.get_best_block_hash().expect("getbestblockhash"); 17 | } 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /integration_test/src/v17/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client. 4 | //! 5 | //! Specifically this is methods found under the `== Wallet ==` section of the 6 | //! API docs of `bitcoind v0.17.1`. 7 | 8 | /// Requires `Client` to be in scope and to implement `createwallet`. 9 | #[macro_export] 10 | macro_rules! impl_test_v17__createwallet { 11 | () => { 12 | #[test] 13 | pub fn create_wallet() { 14 | // Implicitly tests createwalled because we create the default wallet. 15 | let _ = $crate::bitcoind_with_default_wallet(); 16 | } 17 | }; 18 | } 19 | 20 | /// Requires `Client` to be in scope and to implement `loadwallet`. 21 | #[macro_export] 22 | macro_rules! impl_test_v17__loadwallet { 23 | () => { 24 | #[test] 25 | fn load_wallet() { 26 | // Implicitly test loadwalled because we load the default wallet. 27 | let _ = $crate::bitcoind_with_default_wallet(); 28 | } 29 | }; 30 | } 31 | 32 | /// Requires `Client` to be in scope and to implement `unloadwallet`. 33 | #[macro_export] 34 | macro_rules! impl_test_v17__unloadwallet { 35 | () => { 36 | #[test] 37 | fn unload_wallet() { 38 | let bitcoind = $crate::bitcoind_no_wallet(); 39 | let wallet = format!("wallet-{}", rand::random::()).to_string(); 40 | bitcoind.client.create_wallet(&wallet).expect("failed to create wallet"); 41 | let json = bitcoind.client.unload_wallet(&wallet).expect("unloadwallet"); 42 | assert!(json.into_model().is_ok()) 43 | } 44 | }; 45 | } 46 | 47 | /// Requires `Client` to be in scope and to implement `get_new_address`. 48 | #[macro_export] 49 | macro_rules! impl_test_v17__getnewaddress { 50 | () => { 51 | #[test] 52 | fn get_new_address() { 53 | use bitcoind::AddressType; 54 | 55 | let bitcoind = $crate::bitcoind_with_default_wallet(); 56 | 57 | let json = bitcoind.client.get_new_address().expect("getnewaddress"); 58 | assert!(json.into_model().is_ok()); 59 | 60 | // Test the helper as well just for good measure. 61 | let _ = bitcoind.client.new_address().unwrap(); 62 | 63 | // Exhaustively test address types with helper. 64 | let _ = bitcoind 65 | .client 66 | .new_address_with_type(AddressType::Legacy) 67 | .unwrap(); 68 | let _ = bitcoind 69 | .client 70 | .new_address_with_type(AddressType::P2shSegwit) 71 | .unwrap(); 72 | let _ = bitcoind 73 | .client 74 | .new_address_with_type(AddressType::Bech32) 75 | .unwrap(); 76 | } 77 | }; 78 | } 79 | 80 | /// Requires `Client` to be in scope and to implement `get_balance`. 81 | #[macro_export] 82 | macro_rules! impl_test_v17__getbalance { 83 | () => { 84 | #[test] 85 | fn get_balance() { 86 | use client::json::model; 87 | 88 | let bitcoind = $crate::bitcoind_with_default_wallet(); 89 | let json = bitcoind.client.get_balance().expect("getbalance"); 90 | assert!(json.into_model().is_ok()) 91 | } 92 | }; 93 | } 94 | 95 | /// Requires `Client` to be in scope and to implement: 96 | /// - `generate_to_address` 97 | /// - `send_to_address` 98 | #[macro_export] 99 | macro_rules! impl_test_v17__sendtoaddress { 100 | () => { 101 | #[test] 102 | fn send_to_address() { 103 | use bitcoin::Amount; 104 | 105 | let bitcoind = $crate::bitcoind_with_default_wallet(); 106 | let address = bitcoind.client.new_address().expect("failed to create new address"); 107 | let _ = bitcoind.client.generate_to_address(101, &address).expect("generatetoaddress"); 108 | 109 | let json = bitcoind 110 | .client 111 | .send_to_address(&address, Amount::from_sat(10_000)) 112 | .expect("sendtddress"); 113 | json.into_model().unwrap(); 114 | } 115 | }; 116 | } 117 | 118 | /// Requires `Client` to be in scope and to implement: 119 | /// - `generate_to_address` 120 | /// - `send_to_address` 121 | /// - `get_transaction` 122 | #[macro_export] 123 | macro_rules! impl_test_v17__gettransaction { 124 | () => { 125 | #[test] 126 | fn get_transaction() { 127 | use bitcoin::Amount; 128 | use client::json::model; 129 | 130 | let bitcoind = $crate::bitcoind_with_default_wallet(); 131 | let address = bitcoind.client.new_address().expect("failed to create new address"); 132 | let _ = bitcoind.client.generate_to_address(101, &address).expect("generatetoaddress"); 133 | 134 | let txid = bitcoind 135 | .client 136 | .send_to_address(&address, Amount::from_sat(10_000)) 137 | .expect("sendtoaddress") 138 | .txid() 139 | .unwrap(); 140 | 141 | let json = bitcoind.client.get_transaction(txid).expect("gettransaction"); 142 | json.into_model().unwrap(); 143 | } 144 | }; 145 | } 146 | -------------------------------------------------------------------------------- /integration_test/src/v19/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client for `bitcoind v0.19.1`. 4 | 5 | pub mod wallet; 6 | -------------------------------------------------------------------------------- /integration_test/src/v19/wallet.rs: -------------------------------------------------------------------------------- 1 | /// Requires `Client` to be in scope and to implement `get_balances`. 2 | #[macro_export] 3 | macro_rules! impl_test_v19__getbalances { 4 | () => { 5 | #[test] 6 | fn get_balances() { 7 | let bitcoind = $crate::bitcoind_with_default_wallet(); 8 | let address = bitcoind.client.new_address().expect("failed to get new address"); 9 | let _ = bitcoind.client.generate_to_address(101, &address).expect("generatetoaddress"); 10 | let json = bitcoind.client.get_balances().expect("getbalances"); 11 | json.into_model().unwrap(); 12 | } 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /integration_test/src/v22/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client for `bitcoind v22.1`. 4 | 5 | pub mod wallet; 6 | -------------------------------------------------------------------------------- /integration_test/src/v22/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Macros for implementing test methods on a JSON-RPC client. 4 | //! 5 | //! Specifically this is methods found under the `== Wallet ==` section of the 6 | //! API docs of `bitcoind v22.1`. 7 | 8 | /// Requires `Client` to be in scope and to implement `unloadwallet`. 9 | #[macro_export] 10 | macro_rules! impl_test_v22__unloadwallet { 11 | () => { 12 | #[test] 13 | fn unload_wallet() { 14 | let bitcoind = $crate::bitcoind_no_wallet(); 15 | let wallet = format!("wallet-{}", rand::random::()).to_string(); 16 | bitcoind.client.create_wallet(&wallet).expect("failed to create wallet"); 17 | let _ = bitcoind.client.unload_wallet(&wallet).expect("unloadwallet "); 18 | } 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /integration_test/tests/v17_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v0.17.1`. 2 | 3 | #![cfg(feature = "v17")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | impl_test_v17__getblockcount!(); 16 | impl_test_v17__getblockhash!(); 17 | impl_test_v17__getblockheader!(); 18 | impl_test_v17__getblockstats!(); 19 | impl_test_v17__getchaintips!(); 20 | impl_test_v17__getchaintxstats!(); 21 | impl_test_v17__getdifficulty!(); 22 | } 23 | 24 | // == Control == 25 | mod control { 26 | use super::*; 27 | 28 | impl_test_v17__getmemoryinfo!(); 29 | impl_test_v17__logging!(); 30 | impl_test_v17__stop!(); 31 | impl_test_v17__uptime!(); 32 | } 33 | 34 | // == Generating == 35 | mod generating { 36 | use super::*; 37 | 38 | impl_test_v17__generatetoaddress!(); 39 | impl_test_v17__generate!(); 40 | } 41 | 42 | // == Network == 43 | mod network { 44 | use super::*; 45 | 46 | impl_test_v17__getaddednodeinfo!(); 47 | impl_test_v17__getnettotals!(); 48 | impl_test_v17__getnetworkinfo!(); 49 | impl_test_v17__getpeerinfo!(); 50 | } 51 | 52 | // == Rawtransactions == 53 | mod raw_transactions { 54 | use super::*; 55 | 56 | impl_test_v17__sendrawtransaction!(); 57 | } 58 | 59 | // == Wallet == 60 | mod wallet { 61 | use super::*; 62 | 63 | impl_test_v17__createwallet!(); 64 | impl_test_v17__loadwallet!(); 65 | // impl_test_v17__unloadwallet!(); 66 | 67 | impl_test_v17__getnewaddress!(); 68 | impl_test_v17__getbalance!(); 69 | impl_test_v17__sendtoaddress!(); 70 | impl_test_v17__gettransaction!(); 71 | } 72 | 73 | -------------------------------------------------------------------------------- /integration_test/tests/v18_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v0.18.1`. 2 | 3 | #![cfg(feature = "v18")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v17__sendtoaddress!(); 55 | impl_test_v17__gettransaction!(); 56 | } 57 | -------------------------------------------------------------------------------- /integration_test/tests/v19_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v0.19.1`. 2 | 3 | #![cfg(feature = "v19")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v20_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v0.20.2`. 2 | 3 | #![cfg(feature = "v20")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v21_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v0.20.2`. 2 | 3 | #![cfg(feature = "v21")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v22_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v22`. 2 | 3 | #![cfg(feature = "v22")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v23_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v23`. 2 | 3 | #![cfg(feature = "v23")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v24_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v24`. 2 | 3 | #![cfg(feature = "v24")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v25_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v25`. 2 | 3 | #![cfg(feature = "v25")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v26_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v26`. 2 | 3 | #![cfg(feature = "v26")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v27_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v27.1`. 2 | 3 | #![cfg(feature = "v27")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getbestblockhash!(); 12 | impl_test_v17__getblock_verbosity_0!(); 13 | impl_test_v17__getblock_verbosity_1!(); 14 | impl_test_v17__getblockchaininfo!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/tests/v28_api.rs: -------------------------------------------------------------------------------- 1 | //! Test the JSON-RPC API against `bitcoind v28.0`. 2 | 3 | #![cfg(feature = "v28")] 4 | 5 | use integration_test::*; 6 | 7 | // == Blockchain == 8 | mod blockchain { 9 | use super::*; 10 | 11 | impl_test_v17__getblockchaininfo!(); 12 | impl_test_v17__getbestblockhash!(); 13 | impl_test_v17__getblock_verbosity_0!(); 14 | impl_test_v17__getblock_verbosity_1!(); 15 | } 16 | 17 | // == Control == 18 | mod control { 19 | use super::*; 20 | 21 | impl_test_v17__stop!(); 22 | } 23 | 24 | // == Generating == 25 | mod generating { 26 | use super::*; 27 | 28 | impl_test_v17__generatetoaddress!(); 29 | } 30 | 31 | // == Network == 32 | mod network { 33 | use super::*; 34 | 35 | impl_test_v17__getnetworkinfo!(); 36 | } 37 | 38 | // == Rawtransactions == 39 | mod raw_transactions { 40 | use super::*; 41 | 42 | impl_test_v17__sendrawtransaction!(); 43 | } 44 | 45 | // == Wallet == 46 | mod wallet { 47 | use super::*; 48 | 49 | impl_test_v17__createwallet!(); 50 | impl_test_v17__loadwallet!(); 51 | 52 | impl_test_v17__getnewaddress!(); 53 | impl_test_v17__getbalance!(); 54 | impl_test_v19__getbalances!(); 55 | impl_test_v17__sendtoaddress!(); 56 | impl_test_v17__gettransaction!(); 57 | } 58 | -------------------------------------------------------------------------------- /json/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.3.0 - 2024-06-21 2 | 3 | - Implement `into_model` on all types. 4 | 5 | # 0.2.0 - 2024-06-13 6 | 7 | - Use Bitcoin Core 0.17.1 (0.17.2 seems to not exist and have been a mistake). 8 | - Fix `GetTransactionDetail` conversion to use a signed bitcoin amount. 9 | 10 | # 0.1.0 - 2024-06-13 11 | 12 | Initial release. 13 | -------------------------------------------------------------------------------- /json/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitcoind-json-rpc-types" 3 | version = "0.3.0" 4 | authors = ["Tobin C. Harding "] 5 | license = "CC0-1.0" 6 | repository = "https://github.com/rust-bitcoin/rust-bitcoind-json-rpc" 7 | description = "Bitcoin Core JSON-RPC API types" 8 | categories = ["cryptography::cryptocurrencies"] 9 | keywords = ["bitcoin", "bitcoind", "json-rpc"] 10 | readme = "README.md" 11 | edition = "2021" 12 | rust-version = "1.63.0" 13 | exclude = ["tests", "contrib"] 14 | 15 | [features] 16 | default = [] 17 | 18 | [dependencies] 19 | bitcoin = { version = "0.32.0", default-features = false, features = ["std", "serde"] } 20 | internals = { package = "bitcoin-internals", version = "0.3.0", default-features = false, features = ["std"] } 21 | serde = { version = "1.0.103", default-features = false, features = [ "derive", "alloc" ] } 22 | serde_json = { version = "1.0.117" } 23 | 24 | [dev-dependencies] 25 | -------------------------------------------------------------------------------- /json/README.md: -------------------------------------------------------------------------------- 1 | # bitcoind-json-rpc-types 2 | 3 | Types returned by the JSON-RPC API of Bitcoin Core. 4 | 5 | ## Minimum Supported Rust Version (MSRV) 6 | 7 | This library should always compile with any combination of features on **Rust 1.56.1**. 8 | 9 | ## Licensing 10 | 11 | The code in this project is licensed under the [Creative Commons CC0 1.0 Universal license](LICENSE). 12 | We use the [SPDX license list](https://spdx.org/licenses/) and [SPDX IDs](https://spdx.dev/ids/). 13 | -------------------------------------------------------------------------------- /json/contrib/test_vars.sh: -------------------------------------------------------------------------------- 1 | # No shebang, this file should not be executed. 2 | # shellcheck disable=SC2148 3 | # 4 | # disable verify unused vars, despite the fact that they are used when sourced 5 | # shellcheck disable=SC2034 6 | 7 | # Test all these features with "std" enabled. 8 | FEATURES_WITH_STD="" 9 | 10 | # Test all these features without "std" enabled. 11 | FEATURES_WITHOUT_STD="" 12 | 13 | # Run these examples. 14 | EXAMPLES="" 15 | -------------------------------------------------------------------------------- /json/src/lib.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types returned by the JSON-RPC API of Bitcoin Core. 4 | 5 | /// Re-export the `rust-bitcoin` crate. 6 | pub extern crate bitcoin; 7 | 8 | // TODO: Consider updating https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29 when this is complete. 9 | 10 | // JSON types, for each specific version of `bitcoind`. 11 | pub mod v17; 12 | pub mod v18; 13 | pub mod v19; 14 | pub mod v20; 15 | pub mod v21; 16 | pub mod v22; 17 | pub mod v23; 18 | pub mod v24; 19 | pub mod v25; 20 | pub mod v26; 21 | pub mod v27; 22 | pub mod v28; 23 | 24 | // JSON types that model _all_ `bitcoind` versions. 25 | pub mod model; 26 | 27 | use std::fmt; 28 | 29 | use bitcoin::amount::ParseAmountError; 30 | use bitcoin::{Amount, FeeRate}; 31 | 32 | /// Converts an `i64` numeric type to a `u32`. 33 | /// 34 | /// The Bitcoin Core JSONRPC API has fields marked as 'numeric'. It is not obvious what Rust 35 | /// type these fields should be. 36 | /// 37 | /// We want the version specific JSON types to just work (TM). 38 | /// 39 | /// 1. We use an `i64` because its the biggest signed integer on "common" machines. 40 | /// 2. We use a signed integer because Core sometimes returns -1. 41 | /// 42 | /// (2) was discovered in the wild but is hard to test for. 43 | pub fn to_u32(value: i64, field: &str) -> Result { 44 | if value.is_negative() { 45 | return Err(NumericError::Negative { value, field: field.to_owned() }); 46 | } 47 | u32::try_from(value).map_err(|_| NumericError::Overflow { value, field: field.to_owned() }) 48 | } 49 | 50 | /// Error converting an `i64` to a `u32`. 51 | /// 52 | /// If we expect a numeric value to sanely fit inside a `u32` we use that type in the `model` 53 | /// module, this requires converting the `i64` returned by the JSONRPC API into a `u32`, if our 54 | /// expectations are not met this error will be encountered. 55 | #[derive(Debug)] 56 | pub enum NumericError { 57 | /// Expected an unsigned numeric value however the value was negative. 58 | Negative { field: String, value: i64 }, 59 | /// A value larger than `u32::MAX` was unexpectedly encountered. 60 | Overflow { field: String, value: i64 }, 61 | } 62 | 63 | impl fmt::Display for NumericError { 64 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 65 | use NumericError::*; 66 | 67 | match *self { 68 | Negative{ ref field, value } => write!(f, "expected an unsigned numeric value however the value was negative (field name: {} value: {})", field, value), 69 | Overflow { ref field, value } => write!(f, "a value larger than `u32::MAX` was unexpectedly encountered (field name: {} Value: {})", field, value), 70 | } 71 | } 72 | } 73 | 74 | impl std::error::Error for NumericError {} 75 | 76 | /// Converts `fee_rate` in BTC/kB to `FeeRate`. 77 | fn btc_per_kb(btc_per_kb: f64) -> Result, ParseAmountError> { 78 | let btc_per_byte = btc_per_kb / 1000_f64; 79 | let sats_per_byte = Amount::from_btc(btc_per_byte)?; 80 | 81 | // Virtual bytes equal bytes before segwit. 82 | let rate = FeeRate::from_sat_per_vb(sats_per_byte.to_sat()); 83 | 84 | Ok(rate) 85 | } 86 | -------------------------------------------------------------------------------- /json/src/model/control.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Control ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | 8 | // Control types currently have no need for model equivalents. 9 | -------------------------------------------------------------------------------- /json/src/model/generating.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Generating ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | 8 | use bitcoin::BlockHash; 9 | use serde::{Deserialize, Serialize}; 10 | 11 | /// Models the result of JSON-RPC method `generate`. 12 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 13 | pub struct Generate(pub Vec); 14 | 15 | impl Generate { 16 | /// Returns the number of blocks generated. 17 | pub fn len(&self) -> usize { self.0.len() } 18 | 19 | /// Returns true if 0 blocks were generated. 20 | pub fn is_empty(&self) -> bool { self.0.is_empty() } 21 | } 22 | 23 | /// Models the result of JSON-RPC method `generatetoaddress`. 24 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 25 | pub struct GenerateToAddress(pub Vec); 26 | 27 | impl GenerateToAddress { 28 | /// Returns the number of blocks generated. 29 | pub fn len(&self) -> usize { self.0.len() } 30 | 31 | /// Returns true if 0 blocks were generated. 32 | pub fn is_empty(&self) -> bool { self.0.is_empty() } 33 | } 34 | -------------------------------------------------------------------------------- /json/src/model/mining.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Mining ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | -------------------------------------------------------------------------------- /json/src/model/mod.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Models of the data returned by the JSON-RPC API of Bitcoin Core. 4 | //! 5 | //! The types here model the data returned by Bitcoin Core in a version non-specific way. In other 6 | //! words one can use a particular `bitcoind` version via the version specific module (e.g. 7 | //! `crate::v26`) then convert the `json` types to one of the modelled types in this module using 8 | //! `TryFrom`. 9 | 10 | // Separated by the section name in the `bitcoind` JSON-RPC docs. 11 | mod blockchain; 12 | mod control; 13 | mod generating; 14 | mod mining; 15 | mod network; 16 | mod raw_transactions; 17 | mod util; 18 | mod wallet; 19 | mod zmq; 20 | 21 | // TODO/QUESTIONS 22 | // 23 | // - Should all types here be non_exhaustive (otherwise evertime Core changes them we will need a new major release)? 24 | // - Should we provide an inherent convertion method because try_from's lack of type inference is annoying to use. 25 | 26 | #[doc(inline)] 27 | pub use self::{ 28 | blockchain::{ 29 | Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, ChainTips, ChainTipsStatus, 30 | GetBestBlockHash, GetBlockCount, GetBlockHash, GetBlockHeader, GetBlockHeaderVerbose, 31 | GetBlockStats, GetBlockVerbosityOne, GetBlockVerbosityZero, GetBlockchainInfo, 32 | GetChainTips, GetChainTxStats, GetDifficulty, GetMempoolAncestors, 33 | GetMempoolAncestorsVerbose, GetTxOut, Softfork, SoftforkType, 34 | }, 35 | generating::{Generate, GenerateToAddress}, 36 | network::{GetNetworkInfo, GetNetworkInfoAddress, GetNetworkInfoNetwork}, 37 | raw_transactions::SendRawTransaction, 38 | wallet::{ 39 | CreateWallet, GetBalance, GetBalances, GetBalancesMine, GetBalancesWatchOnly, 40 | GetNewAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailCategory, 41 | LoadWallet, SendToAddress, UnloadWallet, 42 | }, 43 | }; 44 | -------------------------------------------------------------------------------- /json/src/model/network.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Network ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | 8 | use bitcoin::FeeRate; 9 | use serde::{Deserialize, Serialize}; 10 | 11 | /// Models the result of JSON-RPC method `getnetworkinfo`. 12 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 13 | pub struct GetNetworkInfo { 14 | /// The server version. 15 | pub version: usize, 16 | /// The server subversion string. 17 | pub subversion: String, 18 | /// The protocol version. 19 | pub protocol_version: usize, 20 | /// The services we offer to the network (hex string). 21 | pub local_services: String, 22 | /// `true` if transaction relay is requested from peers. 23 | pub local_relay: bool, 24 | /// The time offset. 25 | pub time_offset: isize, 26 | /// The total number of connections. 27 | pub connections: usize, 28 | /// Whether p2p networking is enabled. 29 | pub network_active: bool, 30 | /// Information per network. 31 | pub networks: Vec, 32 | /// Minimum relay fee rate for transactions. 33 | pub relay_fee: Option, // `Some` if parsing succeeds. 34 | /// Minimum fee rate increment for mempool limiting or replacement. 35 | pub incremental_fee: Option, // `Some` if parsing succeeds. 36 | /// List of local addresses. 37 | pub local_addresses: Vec, 38 | /// Any network and blockchain warnings. 39 | pub warnings: Vec, 40 | } 41 | 42 | /// Part of the result of the JSON-RPC method `getnetworkinfo` (information per network). 43 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 44 | pub struct GetNetworkInfoNetwork { 45 | /// Network (ipv4, ipv6, onion, i2p, cjdns). 46 | pub name: String, 47 | /// Is the network limited using -onlynet?. 48 | pub limited: bool, 49 | /// Is the network reachable? 50 | pub reachable: bool, 51 | /// ("host:port"): The proxy that is used for this network, or empty if none. 52 | pub proxy: String, 53 | /// Whether randomized credentials are used. 54 | pub proxy_randomize_credentials: bool, 55 | } 56 | 57 | /// Part of the result of the JSON-RPC method `getnetworkinfo` (local address info). 58 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 59 | pub struct GetNetworkInfoAddress { 60 | /// Network address. 61 | pub address: String, 62 | /// Network port. 63 | pub port: u16, 64 | /// Relative score. 65 | pub score: u32, 66 | } 67 | -------------------------------------------------------------------------------- /json/src/model/raw_transactions.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Rawtransactions ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | 8 | use bitcoin::Txid; 9 | use serde::{Deserialize, Serialize}; 10 | 11 | /// Models the result of JSON-RPC method `sendrawtransaction`. 12 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 13 | pub struct SendRawTransaction(pub Txid); 14 | -------------------------------------------------------------------------------- /json/src/model/util.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Util ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | -------------------------------------------------------------------------------- /json/src/model/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Wallet ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | 8 | use bitcoin::address::{Address, NetworkUnchecked}; 9 | use bitcoin::{Amount, SignedAmount, Transaction, Txid}; 10 | use serde::{Deserialize, Serialize}; 11 | 12 | /// Models the result of JSON-RPC method `createwallet`. 13 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 14 | pub struct CreateWallet { 15 | /// The wallet name if created successfully. 16 | /// 17 | /// If the wallet was created using a full path, the wallet_name will be the full path. 18 | pub name: String, 19 | /// Warning messages, if any, related to creating and loading the wallet. 20 | pub warnings: Vec, 21 | } 22 | 23 | /// Models the result of JSON-RPC method `loadwallet`. 24 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 25 | pub struct LoadWallet { 26 | /// The wallet name if loaded successfully. 27 | pub name: String, 28 | /// Warning messages, if any, related to loading the wallet. 29 | pub warnings: Vec, 30 | } 31 | 32 | /// Models the result of JSON-RPC method `unloadwallet`. 33 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 34 | pub struct UnloadWallet { 35 | /// Warning messages, if any, related to unloading the wallet. 36 | pub warnings: Vec, 37 | } 38 | 39 | /// Models the result of JSON-RPC method `getbalance`. 40 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 41 | pub struct GetBalance(pub Amount); 42 | 43 | /// Models the result of JSON-RPC method `getbalances`. 44 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 45 | pub struct GetBalances { 46 | /// Balances from outputs that the wallet can sign. 47 | pub mine: GetBalancesMine, 48 | pub watch_only: Option, 49 | } 50 | 51 | /// Balances from outputs that the wallet can sign. 52 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 53 | pub struct GetBalancesMine { 54 | /// Trusted balance (outputs created by the wallet or confirmed outputs). 55 | pub trusted: Amount, 56 | /// Untrusted pending balance (outputs created by others that are in the mempool). 57 | pub untrusted_pending: Amount, 58 | /// Balance from immature coinbase outputs. 59 | pub immature: Amount, 60 | /// Balance from coins sent to addresses that were previously spent from (potentially privacy violating). 61 | /// 62 | /// Only present if `avoid_reuse` is set. 63 | pub used: Option, 64 | } 65 | 66 | /// Hash and height of the block this information was generated on. 67 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 68 | pub struct GetBalancesWatchOnly { 69 | /// Trusted balance (outputs created by the wallet or confirmed outputs). 70 | pub trusted: Amount, 71 | /// Untrusted pending balance (outputs created by others that are in the mempool). 72 | pub untrusted_pending: Amount, 73 | /// Balance from immature coinbase outputs. 74 | pub immature: Amount, 75 | } 76 | 77 | /// Models the result of JSON-RPC method `getnewaddress`. 78 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 79 | pub struct GetNewAddress(pub Address); 80 | 81 | /// Models the result of JSON-RPC method `sendtoaddress`. 82 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 83 | pub struct SendToAddress { 84 | /// The transaction id. 85 | pub txid: Txid, 86 | } 87 | 88 | /// Models the result of JSON-RPC method `gettransaction`. 89 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 90 | pub struct GetTransaction { 91 | #[serde(default, with = "bitcoin::amount::serde::as_btc")] 92 | pub amount: SignedAmount, 93 | #[serde(default, with = "bitcoin::amount::serde::as_btc::opt")] 94 | pub fee: Option, 95 | pub confirmations: u32, 96 | pub txid: Txid, 97 | pub time: u64, 98 | pub time_received: u64, 99 | pub bip125_replaceable: String, 100 | pub details: Vec, 101 | pub tx: Transaction, 102 | } 103 | 104 | /// Part of the `GetTransaction`. 105 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 106 | pub struct GetTransactionDetail { 107 | pub address: Address, 108 | pub category: GetTransactionDetailCategory, 109 | #[serde(default, with = "bitcoin::amount::serde::as_btc")] 110 | pub amount: SignedAmount, 111 | pub label: Option, 112 | pub vout: u32, 113 | #[serde(default, with = "bitcoin::amount::serde::as_btc::opt")] 114 | pub fee: Option, 115 | pub abandoned: Option, 116 | } 117 | 118 | /// Enum to represent the category of a transaction. 119 | #[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] 120 | pub enum GetTransactionDetailCategory { 121 | Send, 122 | Receive, 123 | Generate, 124 | Immature, 125 | Orphan, 126 | } 127 | -------------------------------------------------------------------------------- /json/src/model/zmq.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! Types for methods found under the `== Zmq ==` section of the API docs. 4 | //! 5 | //! These structs model the types returned by the JSON-RPC API but have concrete types 6 | //! and are not specific to a specific version of Bitcoin Core. 7 | -------------------------------------------------------------------------------- /json/src/v17/control.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.17.1 - control. 4 | //! 5 | //! Types for methods found under the `== Control ==` section of the API docs. 6 | 7 | use std::collections::HashMap; 8 | 9 | use serde::{Deserialize, Serialize}; 10 | 11 | /// Result of JSON-RPC method `getmemoryinfo`. 12 | /// 13 | /// We only support the default "stats" mode. 14 | /// 15 | /// > getmemoryinfo ("mode") 16 | /// 17 | /// > Returns an object containing information about memory usage. 18 | /// 19 | /// > Arguments: 20 | /// > 1. "mode" determines what kind of information is returned. This argument is optional, the default mode is "stats". 21 | /// > - "stats" returns general statistics about memory usage in the daemon. 22 | /// > - "mallocinfo" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+). 23 | // This just mimics the map returned by my instance of Core v0.17.1, I don't know how 24 | // to handle other map values or if they exist? 25 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 26 | pub struct GetMemoryInfoStats(pub HashMap); 27 | 28 | /// Information about locked memory manager. 29 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 30 | pub struct Locked { 31 | /// Number of bytes used. 32 | pub used: u64, 33 | /// Number of bytes available in current arenas. 34 | pub free: u64, 35 | /// Total number of bytes managed. 36 | pub total: u64, 37 | /// Amount of bytes that succeeded locking. 38 | /// 39 | /// If this number is smaller than total, locking pages failed at some point and key data could 40 | /// be swapped to disk. 41 | pub locked: u64, 42 | /// Number allocated chunks. 43 | pub chunks_used: u64, 44 | /// Number unused chunks. 45 | pub chunks_free: u64, 46 | } 47 | 48 | /// Result of JSON-RPC method `logging`. 49 | /// 50 | /// > logging ( `` `` ) 51 | /// 52 | /// > Gets and sets the logging configuration. 53 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 54 | pub struct Logging { 55 | pub net: bool, 56 | pub tor: bool, 57 | pub mempool: bool, 58 | pub http: bool, 59 | pub bench: bool, 60 | pub zmq: bool, 61 | pub db: bool, 62 | pub rpc: bool, 63 | pub estimatefee: bool, 64 | pub addrman: bool, 65 | pub selectcoins: bool, 66 | pub reindex: bool, 67 | pub cmpctblock: bool, 68 | pub rand: bool, 69 | pub prune: bool, 70 | pub proxy: bool, 71 | pub mempoolrej: bool, 72 | pub libevent: bool, 73 | pub coindb: bool, 74 | pub qt: bool, 75 | pub leveldb: bool, 76 | } 77 | 78 | /// Result of JSON-RPC method `uptime`. 79 | /// 80 | /// > uptime 81 | /// > 82 | /// > Returns the total uptime of the server. 83 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 84 | pub struct Uptime { 85 | /// The number of seconds that the server has been running. 86 | ttt: u32, 87 | } 88 | -------------------------------------------------------------------------------- /json/src/v17/generating.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.17.1 - generating. 4 | //! 5 | //! Types for methods found under the `== Generating ==` section of the API docs. 6 | 7 | use bitcoin::{hex, BlockHash}; 8 | use serde::{Deserialize, Serialize}; 9 | 10 | use crate::model; 11 | 12 | /// Result of JSON-RPC method `generate`. 13 | /// 14 | /// > generate nblocks ( maxtries ) 15 | /// > 16 | /// > Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet. 17 | /// > 18 | /// > Arguments: 19 | /// > 1. nblocks (numeric, required) How many blocks are generated immediately. 20 | /// > 2. maxtries (numeric, optional) How many iterations to try (default = 1000000). 21 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 22 | pub struct Generate(Vec); 23 | 24 | impl Generate { 25 | /// Converts version specific type to a version in-specific, more strongly typed type. 26 | pub fn into_model(self) -> Result { 27 | let v = self.0.iter().map(|s| s.parse::()).collect::, _>>()?; 28 | Ok(model::Generate(v)) 29 | } 30 | } 31 | 32 | /// Result of JSON-RPC method `generatetoaddress`. 33 | /// 34 | /// > generatetoaddress nblocks "address" ( maxtries ) 35 | /// > 36 | /// > Mine blocks immediately to a specified address (before the RPC call returns) 37 | /// > 38 | /// > Arguments: 39 | /// > 1. nblocks (numeric, required) How many blocks are generated immediately. 40 | /// > 2. address (string, required) The address to send the newly generated bitcoin to. 41 | /// > 3. maxtries (numeric, optional, default=1000000) How many iterations to try. 42 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 43 | pub struct GenerateToAddress( 44 | /// Hashes of blocks generated. 45 | pub Vec, 46 | ); 47 | 48 | impl GenerateToAddress { 49 | /// Converts version specific type to a version in-specific, more strongly typed type. 50 | pub fn into_model(self) -> Result { 51 | let v = self.0.iter().map(|s| s.parse::()).collect::, _>>()?; 52 | Ok(model::GenerateToAddress(v)) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /json/src/v17/mining.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.17.1 - mining. 4 | //! 5 | //! Types for methods found under the `== Mining ==` section of the API docs. 6 | -------------------------------------------------------------------------------- /json/src/v17/raw_transactions.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.17.1 - raw transactions. 4 | //! 5 | //! Types for methods found under the `== Rawtransactions ==` section of the API docs. 6 | 7 | use bitcoin::{hex, Txid}; 8 | use serde::{Deserialize, Serialize}; 9 | 10 | use crate::model; 11 | 12 | /// Result of JSON-RPC method `sendrawtransaction`. 13 | /// 14 | /// > sendrawtransaction "hexstring" ( allowhighfees ) 15 | /// > 16 | /// > Submits raw transaction (serialized, hex-encoded) to local node and network. 17 | /// > 18 | /// > Also see createrawtransaction and signrawtransactionwithkey calls. 19 | /// > 20 | /// > Arguments: 21 | /// > 1. hexstring (string, required) The hex string of the raw transaction 22 | /// > 2. allowhighfees (boolean, optional, default=false) Allow high fees 23 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 24 | pub struct SendRawTransaction(pub String); // The hex encoded txid. 25 | 26 | impl SendRawTransaction { 27 | /// Converts version specific type to a version in-specific, more strongly typed type. 28 | pub fn into_model(self) -> Result { 29 | let txid = self.0.parse::()?; 30 | Ok(model::SendRawTransaction(txid)) 31 | } 32 | 33 | /// Converts json straight to a `bitcoin::Txid`. 34 | pub fn txid(self) -> Result { 35 | let model = self.into_model()?; 36 | Ok(model.0) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /json/src/v17/util.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.17.1 - util. 4 | //! 5 | //! Types for methods found under the `== Util ==` section of the API docs. 6 | -------------------------------------------------------------------------------- /json/src/v17/zmq.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.17.1 - zmq. 4 | //! 5 | //! Types for methods found under the `== Zmq ==` section of the API docs. 6 | -------------------------------------------------------------------------------- /json/src/v18/rpc-api.txt: -------------------------------------------------------------------------------- 1 | == Blockchain == 2 | getbestblockhash 3 | getblock "blockhash" ( verbosity ) 4 | getblockchaininfo 5 | getblockcount 6 | getblockhash height 7 | getblockheader "blockhash" ( verbose ) 8 | getblockstats hash_or_height ( stats ) 9 | getchaintips 10 | getchaintxstats ( nblocks "blockhash" ) 11 | getdifficulty 12 | getmempoolancestors "txid" ( verbose ) 13 | getmempooldescendants "txid" ( verbose ) 14 | getmempoolentry "txid" 15 | getmempoolinfo 16 | getrawmempool ( verbose ) 17 | gettxout "txid" n ( include_mempool ) 18 | gettxoutproof ["txid",...] ( "blockhash" ) 19 | gettxoutsetinfo 20 | preciousblock "blockhash" 21 | pruneblockchain height 22 | savemempool 23 | scantxoutset "action" [scanobjects,...] 24 | verifychain ( checklevel nblocks ) 25 | verifytxoutproof "proof" 26 | 27 | == Control == 28 | getmemoryinfo ( "mode" ) 29 | getrpcinfo 30 | help ( "command" ) 31 | logging ( ["include_category",...] ["exclude_category",...] ) 32 | stop 33 | uptime 34 | 35 | == Generating == 36 | generate nblocks ( maxtries ) 37 | generatetoaddress nblocks "address" ( maxtries ) 38 | 39 | == Mining == 40 | getblocktemplate "template_request" 41 | getmininginfo 42 | getnetworkhashps ( nblocks height ) 43 | prioritisetransaction "txid" ( dummy ) fee_delta 44 | submitblock "hexdata" ( "dummy" ) 45 | submitheader "hexdata" 46 | 47 | == Network == 48 | addnode "node" "command" 49 | clearbanned 50 | disconnectnode ( "address" nodeid ) 51 | getaddednodeinfo ( "node" ) 52 | getconnectioncount 53 | getnettotals 54 | getnetworkinfo 55 | getnodeaddresses ( count ) 56 | getpeerinfo 57 | listbanned 58 | ping 59 | setban "subnet" "command" ( bantime absolute ) 60 | setnetworkactive state 61 | 62 | == Rawtransactions == 63 | analyzepsbt "psbt" 64 | combinepsbt ["psbt",...] 65 | combinerawtransaction ["hexstring",...] 66 | converttopsbt "hexstring" ( permitsigdata iswitness ) 67 | createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable ) 68 | createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable ) 69 | decodepsbt "psbt" 70 | decoderawtransaction "hexstring" ( iswitness ) 71 | decodescript "hexstring" 72 | finalizepsbt "psbt" ( extract ) 73 | fundrawtransaction "hexstring" ( options iswitness ) 74 | getrawtransaction "txid" ( verbose "blockhash" ) 75 | joinpsbts ["psbt",...] 76 | sendrawtransaction "hexstring" ( allowhighfees ) 77 | signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) 78 | testmempoolaccept ["rawtx",...] ( allowhighfees ) 79 | utxoupdatepsbt "psbt" 80 | 81 | == Util == 82 | createmultisig nrequired ["key",...] ( "address_type" ) 83 | deriveaddresses "descriptor" ( range ) 84 | estimatesmartfee conf_target ( "estimate_mode" ) 85 | getdescriptorinfo "descriptor" 86 | signmessagewithprivkey "privkey" "message" 87 | validateaddress "address" 88 | verifymessage "address" "signature" "message" 89 | 90 | == Wallet == 91 | abandontransaction "txid" 92 | abortrescan 93 | addmultisigaddress nrequired ["key",...] ( "label" "address_type" ) 94 | backupwallet "destination" 95 | bumpfee "txid" ( options ) 96 | createwallet "wallet_name" ( disable_private_keys blank ) 97 | dumpprivkey "address" 98 | dumpwallet "filename" 99 | encryptwallet "passphrase" 100 | getaddressesbylabel "label" 101 | getaddressinfo "address" 102 | getbalance ( "dummy" minconf include_watchonly ) 103 | getnewaddress ( "label" "address_type" ) 104 | getrawchangeaddress ( "address_type" ) 105 | getreceivedbyaddress "address" ( minconf ) 106 | getreceivedbylabel "label" ( minconf ) 107 | gettransaction "txid" ( include_watchonly ) 108 | getunconfirmedbalance 109 | getwalletinfo 110 | importaddress "address" ( "label" rescan p2sh ) 111 | importmulti "requests" ( "options" ) 112 | importprivkey "privkey" ( "label" rescan ) 113 | importprunedfunds "rawtransaction" "txoutproof" 114 | importpubkey "pubkey" ( "label" rescan ) 115 | importwallet "filename" 116 | keypoolrefill ( newsize ) 117 | listaddressgroupings 118 | listlabels ( "purpose" ) 119 | listlockunspent 120 | listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" ) 121 | listreceivedbylabel ( minconf include_empty include_watchonly ) 122 | listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed ) 123 | listtransactions ( "label" count skip include_watchonly ) 124 | listunspent ( minconf maxconf ["address",...] include_unsafe query_options ) 125 | listwalletdir 126 | listwallets 127 | loadwallet "filename" 128 | lockunspent unlock ( [{"txid":"hex","vout":n},...] ) 129 | removeprunedfunds "txid" 130 | rescanblockchain ( start_height stop_height ) 131 | sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" ) 132 | sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" ) 133 | sethdseed ( newkeypool "seed" ) 134 | setlabel "address" "label" 135 | settxfee amount 136 | signmessage "address" "message" 137 | signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" ) 138 | unloadwallet ( "wallet_name" ) 139 | walletcreatefundedpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs ) 140 | walletlock 141 | walletpassphrase "passphrase" timeout 142 | walletpassphrasechange "oldpassphrase" "newpassphrase" 143 | walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs ) 144 | 145 | == Zmq == 146 | getzmqnotifications 147 | -------------------------------------------------------------------------------- /json/src/v19/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v0.19.1 - wallet. 4 | //! 5 | //! Types for methods found under the `== Wallet ==` section of the API docs. 6 | 7 | use bitcoin::amount::ParseAmountError; 8 | use bitcoin::Amount; 9 | use serde::{Deserialize, Serialize}; 10 | 11 | use crate::model; 12 | 13 | /// Result of the JSON-RPC method `getbalances`. 14 | /// 15 | /// > getbalances 16 | /// > 17 | /// > Returns an object with all balances in BTC. 18 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 19 | pub struct GetBalances { 20 | /// Balances from outputs that the wallet can sign. 21 | pub mine: GetBalancesMine, 22 | #[serde(rename = "watchonly")] 23 | pub watch_only: Option, 24 | } 25 | 26 | /// Balances from outputs that the wallet can sign. 27 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 28 | pub struct GetBalancesMine { 29 | /// Trusted balance (outputs created by the wallet or confirmed outputs). 30 | pub trusted: f64, 31 | /// Untrusted pending balance (outputs created by others that are in the mempool). 32 | pub untrusted_pending: f64, 33 | /// Balance from immature coinbase outputs. 34 | pub immature: f64, 35 | /// Balance from coins sent to addresses that were previously spent from (potentially privacy violating). 36 | /// 37 | /// Only present if `avoid_reuse` is set. 38 | pub used: Option, 39 | } 40 | 41 | /// Hash and height of the block this information was generated on. 42 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 43 | pub struct GetBalancesWatchOnly { 44 | /// Trusted balance (outputs created by the wallet or confirmed outputs). 45 | pub trusted: f64, 46 | /// Untrusted pending balance (outputs created by others that are in the mempool). 47 | pub untrusted_pending: f64, 48 | /// Balance from immature coinbase outputs. 49 | pub immature: f64, 50 | } 51 | 52 | impl GetBalances { 53 | /// Converts version specific type to a version in-specific, more strongly typed type. 54 | pub fn into_model(self) -> Result { 55 | let mine = self.mine.into_model()?; 56 | let watch_only = self.watch_only.map(|watch_only| watch_only.into_model()).transpose()?; 57 | 58 | Ok(model::GetBalances { mine, watch_only }) 59 | } 60 | } 61 | 62 | impl GetBalancesMine { 63 | /// Converts version specific type to a version in-specific, more strongly typed type. 64 | pub fn into_model(self) -> Result { 65 | let trusted = Amount::from_btc(self.trusted)?; 66 | let untrusted_pending = Amount::from_btc(self.untrusted_pending)?; 67 | let immature = Amount::from_btc(self.immature)?; 68 | let used = self.used.map(Amount::from_btc).transpose()?; 69 | 70 | Ok(model::GetBalancesMine { trusted, untrusted_pending, immature, used }) 71 | } 72 | } 73 | 74 | impl GetBalancesWatchOnly { 75 | /// Converts version specific type to a version in-specific, more strongly typed type. 76 | pub fn into_model(self) -> Result { 77 | let trusted = Amount::from_btc(self.trusted)?; 78 | let untrusted_pending = Amount::from_btc(self.untrusted_pending)?; 79 | let immature = Amount::from_btc(self.immature)?; 80 | 81 | Ok(model::GetBalancesWatchOnly { trusted, untrusted_pending, immature }) 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /json/src/v22/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v22 - wallet. 4 | //! 5 | //! Types for methods found under the `== Wallet ==` section of the API docs. 6 | 7 | use serde::{Deserialize, Serialize}; 8 | 9 | use crate::model; 10 | 11 | /// Result of the JSON-RPC method `unloadwallet`. 12 | /// 13 | /// > unloadwallet ( "wallet_name" load_on_startup ) 14 | /// > 15 | /// > Unloads the wallet referenced by the request endpoint, otherwise unloads the wallet specified in the argument. 16 | /// > Specifying the wallet name on a wallet endpoint is invalid. 17 | /// > 18 | /// > Arguments: 19 | /// > 1. wallet_name (string, optional, default=the wallet name from the RPC endpoint) The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical. 20 | /// > 2. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. 21 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 22 | pub struct UnloadWallet { 23 | /// Warning messages, if any, related to unloading the wallet. 24 | pub warning: String, 25 | } 26 | 27 | impl UnloadWallet { 28 | /// Converts version specific type to a version in-specific, more strongly typed type. 29 | pub fn into_model(self) -> model::UnloadWallet { 30 | model::UnloadWallet { warnings: vec![self.warning] } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /json/src/v25/wallet.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v25 - wallet. 4 | //! 5 | //! Types for methods found under the `== Wallet ==` section of the API docs. 6 | 7 | use serde::{Deserialize, Serialize}; 8 | 9 | use crate::model; 10 | 11 | /// Result of the JSON-RPC method `createwallet`. 12 | /// 13 | /// > createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup external_signer ) 14 | /// 15 | /// > Creates and loads a new wallet. 16 | /// 17 | /// > Arguments: 18 | /// > 1. wallet_name (string, required) The name for the new wallet. If this is a path, the wallet will be created at the path location. 19 | /// > 2. disable_private_keys (boolean, optional, default=false) Disable the possibility of private keys (only watchonlys are possible in this mode). 20 | /// > 3. blank (boolean, optional, default=false) Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed. 21 | /// > 4. passphrase (string, optional) Encrypt the wallet with this passphrase. 22 | /// > 5. avoid_reuse (boolean, optional, default=false) Keep track of coin reuse, and treat dirty and clean coins differently with privacy considerations in mind. 23 | /// > 6. descriptors (boolean, optional, default=true) Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation. Setting to "false" will create a legacy wallet; however, the legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future. 24 | /// > 7. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. 25 | /// > 8. external_signer (boolean, optional, default=false) Use an external signer such as a hardware wallet. Requires -signer to be configured. Wallet creation will fail if keys cannot be fetched. Requires disable_private_keys and descriptors set to true. 26 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 27 | pub struct CreateWallet { 28 | /// The wallet name if created successfully. 29 | /// 30 | /// If the wallet was created using a full path, the wallet_name will be the full path. 31 | pub name: String, 32 | /// Warning messages, if any, related to creating and loading the wallet. 33 | pub warnings: Option>, 34 | } 35 | 36 | impl CreateWallet { 37 | /// Converts version specific type to a version in-specific, more strongly typed type. 38 | pub fn into_model(self) -> model::CreateWallet { 39 | model::CreateWallet { name: self.name, warnings: self.warnings.unwrap_or_default() } 40 | } 41 | 42 | /// Returns the created wallet name. 43 | pub fn name(self) -> String { self.into_model().name } 44 | } 45 | 46 | /// Result of the JSON-RPC method `loadwallet`. 47 | /// 48 | /// > loadwallet "filename" ( load_on_startup ) 49 | /// 50 | /// > Loads a wallet from a wallet file or directory. 51 | /// > Note that all wallet command-line options used when starting bitcoind will be 52 | /// > applied to the new wallet. 53 | /// 54 | /// > Arguments: 55 | /// > 1. filename (string, required) The wallet directory or .dat file. 56 | /// > 2. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. 57 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 58 | pub struct LoadWallet { 59 | /// The wallet name if loaded successfully. 60 | pub name: String, 61 | /// Warning messages, if any, related to loading the wallet. 62 | pub warnings: Option>, 63 | } 64 | 65 | impl LoadWallet { 66 | /// Converts version specific type to a version in-specific, more strongly typed type. 67 | pub fn into_model(self) -> model::LoadWallet { 68 | model::LoadWallet { name: self.name, warnings: self.warnings.unwrap_or_default() } 69 | } 70 | 71 | /// Returns the loaded wallet name. 72 | pub fn name(self) -> String { self.into_model().name } 73 | } 74 | -------------------------------------------------------------------------------- /json/src/v28/blockchain.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v28.0 - blockchain. 4 | //! 5 | //! Types for methods found under the `== Blockchain ==` section of the API docs. 6 | 7 | use std::collections::BTreeMap; 8 | 9 | use bitcoin::{BlockHash, Network, Work}; 10 | use serde::{Deserialize, Serialize}; 11 | 12 | use super::{GetBlockchainInfoError, Softfork}; 13 | use crate::model; 14 | 15 | #[rustfmt::skip] // Keep public re-exports separate. 16 | 17 | /// Result of JSON-RPC method `getblockchaininfo`. 18 | /// 19 | /// Method call: `getblockchaininfo` 20 | /// 21 | /// > Returns an object containing various state info regarding blockchain processing. 22 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 23 | pub struct GetBlockchainInfo { 24 | /// Current network name as defined in BIP70 (main, test, signet, regtest). 25 | pub chain: String, 26 | /// The current number of blocks processed in the server. 27 | pub blocks: i64, 28 | /// The current number of headers we have validated. 29 | pub headers: i64, 30 | /// The hash of the currently best block. 31 | #[serde(rename = "bestblockhash")] 32 | pub best_block_hash: String, 33 | /// The current difficulty. 34 | pub difficulty: f64, 35 | /// Median time for the current best block. 36 | #[serde(rename = "mediantime")] 37 | pub median_time: i64, 38 | /// Estimate of verification progress (between 0 and 1). 39 | #[serde(rename = "verificationprogress")] 40 | pub verification_progress: f64, 41 | /// Estimate of whether this node is in Initial Block Download (IBD) mode. 42 | #[serde(rename = "initialblockdownload")] 43 | pub initial_block_download: bool, 44 | /// Total amount of work in active chain, in hexadecimal. 45 | #[serde(rename = "chainwork")] 46 | pub chain_work: String, 47 | /// The estimated size of the block and undo files on disk. 48 | pub size_on_disk: u64, 49 | /// If the blocks are subject to pruning. 50 | pub pruned: bool, 51 | /// Lowest-height complete block stored (only present if pruning is enabled). 52 | #[serde(rename = "pruneheight")] 53 | pub prune_height: Option, 54 | /// Whether automatic pruning is enabled (only present if pruning is enabled). 55 | pub automatic_pruning: Option, 56 | /// The target size used by pruning (only present if automatic pruning is enabled). 57 | pub prune_target_size: Option, 58 | /// Status of softforks in progress, maps softfork name -> [`Softfork`]. 59 | #[serde(default)] 60 | pub softforks: BTreeMap, 61 | /// Any network and blockchain warnings. 62 | pub warnings: Vec, 63 | } 64 | 65 | impl GetBlockchainInfo { 66 | /// Converts version specific type to a version in-specific, more strongly typed type. 67 | pub fn into_model(self) -> Result { 68 | use GetBlockchainInfoError as E; 69 | 70 | let chain = Network::from_core_arg(&self.chain).map_err(E::Chain)?; 71 | let best_block_hash = 72 | self.best_block_hash.parse::().map_err(E::BestBlockHash)?; 73 | let chain_work = Work::from_unprefixed_hex(&self.chain_work).map_err(E::ChainWork)?; 74 | let prune_height = 75 | self.prune_height.map(|h| crate::to_u32(h, "prune_height")).transpose()?; 76 | let prune_target_size = 77 | self.prune_target_size.map(|h| crate::to_u32(h, "prune_target_size")).transpose()?; 78 | let softforks = BTreeMap::new(); // TODO: Handle softforks stuff. 79 | 80 | Ok(model::GetBlockchainInfo { 81 | chain, 82 | blocks: crate::to_u32(self.blocks, "blocks")?, 83 | headers: crate::to_u32(self.headers, "headers")?, 84 | best_block_hash, 85 | difficulty: self.difficulty, 86 | median_time: crate::to_u32(self.median_time, "median_time")?, 87 | verification_progress: self.verification_progress, 88 | initial_block_download: self.initial_block_download, 89 | chain_work, 90 | size_on_disk: self.size_on_disk, 91 | pruned: self.pruned, 92 | prune_height, 93 | automatic_pruning: self.automatic_pruning, 94 | prune_target_size, 95 | softforks, 96 | warnings: self.warnings, 97 | }) 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /json/src/v28/network.rs: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: CC0-1.0 2 | 3 | //! The JSON-RPC API for Bitcoin Core v28.0 - network. 4 | //! 5 | //! Types for methods found under the `== Network ==` section of the API docs. 6 | use serde::{Deserialize, Serialize}; 7 | 8 | use super::{GetNetworkInfoAddress, GetNetworkInfoError, GetNetworkInfoNetwork}; 9 | use crate::model; 10 | 11 | /// Result of the JSON-RPC method `getnetworkinfo`. 12 | /// 13 | /// > getnetworkinfo 14 | /// 15 | /// > Returns an object containing various state info regarding P2P networking. 16 | #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] 17 | pub struct GetNetworkInfo { 18 | /// The server version. 19 | pub version: usize, 20 | /// The server subversion string. 21 | pub subversion: String, 22 | /// The protocol version. 23 | #[serde(rename = "protocolversion")] 24 | pub protocol_version: usize, 25 | /// The services we offer to the network (hex string). 26 | #[serde(rename = "localservices")] 27 | pub local_services: String, 28 | /// `true` if transaction relay is requested from peers. 29 | #[serde(rename = "localrelay")] 30 | pub local_relay: bool, 31 | /// The time offset. 32 | #[serde(rename = "timeoffset")] 33 | pub time_offset: isize, 34 | /// The total number of connections. 35 | pub connections: usize, 36 | /// Whether p2p networking is enabled. 37 | #[serde(rename = "networkactive")] 38 | pub network_active: bool, 39 | /// Information per network. 40 | pub networks: Vec, 41 | /// Minimum relay fee rate for transactions in BTC/kB. 42 | #[serde(rename = "relayfee")] 43 | pub relay_fee: f64, 44 | /// Minimum fee rate increment for mempool limiting or replacement in BTC/kB. 45 | #[serde(rename = "incrementalfee")] 46 | pub incremental_fee: f64, 47 | /// List of local addresses. 48 | #[serde(rename = "localaddresses")] 49 | pub local_addresses: Vec, 50 | /// Any network and blockchain warnings. 51 | pub warnings: Vec, 52 | } 53 | 54 | impl GetNetworkInfo { 55 | /// Converts version specific type to a version in-specific, more strongly typed type. 56 | pub fn into_model(self) -> Result { 57 | use GetNetworkInfoError as E; 58 | 59 | let relay_fee = crate::btc_per_kb(self.relay_fee).map_err(E::RelayFee)?; 60 | let incremental_fee = crate::btc_per_kb(self.incremental_fee).map_err(E::IncrementalFee)?; 61 | 62 | Ok(model::GetNetworkInfo { 63 | version: self.version, 64 | subversion: self.subversion, 65 | protocol_version: self.protocol_version, 66 | local_services: self.local_services, 67 | local_relay: self.local_relay, 68 | time_offset: self.time_offset, 69 | connections: self.connections, 70 | network_active: self.network_active, 71 | networks: self.networks.into_iter().map(|n| n.into_model()).collect(), 72 | relay_fee, 73 | incremental_fee, 74 | local_addresses: self.local_addresses.into_iter().map(|a| a.into_model()).collect(), 75 | warnings: self.warnings, 76 | }) 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /jsonrpc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "jsonrpc" 3 | version = "0.18.0" 4 | authors = ["Andrew Poelstra "] 5 | license = "CC0-1.0" 6 | repository = "https://github.com/rust-bitcoin/rust-bitcoind-json-rpc/" 7 | documentation = "https://docs.rs/jsonrpc/" 8 | description = "Rust support for the JSON-RPC 2.0 protocol" 9 | keywords = [ "protocol", "json", "http", "jsonrpc" ] 10 | readme = "README.md" 11 | edition = "2021" 12 | rust-version = "1.63.0" 13 | exclude = ["tests", "contrib"] 14 | 15 | [package.metadata.docs.rs] 16 | all-features = true 17 | rustdoc-args = ["--cfg", "docsrs"] 18 | 19 | [features] 20 | default = [ "simple_http", "simple_tcp" ] 21 | # A bare-minimum HTTP transport. 22 | simple_http = [ "base64" ] 23 | # A transport that uses `minreq` as the HTTP client. 24 | minreq_http = [ "base64", "minreq" ] 25 | # Basic transport over a raw TcpListener 26 | simple_tcp = [] 27 | # Basic transport over a raw UnixStream 28 | simple_uds = [] 29 | # Enable Socks5 Proxy in transport 30 | proxy = ["socks"] 31 | 32 | [dependencies] 33 | serde = { version = "1", features = ["derive"] } 34 | serde_json = { version = "1", features = [ "raw_value" ] } 35 | 36 | base64 = { version = "0.13.0", optional = true } 37 | minreq = { version = "2.7.0", features = ["json-using-serde"], optional = true } 38 | socks = { version = "0.3.4", optional = true} 39 | 40 | [lints.rust] 41 | unexpected_cfgs = { level = "deny", check-cfg = ['cfg(jsonrpc_fuzz)'] } 42 | -------------------------------------------------------------------------------- /jsonrpc/README.md: -------------------------------------------------------------------------------- 1 | [![Status](https://travis-ci.org/apoelstra/rust-jsonrpc.png?branch=master)](https://travis-ci.org/apoelstra/rust-jsonrpc) 2 | 3 | # Rust Version compatibility 4 | 5 | This library is compatible with Rust **1.63.0** or higher. 6 | 7 | # Rust JSONRPC Client 8 | 9 | Rudimentary support for sending JSONRPC 2.0 requests and receiving responses. 10 | 11 | As an example, hit a local bitcoind JSON-RPC endpoint and call the `uptime` command. 12 | 13 | ```rust 14 | use jsonrpc::Client; 15 | use jsonrpc::simple_http::{self, SimpleHttpTransport}; 16 | 17 | fn client(url: &str, user: &str, pass: &str) -> Result { 18 | let t = SimpleHttpTransport::builder() 19 | .url(url)? 20 | .auth(user, Some(pass)) 21 | .build(); 22 | 23 | Ok(Client::with_transport(t)) 24 | } 25 | 26 | // Demonstrate an example JSON-RCP call against bitcoind. 27 | fn main() { 28 | let client = client("localhost:18443", "user", "pass").expect("failed to create client"); 29 | let request = client.build_request("uptime", None); 30 | let response = client.send_request(request).expect("send_request failed"); 31 | 32 | // For other commands this would be a struct matching the returned json. 33 | let result: u64 = response.result().expect("response is an error, use check_error"); 34 | println!("bitcoind uptime: {}", result); 35 | } 36 | ``` 37 | 38 | ## Githooks 39 | 40 | To assist devs in catching errors _before_ running CI we provide some githooks. If you do not 41 | already have locally configured githooks you can use the ones in this repository by running, in the 42 | root directory of the repository: 43 | ``` 44 | git config --local core.hooksPath githooks/ 45 | ``` 46 | 47 | Alternatively add symlinks in your `.git/hooks` directory to any of the githooks we provide. 48 | -------------------------------------------------------------------------------- /jsonrpc/contrib/test_vars.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # `rust-jsonrpc` does not have a std feature. 4 | FEATURES_WITH_STD="" 5 | 6 | # So this is the var to use for all tests. 7 | FEATURES_WITHOUT_STD="simple_http minreq_http simple_tcp simple_uds proxy" 8 | 9 | # Run these examples. 10 | EXAMPLES="" 11 | -------------------------------------------------------------------------------- /jsonrpc/src/http/mod.rs: -------------------------------------------------------------------------------- 1 | //! HTTP transport modules. 2 | 3 | #[cfg(feature = "simple_http")] 4 | pub mod simple_http; 5 | 6 | #[cfg(feature = "minreq_http")] 7 | pub mod minreq_http; 8 | 9 | /// The default TCP port to use for connections. 10 | /// Set to 8332, the default RPC port for bitcoind. 11 | pub const DEFAULT_PORT: u16 = 8332; 12 | 13 | /// The Default SOCKS5 Port to use for proxy connection. 14 | /// Set to 9050, the default RPC port for tor. 15 | // Currently only used by `simple_http` module, here for consistency. 16 | #[cfg(feature = "proxy")] 17 | pub const DEFAULT_PROXY_PORT: u16 = 9050; 18 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | default: 2 | @just --list 3 | 4 | # Cargo build everything. 5 | build: 6 | cargo build --workspace --all-targets --all-features 7 | 8 | # Cargo check everything. 9 | check: 10 | cargo check --workspace --all-targets --all-features 11 | 12 | # Lint everything. 13 | lint: 14 | cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings 15 | 16 | # Run cargo fmt 17 | fmt: 18 | cargo +$(cat ./nightly-version) fmt --all 19 | 20 | # Check the formatting 21 | format: 22 | cargo +$(cat ./nightly-version) fmt --all --check 23 | 24 | # Generate documentation. 25 | docsrs *flags: 26 | RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc --all-features {{flags}} 27 | 28 | # Update the recent and minimal lock files. 29 | update-lock-files: 30 | contrib/update-lock-files.sh 31 | -------------------------------------------------------------------------------- /nightly-version: -------------------------------------------------------------------------------- 1 | nightly-2024-09-01 2 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | # Dev notes 2 | 3 | ## TODOs 4 | 5 | - Scrape all the integration tests from Bitcoin Core python code and 6 | run them here. 7 | 8 | - Change in-specific to non-specific 9 | 10 | -------------------------------------------------------------------------------- /regtest/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.3.0 - 2024-06-21 2 | 3 | - Call `into_model` when creating/loading wallet. 4 | 5 | # 0.2.1 - 2024-06-17 6 | 7 | Do various little fixes to try and make the docs on `Client` more legible, specifically to alleviate 8 | confusion around the flag on `docs.rs` that says "Available on crate feature 26_0 only." 9 | 10 | # 0.2.0 - 2024-06-13 11 | 12 | - Use Bitcoin Core 0.17.1 (0.17.2 seems to not exist and have been a mistake). 13 | 14 | # 0.1.0 - 2024-06-13 15 | 16 | Initial release, this is an import of `bitcoind v.036.0`. 17 | 18 | -------------------------------------------------------------------------------- /regtest/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bitcoind-json-rpc-regtest" 3 | version = "0.3.0" 4 | authors = ["Riccardo Casatta ", "Tobin C. Harding "] 5 | license = "MIT" 6 | repository = "https://github.com/rust-bitcoin/rust-bitcoind-json-rpc" 7 | description = "Utility to run a regtest bitcoind process, useful in integration testing environments" 8 | categories = ["cryptography::cryptocurrencies", "development-tools::testing"] 9 | keywords = ["bitcoin", "bitcoind", "json-rpc"] 10 | readme = "README.md" 11 | edition = "2021" 12 | rust-version = "1.63.0" 13 | exclude = ["tests", "contrib"] 14 | 15 | [dependencies] 16 | bitcoind-json-rpc-client = { version = "0.3", features = ["client-sync"] } 17 | log = "0.4" 18 | which = "4.2.5" 19 | anyhow = "1.0.66" 20 | tempfile = "3" 21 | serde_json = { version = "1.0.117" } 22 | 23 | [dev-dependencies] 24 | env_logger = "0.9.0" 25 | 26 | [build-dependencies] 27 | bitcoin_hashes = { version = ">= 0.13, <= 0.14", optional = true } 28 | flate2 = { version = "1.0", optional = true } 29 | tar = { version = "0.4", optional = true } 30 | minreq = { version = "2.9.1", default-features = false, features = [ 31 | "https", 32 | ], optional = true } 33 | zip = { version = "0.6", optional = true } 34 | anyhow = "1.0.66" 35 | 36 | # Please note, in this crate the version features are mutally exclusive. 37 | # 38 | # - `cargo test --all-features` is the same as `cargo test --features=v28_0` 39 | # - `cargo test --no-default-features` uses `v28_0` also. 40 | [features] 41 | # download is not supposed to be used directly only through selecting one of the version feature 42 | "download" = ["bitcoin_hashes", "flate2", "tar", "minreq", "zip"] 43 | 44 | # We support all minor releases (but only the latest patch release). 45 | "28_0" = ["download", "27_1"] 46 | "27_1" = ["download", "27_0"] 47 | "27_0" = ["download", "26_2"] 48 | "26_2" = ["download", "26_1"] 49 | "26_1" = ["download", "26_0"] 50 | "26_0" = ["download", "25_2"] 51 | "25_2" = ["download", "25_1"] 52 | "25_1" = ["download", "25_0"] 53 | "25_0" = ["download", "24_2"] 54 | "24_2" = ["download", "24_1"] 55 | "24_1" = ["download", "24_0_1"] 56 | "24_0_1" = ["download", "23_2"] 57 | "23_2" = ["download", "23_1"] 58 | "23_1" = ["download", "23_0"] 59 | "23_0" = ["download", "22_1"] 60 | "22_1" = ["download", "22_0"] 61 | "22_0" = ["download", "0_21_2"] 62 | # We only support the latest minor version for these. 63 | "0_21_2" = ["download", "0_20_2"] 64 | "0_20_2" = ["download", "0_19_1"] 65 | "0_19_1" = ["download", "0_18_1"] 66 | "0_18_1" = ["download", "0_17_1"] 67 | "0_17_1" = ["download"] 68 | 69 | "doc" = [] # used only for documentation building 70 | 71 | 72 | [package.metadata.docs.rs] 73 | features = ["download", "doc", "26_2"] 74 | rustdoc-args = ["--cfg", "docsrs"] 75 | 76 | [patch.crates-io.bitcoind-json-rpc-client] 77 | path = "../client" 78 | 79 | [patch.crates-io.bitcoind-json-rpc-types] 80 | path = "../json" 81 | -------------------------------------------------------------------------------- /regtest/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Riccardo Casatta 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /regtest/README.md: -------------------------------------------------------------------------------- 1 | # Bitcoind 2 | 3 | Utility to run a regtest bitcoind process, useful in integration testing environment. 4 | 5 | When the auto-download feature is selected by activating one of the version feature, such as `25_1` 6 | for bitcoin core 25.1, starting a regtest node is as simple as that: 7 | 8 | ```rust 9 | // the download feature is enabled whenever a specific version is enabled, for example `25_1` or `24_0_1` 10 | #[cfg(feature = "download")] 11 | { 12 | let bitcoind = bitcoind::BitcoinD::from_downloaded().unwrap(); 13 | assert_eq!(0, bitcoind.client.get_blockchain_info().unwrap().blocks); 14 | } 15 | ``` 16 | 17 | The build script will automatically download the bitcoin core version 25.1 from [bitcoin core](https://bitcoincore.org), 18 | verify the binary hash and place it in the build directory for this crate. 19 | 20 | When you don't use the auto-download feature you have the following options: 21 | 22 | * have `bitcoind` executable in the `PATH` 23 | * provide the `bitcoind` executable via the `BITCOIND_EXE` env var 24 | 25 | ```rust 26 | if let Ok(exe_path) = bitcoind::exe_path() { 27 | let bitcoind = bitcoind::BitcoinD::new(exe_path).unwrap(); 28 | assert_eq!(0, bitcoind.client.get_blockchain_info().unwrap().blocks); 29 | } 30 | ``` 31 | 32 | Startup options could be configured via the [`Conf`] struct using [`BitcoinD::with_conf`] or 33 | [`BitcoinD::from_downloaded_with_conf`] 34 | 35 | ## Features 36 | 37 | * Waits until bitcoind daemon becomes ready to accept RPC commands 38 | * `bitcoind` uses a temporary directory as datadir. You can specify the root of your temp 39 | directories so that you have the node's datadir in a RAM disk (eg `/dev/shm`) 40 | * Free ports are requested from the OS. Since you can't reserve the given port, a low probability 41 | race condition is still possible, for this reason the process attempts spawning 3 times with 42 | different ports. 43 | * The process is killed when the struct goes out of scope no matter how the test finishes. 44 | * Allows easy spawning of dependent processes like: 45 | - [electrs](https://github.com/RCasatta/electrsd) 46 | - [cln](https://github.com/RCasatta/lightningd) 47 | - [elements](https://github.com/RCasatta/elementsd) 48 | 49 | Thanks to these features every `#[test]` could easily run isolated with its own environment. 50 | 51 | ## Doc 52 | 53 | To build docs: 54 | 55 | ```sh 56 | RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features download,doc --open 57 | ``` 58 | 59 | ## MSRV 60 | 61 | The MSRV is 1.56.1 for version 0.35.* 62 | 63 | Note: to respect 1.56.1 MSRV you need to use and older version of some dependencies, in CI the below 64 | dependency versions are pinned: 65 | 66 | ```sh 67 | cargo update 68 | cargo update -p tempfile --precise 3.3.0 69 | cargo update -p log --precise 0.4.18 70 | ``` 71 | 72 | Pinning in `Cargo.toml` is avoided because it could cause compilation issues downstream. 73 | 74 | ## Nix 75 | 76 | For reproducibility reasons, Nix build scripts cannot hit the internet, but the auto-download 77 | feature does exactly that. To successfully build under Nix the user must provide the tarball locally 78 | and specify its location via the `BITCOIND_TARBALL_FILE` env var. 79 | 80 | Another option is to specify the `BITCOIND_SKIP_DOWNLOAD` env var and provide the executable via the 81 | `PATH`. 82 | 83 | Alternatively, use the dep without the auto-download feature. 84 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-0.17.1-SHA256SUMS.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 5659c436ca92eed8ef42d5b2d162ff6283feba220748f9a373a5a53968975e34 bitcoin-0.17.1-aarch64-linux-gnu.tar.gz 5 | aab3c1fb92e47734fadded1d3f9ccf0ac5a59e3cdc28c43a52fcab9f0cb395bc bitcoin-0.17.1-arm-linux-gnueabihf.tar.gz 6 | b1e1dcf8265521fef9021a9d49d8661833e3f844ca9a410a9dd12a617553dda1 bitcoin-0.17.1-i686-pc-linux-gnu.tar.gz 7 | 6aa567381b95a20ac96b0b949701b04729a0c5796c320481bfa1db22da25efdb bitcoin-0.17.1-osx64.tar.gz 8 | e3d785d800b71d277959d15b2c2b33d44dd72c1288e559928a40488dd935c949 bitcoin-0.17.1-osx.dmg 9 | 3e564fb5cf832f39e930e19c83ea53e09cfe6f93a663294ed83a32e194bda42a bitcoin-0.17.1.tar.gz 10 | e9245e682126ef9fa4998eabbbdd1c3959df811dc10df60be626a5e5ffba9b78 bitcoin-0.17.1-win32-setup.exe 11 | 6464aa2d338f3697950613bb88124e58d6ce78ead5e9ecacb5ba79d1e86a4e30 bitcoin-0.17.1-win32.zip 12 | fa1e80c5e4ecc705549a8061e5e7e0aa6b2d26967f99681b5989d9bd938d8467 bitcoin-0.17.1-win64-setup.exe 13 | 1abbe6aa170ce7d8263d262f8cb0ae2a5bb3993aacd2f0c7e5316ae595fe81d7 bitcoin-0.17.1-win64.zip 14 | 53ffca45809127c9ba33ce0080558634101ec49de5224b2998c489b6d0fc2b17 bitcoin-0.17.1-x86_64-linux-gnu.tar.gz 15 | -----BEGIN PGP SIGNATURE----- 16 | Version: GnuPG v1.4.11 (GNU/Linux) 17 | 18 | iQIcBAEBCAAGBQJcIeQ5AAoJEJDIAZ42wulk0NoQAIunIBT06bd2IhhxV/48NUvf 19 | sgTto4qYrKuX5Vkn+kfGuMBvNpmILi5CiVtnucWo7fKM6k5IPMyBQuE9iDVDzT9i 20 | YemA9Au8Xy2aIGmVriuQoXxk8b17wAMS9uw362A3nXCz3kA+BWMDuMfBp3P3NPM/ 21 | PeOg6n04Q7seO/zNdT5i/ysaFB/XA8szrQxCRukSrXeGMUpv79UbcWOu3+nfGit9 22 | yYo/F2yO57Yacv597rKILlg29QxEVTqa5+slMdwuU7NP5AdAcQV4EtFqoCOqM7C7 23 | JL/zZWYnTywK3l0hOuCBJiY86izutWME5xgm7Eh3ORj+K6ZYT4iXw2JIkTdumeuS 24 | X0WDE3ShH4rb35IaQX75FJLp5R7hLTXiNgng7b8Xhy/62bJ75Ob4HVVSLG1Lkhps 25 | vtml10br+78qXiofzk8zaAW6KaG7G9nbBa0hfDjUEsYzA6P5iWA+53ykupc82HNa 26 | ZT2gk+wWhNhZOd/ANheriM0eqm/ZlK7oydYRRtf9Tamk+XJgREU1x8cWlMZcCPEE 27 | uIUzb7/REvYSjwcwArYLCq/eFPfjQe7jcG2WexnpxxkKJBvu2v4zVw9LLUPll094 28 | BAmfk34iJKhN2cGVhvjO0Q9GKk0B2HzvhD5xn1Hnlp+NbXVNbKonYvkB71D3GY4W 29 | t/eRyv7Erfi4dhHf+8oQ 30 | =UEoM 31 | -----END PGP SIGNATURE----- 32 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-0.18.1-SHA256SUMS.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 88f343af72803b851c7da13874cc5525026b0b55e63e1b5e1298390c4688adc6 bitcoin-0.18.1-aarch64-linux-gnu.tar.gz 5 | cc7d483e4b20c5dabd4dcaf304965214cf4934bcc029ca99cbc9af00d3771a1f bitcoin-0.18.1-arm-linux-gnueabihf.tar.gz 6 | 989e847b3e95fc9fedc0b109cae1b4fa43348f2f712e187a118461876af9bd16 bitcoin-0.18.1-i686-pc-linux-gnu.tar.gz 7 | b7bbcee7a7540f711b171d6981f939ca8482005fde22689bc016596d80548bb1 bitcoin-0.18.1-osx64.tar.gz 8 | 063b757820fead6e94eac5a52859bcb6421e23db71e562ddd2ebacdeecc621b7 bitcoin-0.18.1-osx.dmg 9 | 425ee5ec631ae8da71ebc1c3f5c0269c627cf459379b9b030f047107a28e3ef8 bitcoin-0.18.1-riscv64-linux-gnu.tar.gz 10 | 5c7d93f15579e37aa2d1dc79e8f5ac675f59045fceddf604ae0f1550eb03bf96 bitcoin-0.18.1.tar.gz 11 | 3bac0674c0786689167be2b9f35d2d6e91d5477dee11de753fe3b6e22b93d47c bitcoin-0.18.1-win64-setup.exe 12 | b0f94ab43c068bac9c10a59cb3f1b595817256a00b84f0b724f8504b44e1314f bitcoin-0.18.1-win64.zip 13 | 600d1db5e751fa85903e935a01a74f5cc57e1e7473c15fd3e17ed21e202cfe5a bitcoin-0.18.1-x86_64-linux-gnu.tar.gz 14 | -----BEGIN PGP SIGNATURE----- 15 | Version: GnuPG v1.4.11 (GNU/Linux) 16 | 17 | iQIcBAEBCAAGBQJdTRv7AAoJEJDIAZ42wulkf8wP/jADLdlJnXYIZACzR8fMF6Pc 18 | HkDUU9wAspKwynYFIzz2hWT9zG7AANBOpHJFDuRRXklSOsRKGFXpQ9tfhkVrQCX8 19 | nNWXzwRZYb9AZctbUctvj6XGm6+3kGGtCjrQUp3Cs4RDOSlRnhb2pA42g2dU9mcM 20 | V9IkvGnGYka/0i2wYbO7EhgFHKxP0Kff9RmG+HW09sYGw+/3tpgoi0AfwK34vXBu 21 | vxw3Urw3Ch3gf+pZ0GzV3O/kOleCeQDq/w52G1hy4yQC4eNFojY9hN9qBD46LMR/ 22 | wmly1LrWP9H/46+j7wXqHeEoplqPx4M6l6DLaKVWJQqnz4lQXDtZ1Tq5IjgAeT7Z 23 | 7oPNt7pJ11o/mVSGT5wTNF3+i+4FZOnRjQ22nlNtOkpdnNPL9jJYVCO9o17yfNu+ 24 | Qym+6MbN5LpYTzPkMgnY69Ezw+kZAeKmoeigtfrICkJYzOMYpXvj+vPDZZy6dEqf 25 | TS0jsDYMel2YvFopBn+oIvLijnwqtf07oZ1ZERyhKAjot8Hy6242C6yedgIDhpWh 26 | XTOfMifDmF88YRGMu3axpfVDDfZh+MeLpLYNL1TqRTp51MhK7xFBvnApcwCT69og 27 | 6Vxh+1q1lAlyXt+iI2UzXk7PO1fwWbFcYkjWW5n2Eqw1CnUAI1SRfLc/fWzHDSj5 28 | pBqqYxrEUK7+OVqaBdFC 29 | =iy6G 30 | -----END PGP SIGNATURE----- 31 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-0.19.1-SHA256SUMS.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 3a80431717842672df682bdb619e66523b59541483297772a7969413be3502ff bitcoin-0.19.1-aarch64-linux-gnu.tar.gz 5 | 657f28213823d240dd3324d14829702f9ad6f0710f8bdd1c379cb3c447197f48 bitcoin-0.19.1-arm-linux-gnueabihf.tar.gz 6 | 10d1e53208aa7603022f4acc084a046299ab4ccf25fe01e81b3fb6f856772589 bitcoin-0.19.1-i686-pc-linux-gnu.tar.gz 7 | 1ae1b87de26487075cd2fd22e0d4ead87d969bd55c44f2f1d873ecdc6147ebb3 bitcoin-0.19.1-osx64.tar.gz 8 | 206d8d92189d22e735393abebeb7a2e7237a119dd448b4a40df8c357da1287b2 bitcoin-0.19.1-osx.dmg 9 | aa7a9563b48aa79252c8e7b6a41c07a5441bd9f14c5e4562cc72720ea6cb0ee5 bitcoin-0.19.1-riscv64-linux-gnu.tar.gz 10 | f2591d555b8e8c2e1bd780e40d53a91e165d8b3c7e0391ae2d24a0c0f23a7cc0 bitcoin-0.19.1.tar.gz 11 | 69e4d7f710a29be6ead2ef5da2905736b7cea107213ae6ddde3bcca8affbb8fd bitcoin-0.19.1-win64-setup.exe 12 | 56323ec91afecd8e321a2925c0ca5f1da8b2ae1c99f4e08a3652e1dc68908717 bitcoin-0.19.1-win64.zip 13 | 5fcac9416e486d4960e1a946145566350ca670f9aaba99de6542080851122e4c bitcoin-0.19.1-x86_64-linux-gnu.tar.gz 14 | -----BEGIN PGP SIGNATURE----- 15 | Version: GnuPG v1.4.11 (GNU/Linux) 16 | 17 | iQIcBAEBCAAGBQJeZiE8AAoJEJDIAZ42wulkkQsQAIlvZ9Em4wm2jpn4L7QUJgCE 18 | 4Mr6Q/tCPMs4U15q4wkjoBbdP06Bts1DzV0m/qoirTKoTKCCyRwdaeRn+Oj5Kkoh 19 | MuyPt9EEsrnNk80xaPXSpYnhYjqSGrKux+IuHrlZtCy0QEoeIiOVaWWEtEe6I/eU 20 | lvooE8ywxcUvsOwU3Kga0WnCA0WsfwduMAU+LvmtiXgjudsWvoERwHav+eiQva60 21 | kgfwK5W+XI0lt7clFw6zPXBTZeWWhc97fp1uKv7KBPpACHWgKUaXP3WPMHZhsnSF 22 | 1L5fi5EcafjNzbbUusmgo807xThM5eMFZQpzHFZhiFNngW6mjxyEo1m2vrvVE8mN 23 | 1LZ7h1QahdSUVsgr+w/JkN1Wx9WcJyzGvFuH7dIbe1J6kb5IMyUKESEtTkWgJeo4 24 | 5MCk9pwvstAXcXPnWbNolrBo2IB9mrFC9o/9n2ZCyncCofre8BmbIsvxVqBu4hfE 25 | 9E4rCTHDGwWvCDYY68iWdlnyUl9FAvYB8UEOYs4o4f1fDMLdbOEqDojIa7ZnOJwV 26 | oPth/MJxHcaCHNTAk7981LbOyn/oJMMzly4br5WFqWbdgzdXUSBTZDoeT26gdX8P 27 | rnCo7JMvaxcvE8AASD9OpegKZP/E5TnHEzcgkVncABj9gVrsuOm7DlTFsE9YuRv+ 28 | jerPsU4Izg+hoVdUiuPT 29 | =Iefa 30 | -----END PGP SIGNATURE----- 31 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-0.20.2-SHA256SUMS.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 65a29d57ab9c0f4158bdde014c75bd1885542dca43ed414a7e758db1d8ca18a3 bitcoin-0.20.2-aarch64-linux-gnu.tar.gz 5 | ce65624b296dc57444d026d28dc34688e7e8a94b3da137c14ec561bfa02af4c6 bitcoin-0.20.2-arm-linux-gnueabihf.tar.gz 6 | f27d407289ade1f7a9bb1554384728d9a81a0cdc4a1a4f1cadf361f3b5b8512a bitcoin-0.20.2-osx64.tar.gz 7 | 0a370aeeee7aa840e9fdd980dd4c239111c518d8eb4c068f72e1e8ec97a57114 bitcoin-0.20.2-osx.dmg 8 | 6ead5edb50b8afdbb87fa0ca32a09ceaba3c9c489cd56e7376b457d1dea11612 bitcoin-0.20.2-riscv64-linux-gnu.tar.gz 9 | 7e52ef87e37e425227ad0230d3a10421157ff879949b82e8526a1d5877b95593 bitcoin-0.20.2.tar.gz 10 | 6bee1cc525f950bb3c665d37b0dcbcecd84c8d238c2abefcce5ed05043290e8e bitcoin-0.20.2-win64-setup.exe 11 | e8a035e18ff5c62171432990b69586192865c673a6e3f2e4503d7535fe3f81fd bitcoin-0.20.2-win64.zip 12 | 45b724fe928d78d3c8ca0ff8d7f9c1f4c67d4c4c82673b7b93c9e09251473516 bitcoin-0.20.2-x86_64-linux-gnu.tar.gz 13 | -----BEGIN PGP SIGNATURE----- 14 | Version: GnuPG v1.4.11 (GNU/Linux) 15 | 16 | iQIcBAEBCAAGBQJhdqr1AAoJEJDIAZ42wulkSXEP/R7r27CPGPi12X7UznY08CtF 17 | Ycl59GL/WnLC3UIe2PRIoA7dRSbdoJciGo3kOMUhDT6zgZl69SrOH4Jrw/JhKVZE 18 | sqClaoX/+5tp5lWmLal7KLwrxF53ZfeCuErKkTx1PnebZ74j677bIOTy+UjQe76t 19 | 1Tyl/SJCBxCoHOnYAr5UDWW1AgdiY0INBo5yLH6scbVQLuWjOjiGfK15De82jQ1s 20 | oJno90LR5qfC//x2qcDFL4i64uWKbx3qItdIH40Gof9RrnWIpI/wDgSjvFhvcoT1 21 | RSz+qye44FTzmhgXcyQWP+Mjtpbs7DYtObrZT/ik42PeuXfu9gVRk8i7N1gl2/cC 22 | UIERKcpUR/XFM0bHJG7kmDnT3DhCmoOBQQQdm+iZr9TqrI9UQJDNtkV9plj7oZCM 23 | tlcyZQP2TE0YzAZR56Dl1/p/+hnLrzzDyQvjQMHvFPNFwr1/UN/49iuO/mAw6CG0 24 | PGKFSLlpoW2WxlLVUIaLlgj8K3HjR8mx763mpZWivwNHM8qdzQHqU1N3XzM8FlSG 25 | jQpV2uWvIfwruAApVXgYWxh6YeJr81mfQ3QBIbZloDaQOF9xbqKNQfd/6T3w22jr 26 | PjMDOyE3vlRPObkC0Q3eTpFjKoPnuJnmTt800GKzwnziL6i7BusH2NexQjI+H1MT 27 | Jzd2qjgB4BIZVvHItOKy 28 | =cnJX 29 | -----END PGP SIGNATURE----- 30 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-0.21.2-SHA256SUMS.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | c670ead6ad7c45c8c7de9b74445c596a5317573889a98eaae22080a5f7a2574f bitcoin-0.21.2-aarch64-linux-gnu.tar.gz 5 | dfb42778063a2e73e186bdf3634c26612e3dec34b21ec7ecec840f44301b1139 bitcoin-0.21.2-arm-linux-gnueabihf.tar.gz 6 | 7180e9e812a651b8af858949735503d621501b9bb537210f32127dc7aff49bd1 bitcoin-0.21.2-osx64.tar.gz 7 | 1d54ffee40c2b07629e3b1bc4639b4ca098c8f1cc489340a9ea08a812e3d681c bitcoin-0.21.2-osx.dmg 8 | 8a0e2b15908ce1a2dccc9bc1caba006abce0962065c02ee682cb2d1065abe90d bitcoin-0.21.2-riscv64-linux-gnu.tar.gz 9 | 4146f751fc5691bdcf911cbdb8d32d8d25c297d29d58173227ae1ae6438edb9e bitcoin-0.21.2.tar.gz 10 | e9101e1ebd8dbf5b4a987ae685fc082fce4f79969bb1e5fe7f81604112df95da bitcoin-0.21.2-win64-setup.exe 11 | ef4080d9677d9e86f72b61a784f0f39b908a1a7a511372553fc2e22b53022b1f bitcoin-0.21.2-win64.zip 12 | 67aab7c3dd32f7eb0f3d8ecd66f2da31c4cb969aec4c6a57cb8b01d22fe891e0 bitcoin-0.21.2-x86_64-linux-gnu.tar.gz 13 | -----BEGIN PGP SIGNATURE----- 14 | Version: GnuPG v1.4.11 (GNU/Linux) 15 | 16 | iQIcBAEBCAAGBQJhU/kWAAoJEJDIAZ42wulkmnUP/2lCg/yp9Zo647U67RRpNyQs 17 | Ii92BE8ZnTVcPxOrlpgVuQCMfA1QSBvNntVwigY3YsEnyYSsKUdMVEsRf36fVlTs 18 | DXwDIMoGZOkj9uLasrQ+il84eomoFZjY7fCctIMWeeMeqbF2HroE611FajJuEqBF 19 | G1i7U6bbFJKlvfZutGOU8/DrVbhIKjlL0MEinseUEXmQzw90i6vXT98TnXd60w+Y 20 | 4Mj3cD+Qv+9vhuKp0PyxWSbtvsBBNhZoGdB63UlgsYu6Y5UBBM6Zf3vqsRhJ2x7P 21 | ITnkBpiTe9aePi1/3zxWqO29yLxON21FZwrFNLxKupJe2X0ojnXkj/VpSDKPKlU7 22 | SLQpvZ0QTtdTOu9+pa5OV6syfr3xX7bL0o5SRuTZBmvC3O+HgqrVe1Z8Okjgtv6k 23 | Q9RmpRbQou9UFd2NXf6Sx3RYYqNevXVyFhuyjhwUSG1qzY6++E6vNLDN1Z8JDWOB 24 | 8lW49acmXsyzJ+dxuMRY81QTRuS9c/oq4HX48Sf+P35lEaJdne9PEmxDdBD1LJMX 25 | 626gI71OorcFPdaF0uZ8qTUuoezMfH6JlyxNQFHQve2Y6yuToL0+uUkAPUql6CKh 26 | 3PgLeHMrkdswRCcYXKX5Rm8qhFVInaPsQPTcZp1JqWCKho2c0E9LQyE8uRRQXPp2 27 | DrJdnWs6W9X/qrWJu0Y8 28 | =689k 29 | -----END PGP SIGNATURE----- 30 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-22.0-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 9547fa03574f8bde296f707c7d9f7d89827c75c5a28f84402578a4fa92a787ec bitcoin-22.0-aarch64-linux-gnu-debug.tar.gz 2 | ac718fed08570a81b3587587872ad85a25173afa5f9fbbd0c03ba4d1714cfa3e bitcoin-22.0-aarch64-linux-gnu.tar.gz 3 | 80071e0ecd24edfec8a1972b495b9822c79a5d33c7123bff51688638aac97cab bitcoin-22.0-arm-linux-gnueabihf-debug.tar.gz 4 | b8713c6c5f03f5258b54e9f436e2ed6d85449aa24c2c9972f91963d413e86311 bitcoin-22.0-arm-linux-gnueabihf.tar.gz 5 | 8f70852feb39078e02182563517d17bdfc4a12904cf1bdabbae95594d9a1e473 bitcoin-22.0-codesignatures-22.0.tar.gz 6 | d0e9d089b57048b1555efa7cd5a63a7ed042482045f6f33402b1df425bf9613b bitcoin-22.0.tar.gz 7 | bfc04a3c4e8b613bfd9359e54da6cc60f027860e9723f9a6bfd6f13873eb811f bitcoin-22.0-powerpc64-linux-gnu-debug.tar.gz 8 | 2cca5f99007d060aca9d8c7cbd035dfe2f040dd8200b210ce32cdf858479f70d bitcoin-22.0-powerpc64-linux-gnu.tar.gz 9 | 5f0bf1491bc8825ca1506f7cf586030f06bb17a563ccde92e8c75720022704e6 bitcoin-22.0-powerpc64le-linux-gnu-debug.tar.gz 10 | 91b1e012975c5a363b5b5fcc81b5b7495e86ff703ec8262d4b9afcfec633c30d bitcoin-22.0-powerpc64le-linux-gnu.tar.gz 11 | 59b16e63aa935f50fd2813efe7f137187fcf0fff84e3205a9c6cb462a8bb160c bitcoin-22.0-riscv64-linux-gnu-debug.tar.gz 12 | 9cc3a62c469fe57e11485fdd32c916f10ce7a2899299855a2e479256ff49ff3c bitcoin-22.0-riscv64-linux-gnu.tar.gz 13 | 3b3e2680f7d9304c13bfebaf6445ada40d72324b4b3e0a07de9db807389a6c5b bitcoin-22.0-osx-signed.dmg 14 | 52449aa894a6ce5653315e1260d0ce87c1d9f490afe3c92b44285710804b11ae bitcoin-22.0-osx-unsigned.dmg 15 | f51156774c24c0ac5cc30237fa08aa17ed04a180dfd72c3e7d20fdc3f45806dc bitcoin-22.0-osx-unsigned.tar.gz 16 | 2744d199c3343b2d94faffdfb2c94d75a630ba27301a70e47b0ad30a7e0155e9 bitcoin-22.0-osx64.tar.gz 17 | 3a4f05657c048d3e9505bdb9c4fb3658e5e3d4233b0b93c1853e080620589765 bitcoin-22.0-x86_64-linux-gnu-debug.tar.gz 18 | 59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16 bitcoin-22.0-x86_64-linux-gnu.tar.gz 19 | 9169989d649937c0f9ebccd3ab088501328aa319fe9e91fc7ea8e8cf0fcccede bitcoin-22.0-win64-setup.exe 20 | f890473d6d910d478f8ff08f9356d0305d19b46cf06e4fc3b5a49b0b684fd2a7 bitcoin-22.0-win-unsigned.tar.gz 21 | 0a97ebc8ae44913e3ef9c5b1ddd2af3a4ffb0ba25b6ab1ee8173e40e60499402 bitcoin-22.0-win64-debug.zip 22 | ecc579d006230d6ffc5a5b7b53ce8c76477d37c1c7bad69694e9c2d69f00331d bitcoin-22.0-win64-setup-unsigned.exe 23 | 9485e4b52ed6cebfe474ab4d7d0c1be6d0bb879ba7246a8239326b2230a77eb1 bitcoin-22.0-win64.zip 24 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-22.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 814da17bcc23beafeb8339f94ba77d0089c044ea55782f8891cce7bb6e2e76d4 bitcoin-22.1-aarch64-linux-gnu-debug.tar.gz 2 | a0dcdd1eb422ba8d0f409ebe909a40f5349b405e31231312f15b12fd2e9b6153 bitcoin-22.1-aarch64-linux-gnu.tar.gz 3 | 6e945315944f0f4815048547cf3e2bb8f7e59f72da5bcb0505f383ee2b5b6319 bitcoin-22.1-arm-linux-gnueabihf-debug.tar.gz 4 | 7046aa71c3f8247205ebbb838c8f0217552a499aac6281cea7f4747f4e42c2e9 bitcoin-22.1-arm-linux-gnueabihf.tar.gz 5 | b03ea176aba97f836dc3da34f9646e9e2cbb61ea8d9738cf1ad969905ec5351b bitcoin-22.1-codesignatures-22.1.tar.gz 6 | 1eebf3cc06feee4b5bdd35cf28e15f567dffede95749b730495daa4577125315 bitcoin-22.1.tar.gz 7 | 646d4fba78dc410041224cfd4a542263379b85821048557b97be69984153b558 bitcoin-22.1-powerpc64-linux-gnu-debug.tar.gz 8 | bf6998392b34882c5067e758c19e2d0d0b747ff2090b4bc039fcb382a138d4ba bitcoin-22.1-powerpc64-linux-gnu.tar.gz 9 | cd772083394fc0605e3ddfffbb87cf70fd8ddbf895efbe212a79fc06f3a483fb bitcoin-22.1-powerpc64le-linux-gnu-debug.tar.gz 10 | 4d14aa4a73d3f777e40568ea81722413f75f735cefad99d46d81cd2c3fd6656c bitcoin-22.1-powerpc64le-linux-gnu.tar.gz 11 | 8f95e5154da7cafba98bd5c93c5425e7d12f721ce52feb0108c801f3835e43da bitcoin-22.1-riscv64-linux-gnu-debug.tar.gz 12 | 0e9598ecf04e5c887391615af130285bdf30fd7443a301e81a079499379415e9 bitcoin-22.1-riscv64-linux-gnu.tar.gz 13 | 13de7183a4086a44ba30a14ea25f1b4d8fc8c831072e232d89cd74409930ac7e bitcoin-22.1-osx-signed.dmg 14 | a2a34deff029fddbf1d8993922a4320f3ce7640389c1fd7bfb09294c972609ae bitcoin-22.1-osx-unsigned.dmg 15 | 1002370733401f26d5229b78c0cc23d649553174dbfb6755dc5c77738a75755c bitcoin-22.1-osx-unsigned.tar.gz 16 | d9c1a5893bb362bc32c574a87168c9edc8ed320a8d0f52b91690a5990cfea758 bitcoin-22.1-osx64.tar.gz 17 | cd5e4eeffa98dfd250b496f53c10e3777db9e092f92248382b2469d3208bf203 bitcoin-22.1-x86_64-linux-gnu-debug.tar.gz 18 | 107e6a8d1f545de1299cbf93dfd7d41c9d67956f1ac9c910d7eaed1e363cfa2c bitcoin-22.1-x86_64-linux-gnu.tar.gz 19 | 4e8a74f23fa8231d51dbde85c2da903f3d7fc98e091ae97f5f135505c3f41263 bitcoin-22.1-win64-setup.exe 20 | 5027d73151f455242b53847d9ef3c53d84b669a4a191959db71534bb05506189 bitcoin-22.1-win-unsigned.tar.gz 21 | 3a06ae559215dc8352f111b0d64671483f0e1d935890d135f0ee6ea0c6ac17ed bitcoin-22.1-win64-debug.zip 22 | 1f2101894230d4bc5065e27af76522217834abde8dac50d8ef3e9a515b33d953 bitcoin-22.1-win64-setup-unsigned.exe 23 | 64b346c4af2d5c6bebc11d5be0ba3dd5d3a480b1c5d89d801a46338ba633e121 bitcoin-22.1-win64.zip 24 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-23.0-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 868d4be1f776a4d5e3230d9d6067bc5a6cbe094e6fbc270f567786e253cdc8d1 bitcoin-23.0-aarch64-linux-gnu-debug.tar.gz 2 | 06f4c78271a77752ba5990d60d81b1751507f77efda1e5981b4e92fd4d9969fb bitcoin-23.0-aarch64-linux-gnu.tar.gz 3 | 198c575150de5501940a120ecfb49670a7ac94d95bd875a854efd54a527f83fe bitcoin-23.0-arm-linux-gnueabihf-debug.tar.gz 4 | 952c574366aff76f6d6ad1c9ee45a361d64fa04155e973e926dfe7e26f9703a3 bitcoin-23.0-arm-linux-gnueabihf.tar.gz 5 | a3059280451d17a77d2260e4671c884be93a14dbff6b6cd19a3c9c8c54421e97 bitcoin-23.0-arm64-apple-darwin.dmg 6 | c991de5922cb2880f0f54a7f21ba650da40872b4a6dad73fae09d7a89d8c8f28 bitcoin-23.0-arm64-apple-darwin-unsigned.dmg 7 | cdb380556e9858b22d9e9bfe3c2200f2d7efdc12af505390ca7798d97f6cd57c bitcoin-23.0-arm64-apple-darwin-unsigned.tar.gz 8 | 7c8bc63731aa872b7b334a8a7d96e33536ad77d49029bad179b09dca32cd77ac bitcoin-23.0-arm64-apple-darwin.tar.gz 9 | a382c13777c090fbe1353f19a579c5f79a07285c6d7b04176180c1ce829cd7f7 bitcoin-23.0-codesignatures-e36a046909ad.tar.gz 10 | 26748bf49d6d6b4014d0fedccac46bf2bcca42e9d34b3acfd9e3467c415acc05 bitcoin-23.0.tar.gz 11 | 7815a86a30bcebe10b0c27e465172b2bc79e93ea1ddda724eb33508685a02fe9 bitcoin-23.0-powerpc64-linux-gnu-debug.tar.gz 12 | 2caa5898399e415f61d9af80a366a3008e5856efa15aaff74b88acf429674c99 bitcoin-23.0-powerpc64-linux-gnu.tar.gz 13 | dda063652da7cad4839c11dff7a815a78ed8cd0f97dfdc6b10708cecb701085e bitcoin-23.0-powerpc64le-linux-gnu-debug.tar.gz 14 | 217dd0469d0f4962d22818c368358575f6a0abcba8804807bb75325eb2f28b19 bitcoin-23.0-powerpc64le-linux-gnu.tar.gz 15 | 5faabaec6e217bdea1b1f85b116659692a2f0e437767d35d17eb4b0e5c04c09c bitcoin-23.0-riscv64-linux-gnu-debug.tar.gz 16 | 078f96b1e92895009c798ab827fb3fde5f6719eee886bd0c0e93acab18ea4865 bitcoin-23.0-riscv64-linux-gnu.tar.gz 17 | 52eefbaf8cfd292822e470a48a51e1eb51081d43a0a16db7441f34a017ff6097 bitcoin-23.0-x86_64-apple-darwin.dmg 18 | 050eb122ef226ab9cfd6fe19a71c0a49029b9eac13faf033dbb60cdfa3a55c65 bitcoin-23.0-x86_64-apple-darwin-unsigned.dmg 19 | ac43412ba3fea4436a90ada71decb25ee122b60396ce6a67f933424dc3dceb17 bitcoin-23.0-x86_64-apple-darwin-unsigned.tar.gz 20 | c816780583009a9dad426dc0c183c89be9da98906e1e2c7ebae91041c1aaaaf3 bitcoin-23.0-x86_64-apple-darwin.tar.gz 21 | a5a86632775fb2c1db4235bd56396ecfeb233bfa24431baf936c41e51cc24fdf bitcoin-23.0-x86_64-linux-gnu-debug.tar.gz 22 | 2cca490c1f2842884a3c5b0606f179f9f937177da4eadd628e3f7fd7e25d26d0 bitcoin-23.0-x86_64-linux-gnu.tar.gz 23 | 4198eba8ac326d8746ab43364a44a5f20c157b6701f8c35b80d639a676df9011 bitcoin-23.0-win64-setup.exe 24 | 02f6c3bde5448527282aafafe7fdb80f35d4f984d9b012a9cb5e5efd28861614 bitcoin-23.0-win64-debug.zip 25 | beb4e86f629048e1a6616a882a2d66407ca6f368c9bc63cf117f2fb291ce1ced bitcoin-23.0-win64-setup-unsigned.exe 26 | 39a7b022b38f301029ee9d5732ed7e77851d465d44177b4c734cdcc33e6763b6 bitcoin-23.0-win64-unsigned.tar.gz 27 | 004b2e25b21e0f14cbcce6acec37f221447abbb3ea7931c689e508054bfc6cf6 bitcoin-23.0-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-23.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 72cf3c5b1e2fa273ff2e7a812b1b0f38187dc43419d0e1856cc28acb97fb6559 bitcoin-23.1-aarch64-linux-gnu-debug.tar.gz 2 | b18ec21db91c59850f837528b00844052fc1f92bd90ad34ddf5eaefe40ec94e3 bitcoin-23.1-aarch64-linux-gnu.tar.gz 3 | bd2fbe6cb64b8c4cbf0ec4fc01a416ecb7de4e101ba1eee71c6fe234be8ed630 bitcoin-23.1-arm-linux-gnueabihf-debug.tar.gz 4 | 504958265e007a7afbad9351e0f411f3bbba5f064fff02b380e5e678789d7379 bitcoin-23.1-arm-linux-gnueabihf.tar.gz 5 | 7ed9c3b1b69a7fade41637c5c325a0658994f0eadfca4a2d5ec3342773849c04 bitcoin-23.1-arm64-apple-darwin.dmg 6 | 2a1d2262bbcd9fbe245612119328786dc0795fc00c93d7df98d901ea41debf56 bitcoin-23.1-arm64-apple-darwin-unsigned.dmg 7 | c8b0f5d7a9c143e510558db11da4a739f35f3ff070d6f261628ea79036facec4 bitcoin-23.1-arm64-apple-darwin-unsigned.tar.gz 8 | 190ad3d166d817d58f1e9ba00f325d48118a9bfbb1e2150f87080651af8f4e1d bitcoin-23.1-arm64-apple-darwin.tar.gz 9 | 710fa8238af4c6758f8a97b578f66f0f8040268aea3905b02f5c7bad033d32d9 bitcoin-23.1-codesignatures-23.1.tar.gz 10 | 74c242bfb73f420050cf0c1644a1f6d14c19373445c8fb08ca1c2830df36650e bitcoin-23.1.tar.gz 11 | 6682bfc99477d2ac0ddb9fdea69790ae6e1ce66cf6205b41ef120295466942a0 bitcoin-23.1-powerpc64-linux-gnu-debug.tar.gz 12 | 9e1a30225775bbfac5071f4c4a44ea699c0399b8e631d1b0fe20b5e100537421 bitcoin-23.1-powerpc64-linux-gnu.tar.gz 13 | 073405f284570622e9be8b10f7d562dbea95401bf4274250b11dd04875285ab1 bitcoin-23.1-powerpc64le-linux-gnu-debug.tar.gz 14 | 6aaa1dac9735092301d569e15aed9b7275319a45594b815d02388c0130c870fd bitcoin-23.1-powerpc64le-linux-gnu.tar.gz 15 | 6b1520ef887f140ed05edaf8520451dc5fa4a013e8e326e8e19109f15454bfb7 bitcoin-23.1-riscv64-linux-gnu-debug.tar.gz 16 | fdb6dc8997eb5db4f7648881d6f67f4cfd16463dec81d31364c3de3028a6c6f2 bitcoin-23.1-riscv64-linux-gnu.tar.gz 17 | 8f522af6f32d03eebd40fb1b2202e54e10c6f5b52bb493a0b783720a8fcd372c bitcoin-23.1-x86_64-apple-darwin.dmg 18 | 5019d97db26b9af882bc920907cc8af38540d9f32ffce9f35f7354643dbf8b89 bitcoin-23.1-x86_64-apple-darwin-unsigned.dmg 19 | dce5f76ed52ea1abf6e987b61d847142a8b21c18fe99c2dadc012835a7577b34 bitcoin-23.1-x86_64-apple-darwin-unsigned.tar.gz 20 | cbb3aac93c4dca353bb78b5f82e1c7b8f0576c35e5808752f405a17ef141c948 bitcoin-23.1-x86_64-apple-darwin.tar.gz 21 | b3466119fdd0881d3c3c004b7dfd9ffd46231a18bd0208c3efea7a2ea4de75a4 bitcoin-23.1-x86_64-linux-gnu-debug.tar.gz 22 | 51d0de64afe5c16c7248aeefb2ddb96a092befa5d314ceabeb15d1db3aa1605c bitcoin-23.1-x86_64-linux-gnu.tar.gz 23 | 84abba3411958da6eafbe87717075c8017ceac7df5b283b1953c067c66f4e50b bitcoin-23.1-win64-setup.exe 24 | bd1cd6f80f39ab8308d1fb3695565d961a97a2560a1f69ff96e91ee3546875fe bitcoin-23.1-win64-debug.zip 25 | d963097b2738902ce6dc2acf56dbf23e4804f3a6acb33f172a70f67bc671fa65 bitcoin-23.1-win64-setup-unsigned.exe 26 | eabe4d2b36df9422136d330cba0dc92ef4f7f075da4058e82f3b8b8b1f56b3dd bitcoin-23.1-win64-unsigned.tar.gz 27 | 2e02a99dd33daea24908f2aabdd21dcc2efdde6738c92178f04f1e873599ea3e bitcoin-23.1-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-23.2-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 77669e1b2c32e241b6999ce2afec70f223106f643f33eafeed656becf677f258 bitcoin-23.2-aarch64-linux-gnu-debug.tar.gz 2 | 160ce6ce7185faa0db242953b5f93b108835d3790d3ea9ac689f21a85250be35 bitcoin-23.2-aarch64-linux-gnu.tar.gz 3 | c212fff838eb41a8a24f9d3bd5b1a978e8b405606230cbba451548ae27d09925 bitcoin-23.2-arm-linux-gnueabihf-debug.tar.gz 4 | ded39ea01b607c5db5c765b35cc17ad9599dcb56d4051558e63d3b13ea6f8756 bitcoin-23.2-arm-linux-gnueabihf.tar.gz 5 | 6cdbcaaa821143a28c97ebb2ca57b6ae9661f349836b92932469b941f79ed4dc bitcoin-23.2-arm64-apple-darwin.dmg 6 | 82385b9975e67d971c6df54c379d6b40c13e1a91ae3de845a4ea2205e7663566 bitcoin-23.2-arm64-apple-darwin-unsigned.dmg 7 | 0442a6c711937eb4753fe62691c4616d76ffb090ce1542ddf8378b3bae2628a4 bitcoin-23.2-arm64-apple-darwin-unsigned.tar.gz 8 | 33f8680f820327d5f9e64c02e476d03a5b2e5bd403e1b1cb0a82bd7ec2a8dc5e bitcoin-23.2-arm64-apple-darwin.tar.gz 9 | 8a8065d33cc9fd1f5866a43b525c29b589023932258618e9fd20c7c28f023982 bitcoin-23.2-codesignatures-23.2.tar.gz 10 | b254d316e4e783965ffda84b84beadf1a11184f50db5f00666d265867aaf1e7e bitcoin-23.2.tar.gz 11 | 3244dd0c1994e293cddea349dc500cfd52a9417de75e8360ddbc04ee794d4eed bitcoin-23.2-powerpc64-linux-gnu-debug.tar.gz 12 | 7cc27cf5a4ef923161225dd0d3276bcef8dd9de0e4e9cff96ed55a0987ac7196 bitcoin-23.2-powerpc64-linux-gnu.tar.gz 13 | 3c858c0cb6cceecea196d455a3628c9a8bd935fbe88439fbce5b4b0b52c01ae0 bitcoin-23.2-powerpc64le-linux-gnu-debug.tar.gz 14 | 2b2cd49546dbf1f074f684f2c90d2f448d6304cd18e1ae7e9cf4292ed1dce29b bitcoin-23.2-powerpc64le-linux-gnu.tar.gz 15 | 645c896f7c3a63628c7d040d7857386015ae8e55328b5294f6a1d1ed07e70b8b bitcoin-23.2-riscv64-linux-gnu-debug.tar.gz 16 | e762667fa68e8d81484d5ad4432a9b0f2f44db17d04a7aeafd4c4d628b9c914f bitcoin-23.2-riscv64-linux-gnu.tar.gz 17 | c109a3cac4b8ae49e8881b5d03cf2ea7e7bef727a80a4dd69c46710bf2e44d40 bitcoin-23.2-x86_64-apple-darwin.dmg 18 | b9fa4cd8a4fe2fce344255e4d9a3e1da112bc43cf131438e6d34deef2d544b03 bitcoin-23.2-x86_64-apple-darwin-unsigned.dmg 19 | 9507e9fe31c1df326189efd8518d687b69e6a2d16239736a642325a12aa5fffc bitcoin-23.2-x86_64-apple-darwin-unsigned.tar.gz 20 | f56f2e21718c3ef13b962775f1e9985eed962ae6237684deebf6b59f799a912f bitcoin-23.2-x86_64-apple-darwin.tar.gz 21 | aa83f025282d3f7f9e27a972f623198118eb191ff4e101fc3e3fedd6356392dc bitcoin-23.2-x86_64-linux-gnu-debug.tar.gz 22 | 853b9b0a50800a5b355df7a39dbdd6d7a2339f765e2d31a36d14bd705e7dbce1 bitcoin-23.2-x86_64-linux-gnu.tar.gz 23 | d77f7bc8c3c89938b7e49b7ec4d4773c1d59ebd4e3fac7f279af37603cd6dfbe bitcoin-23.2-win64-setup.exe 24 | ac6f315cd54061e98fb73c8e882f310127dc50a2f9b2edede7eb026508fb2719 bitcoin-23.2-win64-debug.zip 25 | 2f8bd84384c45ce54dd5d0b7e23f280dd6071ccc652c8d659bfcae19e7869a68 bitcoin-23.2-win64-setup-unsigned.exe 26 | c3c7bc5c5312ef32f2d181752a1833462395ee660531224d8dab3d9a0d12e5e3 bitcoin-23.2-win64-unsigned.tar.gz 27 | 29dd4c94de8b292fd19fd9475f2f31f891d04f16238bd7defa48eef3f2f8546a bitcoin-23.2-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-24.0.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 537e066b952b35b169259b6c4061bb59fa65034415d4b308a5f39b83e8a49b02 bitcoin-24.0.1-aarch64-linux-gnu-debug.tar.gz 2 | 0b48b9e69b30037b41a1e6b78fb7cbcc48c7ad627908c99686e81f3802454609 bitcoin-24.0.1-aarch64-linux-gnu.tar.gz 3 | a45ea04386b93f3cf168e6740a265b69312081ebd834e10dc2f7fc974da71711 bitcoin-24.0.1-arm-linux-gnueabihf-debug.tar.gz 4 | 37d7660f0277301744e96426bbb001d2206b8d4505385dfdeedf50c09aaaef60 bitcoin-24.0.1-arm-linux-gnueabihf.tar.gz 5 | 4cc2fe2e2f5e6068ecbf922564f2356a5388e4d00d8f852062f589b9577a21de bitcoin-24.0.1-arm64-apple-darwin.dmg 6 | 490db50df212edf26d08523a5515ecd3ebb3580b671ee5e7c039f04e065f2e4c bitcoin-24.0.1-arm64-apple-darwin-unsigned.dmg 7 | 52c2bbf4cb67f4a0e68891844f605f12ff09b3b414985614f7c886561a3887cb bitcoin-24.0.1-arm64-apple-darwin-unsigned.tar.gz 8 | 90ed59e86bfda1256f4b4cad8cc1dd77ee0efec2492bcb5af61402709288b62c bitcoin-24.0.1-arm64-apple-darwin.tar.gz 9 | 68c0e5bd44e5e6ab2e1e0fe3dff2f8707cbce0c7c480c195c8ec484f65efa3d7 bitcoin-24.0.1-codesignatures-24.0.1.tar.gz 10 | 12d4ad6dfab4767d460d73307e56d13c72997e114fad4f274650f95560f5f2ff bitcoin-24.0.1.tar.gz 11 | 91c2c7e1721e7e49b2000c748d8da856635e8bff517a4da10ab099a9f1c2dcbb bitcoin-24.0.1-powerpc64-linux-gnu-debug.tar.gz 12 | 7590645e8676f8b5fda62dc20174474c4ac8fd0defc83a19ed908ebf2e94dc11 bitcoin-24.0.1-powerpc64-linux-gnu.tar.gz 13 | 097d847e24a0245483b803dbca84cbf97cdf71d3bdafdd42747437e6ca394523 bitcoin-24.0.1-powerpc64le-linux-gnu-debug.tar.gz 14 | 79e89a101f23ff87816675b98769cd1ee91059f95c5277f38f48f21a9f7f8509 bitcoin-24.0.1-powerpc64le-linux-gnu.tar.gz 15 | 8addb8f638891af3d82602def0036916cfdc137a7cfaf876536d0ff79a95eb11 bitcoin-24.0.1-riscv64-linux-gnu-debug.tar.gz 16 | 6b163cef7de4beb07b8cb3347095e0d76a584019b1891135cd1268a1f05b9d88 bitcoin-24.0.1-riscv64-linux-gnu.tar.gz 17 | 0c3359c6700b30d0973cb6baa3dd93933e772ab56ed5eebcf509249d6c9f8b34 bitcoin-24.0.1-x86_64-apple-darwin.dmg 18 | 695adfe105f3e34989c5a5c19aa15a39ebcd288e0ae0ea9f4650d32cea0a2ead bitcoin-24.0.1-x86_64-apple-darwin-unsigned.dmg 19 | 31c272a5c4c6d5ee14cdcc3cf8e45e5319efdcdf57de62be59a7dd724265154d bitcoin-24.0.1-x86_64-apple-darwin-unsigned.tar.gz 20 | e2f751512f3c0f00eb68ba946d9c829e6cf99422a61e8f5e0a7c109c318674d0 bitcoin-24.0.1-x86_64-apple-darwin.tar.gz 21 | 10358db0e478f88d7c43de9fb6651e052164d0055fddcf32fb7d3e82ef63f0da bitcoin-24.0.1-x86_64-linux-gnu-debug.tar.gz 22 | 49df6e444515d457ea0b885d66f521f2a26ca92ccf73d5296082e633544253bf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz 23 | be3f8bcbe5998209acfca8e1f253b58b5b74b2ca47515d3966b50de5078feec7 bitcoin-24.0.1-win64-setup.exe 24 | 0b7a829f8f768b60494818040f64fec525f93928b71404d76d04a216ebed1f28 bitcoin-24.0.1-win64-debug.zip 25 | ebd8643c3e6ee1d6f09f792351b8557b826d1ebb9ecc07b8eeabf0b2ab2ab197 bitcoin-24.0.1-win64-setup-unsigned.exe 26 | 9a81222ac1c925ccc008014d41f7e5962a49b57a34cd7d203c896a489abe064f bitcoin-24.0.1-win64-unsigned.tar.gz 27 | 8784ce304f22c495392d3adfd7fc2c645d093db9bd4d42666c41adf540539fff bitcoin-24.0.1-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-24.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | cf47f82ade542aca26ed304c03dd7c25e04b333b03a21298365382e17225d413 bitcoin-24.1-aarch64-linux-gnu-debug.tar.gz 2 | 69ef67b290ce05120d8a5a5a5c0aa3e7d4878838286e6dc96935d15fc0d44b56 bitcoin-24.1-aarch64-linux-gnu.tar.gz 3 | f658efb0f1b59701172a924667d1edb033d521433939423dae070d8b5495dda0 bitcoin-24.1-arm-linux-gnueabihf-debug.tar.gz 4 | 96d8c7369972848833bddbeaa07351c2843429788151d86bde2ff6f7a756ea52 bitcoin-24.1-arm-linux-gnueabihf.tar.gz 5 | ec88b75c2dd63c0e1bdfe9b85b6876b4191beb21134c91fedcdaab14210ee19a bitcoin-24.1-arm64-apple-darwin.dmg 6 | fd09776a7e9157262e6534f92519480af842a581a7901050ed93eee767a41966 bitcoin-24.1-arm64-apple-darwin-unsigned.dmg 7 | bd4de2378319afb3a7730153e2f43e01168229fec4262fbbf9a9a0bcd7267a46 bitcoin-24.1-arm64-apple-darwin-unsigned.tar.gz 8 | 0bf7d0e313ac831a1b1c25c3871280721ab8fb7021bcca0f2acc280f4362a98e bitcoin-24.1-arm64-apple-darwin.tar.gz 9 | cb35eba58dae40723e65df01479e6c99fa3a2ec25d0f9542ee27e43d7dc556f2 bitcoin-24.1-codesignatures-24.1.tar.gz 10 | 8a0a3db3b2d9cc024e897113f70a3a65d8de831c129eb6d1e26ffa65e7bfaf4e bitcoin-24.1.tar.gz 11 | 2395131fddd7a719769d6c596d3d24304bb073a1c3e9e422ee17affb2a152f04 bitcoin-24.1-powerpc64-linux-gnu-debug.tar.gz 12 | 762c5d3393f98104c81546424e2feb2d6d318e0a87538cec463575b34f2ade14 bitcoin-24.1-powerpc64-linux-gnu.tar.gz 13 | 56db99c57f94e6903bced4b951a965a727071eda238a0b14e28006426a763377 bitcoin-24.1-powerpc64le-linux-gnu-debug.tar.gz 14 | 63aaaa06e2f40adcf4e77fd3166c10930a62b7612891e63d2cbfa6623e267def bitcoin-24.1-powerpc64le-linux-gnu.tar.gz 15 | 81616f8a1928a073c6e38aa8163354bf8517858b0b6ed8ad52b7d6727139c857 bitcoin-24.1-riscv64-linux-gnu-debug.tar.gz 16 | efce50351c454ac87736f18f0996e1e1476c133b3a853d586f9f752f38f14883 bitcoin-24.1-riscv64-linux-gnu.tar.gz 17 | f64d80534bf48b8b2976ad88ce9deb8f4707ebb4355155154be1d9e8f6480c91 bitcoin-24.1-x86_64-apple-darwin.dmg 18 | b09d8b1c16b599b2d6ada0385fa175b381e758a94be6429421fdd9b90f9da670 bitcoin-24.1-x86_64-apple-darwin-unsigned.dmg 19 | 7c8a70aaf872c76a1aae001b840d114af28e7337c7fd2424dd10e922e2f5311d bitcoin-24.1-x86_64-apple-darwin-unsigned.tar.gz 20 | e06cffa770b162bf47ee1e7c8a5c286440a3e3cf6a543e25f865df5d4fbca9f7 bitcoin-24.1-x86_64-apple-darwin.tar.gz 21 | 428d478ba9aec4a35ad2ebfb2b0eaa262524049001d86331b3f4098015a4c661 bitcoin-24.1-x86_64-linux-gnu-debug.tar.gz 22 | c112af3d19cca7f5b5f942708ca4d522110d8e1dc1c0f8d3077f531c94e5f00f bitcoin-24.1-x86_64-linux-gnu.tar.gz 23 | f0143d89dce7c1502a5bd1a5c7d2789a8bd33ecba227e9aff8cd409e0cb77ac8 bitcoin-24.1-win64-setup.exe 24 | 1999e066265026599d26a85980987cc27e4844639c5bc772514769636bcf17f8 bitcoin-24.1-win64-debug.zip 25 | ae4c3bd59d95eefe2dfe3713719e8e128195cce6545a6a214f439b608b38cc1d bitcoin-24.1-win64-setup-unsigned.exe 26 | a62fcaaad74e45b7f0e51661c4ccbdeebd87e0a214ff3a584350c786d786fc12 bitcoin-24.1-win64-unsigned.tar.gz 27 | 2b3181f73e3a7a10f57773bf57f11a622ec9f235b828e8bdbf41a2b17062ad62 bitcoin-24.1-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-24.2-SHA256SUMS: -------------------------------------------------------------------------------- 1 | ca8ba9066ce059f6ca4db565c30862d512eb3838ad293177e4c91ccf85a1b7fd bitcoin-24.2-aarch64-linux-gnu-debug.tar.gz 2 | 6842e974adb8b88fd929013a0881172acab1ba86fb9114cee8ff0ca1c6daa7c8 bitcoin-24.2-aarch64-linux-gnu.tar.gz 3 | 6a9a6f576bd3fedd33cedad46a90e27fb1e9e9a513f15a3c3de06a2d9f322956 bitcoin-24.2-arm-linux-gnueabihf-debug.tar.gz 4 | 89e71315a638f91fd807114b88e9d529ec312186d6ec45d61069395503eb74ce bitcoin-24.2-arm-linux-gnueabihf.tar.gz 5 | e8aee44caef93d4e1e344612dba100115a099302c4da9216fa6dd9e0875fa4f6 bitcoin-24.2-arm64-apple-darwin.dmg 6 | 4c742dc69acbdb93a99da3a9f931ef799696415dfacc74f2794b77182755e480 bitcoin-24.2-arm64-apple-darwin-unsigned.dmg 7 | e84d8cb818e9af20b120d8249681ba92e59759bac6837944b69bf68d363e6b2c bitcoin-24.2-arm64-apple-darwin-unsigned.tar.gz 8 | ae6f5f0cb4079005c32695711ef78b26a26c4c547ceb593b3626059626530a5d bitcoin-24.2-arm64-apple-darwin.tar.gz 9 | 42327fbf085a92880f5bbbebe65ecbe1494c0ce4c5144dfad1fefc63c9d3e7a8 bitcoin-24.2-codesignatures-24.2.tar.gz 10 | 20882834a5a8d1509f40a0452b09d94171cfc41342a6d3ac96fc19dff73b44e2 bitcoin-24.2.tar.gz 11 | 50d525eb2701631cc45c0b9fac219e1b128b80a5c056fb513e0921334c00342a bitcoin-24.2-powerpc64-linux-gnu-debug.tar.gz 12 | dee174289097b74a7b60c0743d2d2740bc35773f9f51a5670d2462463a81111b bitcoin-24.2-powerpc64-linux-gnu.tar.gz 13 | 4e9ee8bfad0ee1e18b2dfa2a1fd3e3f442ba5c9e76908bc472447f08c9b724db bitcoin-24.2-powerpc64le-linux-gnu-debug.tar.gz 14 | 2e8c3f42b5b14c95683ec2c62c4a85250ae5d48e44e33a787870547a6499f9b3 bitcoin-24.2-powerpc64le-linux-gnu.tar.gz 15 | cd12c83a440364e1e6a1c64f609d7337b2793b74ecb29ac77bb839709dada511 bitcoin-24.2-riscv64-linux-gnu-debug.tar.gz 16 | 34d7acfdfc977d757b6fa4064fc926ab1bcb23e18b4612c79a9fdf29e994b474 bitcoin-24.2-riscv64-linux-gnu.tar.gz 17 | 72f579e4c0fa03fac6264a00ec889dfd80de3fbe8f2ace9e01c0a605011b4c36 bitcoin-24.2-x86_64-apple-darwin.dmg 18 | 15b8f29e884c191a5fc41232323097535a586ba1e7fd92d56e8cb24713356fc9 bitcoin-24.2-x86_64-apple-darwin-unsigned.dmg 19 | 10e6ab32fd982129621224f7075677fe6a43fe91e5af5cb181c97d18472da9a7 bitcoin-24.2-x86_64-apple-darwin-unsigned.tar.gz 20 | b1b21455c339b2daf0998bfad17d0741d967c3c81db040bb5f73234168526d29 bitcoin-24.2-x86_64-apple-darwin.tar.gz 21 | d3d1c77805199580e82284c735a935a4a5a37b30bee8555a36691b72aa9a61e4 bitcoin-24.2-x86_64-linux-gnu-debug.tar.gz 22 | 7540d6e34c311e355af2fd76e5eee853b76c291978d6b5ebb555c7877e9de38d bitcoin-24.2-x86_64-linux-gnu.tar.gz 23 | 790c406dd911dc943aeb6de5c82808550d0dda17404b97accdcf616c2546ae21 bitcoin-24.2-win64-setup.exe 24 | 519bfafc4aa3e97c61b9f1734f31314ad86b883b24f82163cfb81ca69109e066 bitcoin-24.2-win64-debug.zip 25 | 5246a4c8550cc99b50eeb72277b782a75a5bc9e67b64af4281e6d52df7cd1487 bitcoin-24.2-win64-setup-unsigned.exe 26 | d861d4f79759b9033c4881166d97a7a12db9f9c0e02a80430e23a01ce771d755 bitcoin-24.2-win64-unsigned.tar.gz 27 | 544436bc9d5ce017e679bbccfe8a4928fbc840b414ee0240db8c3523ba54340a bitcoin-24.2-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-25.0-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 4a57282a84526446d6d78ffbbb8b003e2c115a58258e0a0a92fc4721554b7501 bitcoin-25.0-aarch64-linux-gnu-debug.tar.gz 2 | 3a7bdd959a0b426624f63f394f25e5b7769a5a2f96f8126dcc2ea53f3fa5212b bitcoin-25.0-aarch64-linux-gnu.tar.gz 3 | fee7bc650cbf2d8586022789093ab86f299639315a95b032289f17567865bb72 bitcoin-25.0-arm-linux-gnueabihf-debug.tar.gz 4 | e537c8630b05e63242d979c3004f851fd73c2a10b5b4fdbb161788427c7b3c0f bitcoin-25.0-arm-linux-gnueabihf.tar.gz 5 | b4dfca3fa2824fd344393659e43541cc27029f455a245ad816f467cb72b29973 bitcoin-25.0-arm64-apple-darwin.dmg 6 | c852fdf11c0abc971805dba9f115aa3b09cd485c1f55e19bf186f4aece46865f bitcoin-25.0-arm64-apple-darwin-unsigned.dmg 7 | 9b986ca6c9b1e8ca82ec78eb0dfd6904d4e15fe56f5411d15350710ca3bf8a6e bitcoin-25.0-arm64-apple-darwin-unsigned.tar.gz 8 | 3b35075d6c1209743611c705a13575be2668bc069bc6301ce78a2e1e53ebe7cc bitcoin-25.0-arm64-apple-darwin.tar.gz 9 | eb390667663ab4a5ecc050860774a8cffc661adffe81c880b903342733552049 bitcoin-25.0-codesignatures-25.0.tar.gz 10 | 5df67cf42ca3b9a0c38cdafec5bbb517da5b58d251f32c8d2a47511f9be1ebc2 bitcoin-25.0.tar.gz 11 | 476a97fdabd1ba8b01e467c51c0e45e578c0d7b929c104f8dc3e50006aca3627 bitcoin-25.0-powerpc64-linux-gnu-debug.tar.gz 12 | 0c8e135a6fd297270d3b65196042d761453493a022b5ff7fb847fc911e938214 bitcoin-25.0-powerpc64-linux-gnu.tar.gz 13 | 8b44440bcc41e7a942661097941abeb6dd2446eb644a06e4cb38b48ab072c224 bitcoin-25.0-powerpc64le-linux-gnu-debug.tar.gz 14 | fa8af160782f5adfcea570f72b947073c1663b3e9c3cd0f82b216b609fe47573 bitcoin-25.0-powerpc64le-linux-gnu.tar.gz 15 | d4f38999664952f110753597bf243a1f89009f96c11d69c8b6c9d88ff34e4ad5 bitcoin-25.0-riscv64-linux-gnu-debug.tar.gz 16 | fe6e347a66043946920c72c9c4afca301968101e6b82fb90a63d7885ebcceb32 bitcoin-25.0-riscv64-linux-gnu.tar.gz 17 | 277c436d3119d7f9a3fa0e580d444a28887d9e097fdb2578609db9e050f4f5d7 bitcoin-25.0-x86_64-apple-darwin.dmg 18 | acea16fefab69cc92c103349ecbb00445fa1c21b5f60adc9c448716c789a7246 bitcoin-25.0-x86_64-apple-darwin-unsigned.dmg 19 | 60dac5bd123f3ad11a2fe7db8d7f2d9dfecbbd7af557c952cac94727d0bd6f4e bitcoin-25.0-x86_64-apple-darwin-unsigned.tar.gz 20 | 5708fc639cdfc27347cccfd50db9b73b53647b36fb5f3a4a93537cbe8828c27f bitcoin-25.0-x86_64-apple-darwin.tar.gz 21 | b6964973ac3186627da0351307e96942cf925535e34a97ef610fc84e3c559a40 bitcoin-25.0-x86_64-linux-gnu-debug.tar.gz 22 | 33930d432593e49d58a9bff4c30078823e9af5d98594d2935862788ce8a20aec bitcoin-25.0-x86_64-linux-gnu.tar.gz 23 | 69fa4b86e335238e7631bcb062dd17eb100708cc5a7388edce921a0ec6737bca bitcoin-25.0-win64-setup.exe 24 | f1c956d3165cba83ec97666d091bcdaf78eaa389c36732b5658a826da1740bf3 bitcoin-25.0-win64-debug.zip 25 | 1c6f6d74b276dbe5fb43329c3252ddabafb21c63816d80f0ca10c70a39a3bb7a bitcoin-25.0-win64-setup-unsigned.exe 26 | e85d4945df5a9839f28bf1f05ad5235befad2b1f3bfe18fb7230bf4618309b1f bitcoin-25.0-win64-unsigned.tar.gz 27 | 7154b35ecc8247589070ae739b7c73c4dee4794bea49eb18dc66faed65b819e7 bitcoin-25.0-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-25.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | f3646fa725bf07473e5b5d95e82955ba94fd432bca392675179d9842df5ce332 bitcoin-25.1-aarch64-linux-gnu-debug.tar.gz 2 | 69b49bd4eda484a8b8e0e806649e5b7ae9b93b3dbb9889af23696437359bc52c bitcoin-25.1-aarch64-linux-gnu.tar.gz 3 | 227d0c3965e315ef222e7c5d9f9d2fd2fea47c396c4f96ac2b9d1281c6d03698 bitcoin-25.1-arm-linux-gnueabihf-debug.tar.gz 4 | 28b8811984e215d9dc42536394629029edc1d15ab896f007d54d1d42a343f9db bitcoin-25.1-arm-linux-gnueabihf.tar.gz 5 | eb0a41f7f5be97cc9f82959125eadc874c42dbc9665223aa3e1d61b0d7299b96 bitcoin-25.1-arm64-apple-darwin.dmg 6 | a0264360bb48dd53c5c4a62598295f1571876db246ef226b4f7f209a29c2bd34 bitcoin-25.1-arm64-apple-darwin-unsigned.dmg 7 | 1dea6c7d307c85018a471c759a4588d786d23a72e4f47bb80d4c0d5d873968eb bitcoin-25.1-arm64-apple-darwin-unsigned.tar.gz 8 | f4c105f5f832038a829ea66177623357af8fcc119167cbce5e8dd8038d98ac77 bitcoin-25.1-arm64-apple-darwin.tar.gz 9 | afefabd3291421c2f844b18b0f1bf118c28491a2e5ab2af9cc25d7f4e4fd6b6b bitcoin-25.1-codesignatures-25.1.tar.gz 10 | bec2a598d8dfa8c2365b77f13012a733ec84b8c30386343b7ac1996e901198c9 bitcoin-25.1.tar.gz 11 | 57de9bad8234671f48d5cea49d3b2769cd2970b3ac9b8464868de447d742a5d8 bitcoin-25.1-powerpc64-linux-gnu-debug.tar.gz 12 | e215c398b1dd11dfb6d7e45f51746a4e63f330615c6bc2a52c0fd44ed016630c bitcoin-25.1-powerpc64-linux-gnu.tar.gz 13 | 1e98a3f355fbaff77f02bc2d79bec560e652db0a76e63c4dfd85451f2c815fff bitcoin-25.1-powerpc64le-linux-gnu-debug.tar.gz 14 | a723e47c917f7764555041fb656b4d6b7dc6c4b485d0e63a145004ff74a9ce64 bitcoin-25.1-powerpc64le-linux-gnu.tar.gz 15 | f1110e36f021cb4757510c880d64ecddd9818437f2c2c3750923f655f94edd3a bitcoin-25.1-riscv64-linux-gnu-debug.tar.gz 16 | b68a94f8228f40cebe2cea4bbf73ed896e13e02998db91bad82ece0a985df6ea bitcoin-25.1-riscv64-linux-gnu.tar.gz 17 | 056b65dff9e09fdc4cf293c9022b2956ea43b8c4213fec62e9e63fd3b4d91d00 bitcoin-25.1-x86_64-apple-darwin.dmg 18 | bc537ea870e7c511490104ffa5c080ad83de85bb9dd1d328e7a1a53c96f0b15f bitcoin-25.1-x86_64-apple-darwin-unsigned.dmg 19 | 2aa9ea33254bd34df4b82b6bbd04c92b52d39540cc99f3d9c7faa18a0975f7f4 bitcoin-25.1-x86_64-apple-darwin-unsigned.tar.gz 20 | 1acfde0ec3128381b83e3e5f54d1c7907871d324549129592144dd12a821eff1 bitcoin-25.1-x86_64-apple-darwin.tar.gz 21 | 3d179f9531675b950082bdf13366d4d355b6df0447c28f2fc41dd3a55a4528b5 bitcoin-25.1-x86_64-linux-gnu-debug.tar.gz 22 | a978c407b497a727f0444156e397b50491ce862d1f906fef9b521415b3611c8b bitcoin-25.1-x86_64-linux-gnu.tar.gz 23 | 964f0d567f1ad9f742b85c51caee7434e1ef123419e17fa7e1ab677e58363f3b bitcoin-25.1-win64-setup.exe 24 | 2f869be9e7083e456f368d30ff41d9966bca247e5dfdbf6bb2b95edb64e0a6e3 bitcoin-25.1-win64-debug.zip 25 | f21c232d82d7cf432469c3067f569b3ba95e16fb088bc8d966648433873745dc bitcoin-25.1-win64-setup-unsigned.exe 26 | 446e7d5f3b307b0235c75af52238325309f5b97b1c89063bcc601fcb9183c417 bitcoin-25.1-win64-unsigned.tar.gz 27 | da722a4573b46b9a66aa53992b1ef296ab1b2b75dbdaa3b4eff65cbed438637a bitcoin-25.1-win64.zip -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-25.2-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 8c9e679cb7f2f70061e222c399f2cff20fb2584592982afc9b617e7c45d8014a bitcoin-25.2-aarch64-linux-gnu-debug.tar.gz 2 | 7928e046d83a9a4f82edee843a793bd0627294ac6309664bdfde1743afc1cfdb bitcoin-25.2-aarch64-linux-gnu.tar.gz 3 | 6900cbb2c7584f9f7ca1049f0457bdb1800ca45e8df8166e073de2f205642dae bitcoin-25.2-arm-linux-gnueabihf-debug.tar.gz 4 | 14a8b860f6f5635a02e81db5ad082224ae679aa0432bf97d75ce58b7ede242bc bitcoin-25.2-arm-linux-gnueabihf.tar.gz 5 | cdced43a155e2a9564e77713fa40d63e7804764191e9cedc872ceb651a375083 bitcoin-25.2-arm64-apple-darwin.dmg 6 | cebf8778cf970963fb89d4e5065427071893863a14c9b4103509aee0dba67328 bitcoin-25.2-arm64-apple-darwin-unsigned.dmg 7 | 7d713a14e262f7aee59bdc219f631ab584aca33121ca4b2ddbeb6c4a444df1cc bitcoin-25.2-arm64-apple-darwin-unsigned.tar.gz 8 | f55b394eebaa11d4b717d68aad9f75b824aaf3a7841dac7c26b1ef3d6d2915f5 bitcoin-25.2-arm64-apple-darwin.tar.gz 9 | 06978f1f36dc330e9572f692a9523eb013fe8c37a3e0ec843bc5c4ad02c878f6 bitcoin-25.2-codesignatures-25.2.tar.gz 10 | 06c11b4e418b1d7e66a35591db7df9017507ecb4f542f9a75f4aaa7307a48445 bitcoin-25.2.tar.gz 11 | f9e68e0d2b43f6ff538a07d806a6a02f219e028a3f5beb98c9a0c88609270a57 bitcoin-25.2-powerpc64-linux-gnu-debug.tar.gz 12 | 6b2755bbaebdf1973b0a7051dbc213b5becbc7acf517b0a47976818e4b43f82f bitcoin-25.2-powerpc64-linux-gnu.tar.gz 13 | 9531457e5b69d63c18a75d9468559ab5899e58fd57f455d6e8199d4992f5b3aa bitcoin-25.2-powerpc64le-linux-gnu-debug.tar.gz 14 | d0cf487fbf53e0e85376e0452567bc5c7a49a7479f5ccd3e5648eb282f01cf9a bitcoin-25.2-powerpc64le-linux-gnu.tar.gz 15 | 50682698265ea00290cd414ce0e223ce7239cdba22e8a01b5d3a3d3788bfa25b bitcoin-25.2-riscv64-linux-gnu-debug.tar.gz 16 | 8d11bc16b1f71979d0ce96a18fe83fbea8a2596430f5fea7026412647c7ea223 bitcoin-25.2-riscv64-linux-gnu.tar.gz 17 | f148d57bdb6b4efaa9894ee8605391fec53cb0ec568b72ed06662c299b8a1695 bitcoin-25.2-x86_64-apple-darwin.dmg 18 | 8f9d8af2b4a0a58ebcd79fc8a3cde20079c4fcb7d0cc41f8eefe85dd8dd50945 bitcoin-25.2-x86_64-apple-darwin-unsigned.dmg 19 | bf6979a76d96e31ec28bbdde7f03bbdb644a9d292eae21eda7ba8e4bac9750fa bitcoin-25.2-x86_64-apple-darwin-unsigned.tar.gz 20 | e06ba379f6039ca99bc32d3e7974d420a31363498936f88aac7bab6f239de0f5 bitcoin-25.2-x86_64-apple-darwin.tar.gz 21 | d7fbe1fa22062bcc38a0891bacd692b92cd16d53b2cf58e25ffb6898c459c685 bitcoin-25.2-x86_64-linux-gnu-debug.tar.gz 22 | 8d8c387e597e0edfc256f0bbace1dac3ad1ebf4a3c06da3e2975fda333817dea bitcoin-25.2-x86_64-linux-gnu.tar.gz 23 | 4c7843d3e33baa872c82d2af5b8b49d486878d2cad39d7fd72bedb33902a4b61 bitcoin-25.2-win64-setup.exe 24 | ee679ec1c00a6400156d5872e9203c1445ae98c9e9d1ef0419e28b5e6e231ef5 bitcoin-25.2-win64-debug.zip 25 | f2b88576349dcb0a5ae7403fc669a8fae546cab30b6f7788b7f2a777aa7ba01c bitcoin-25.2-win64-setup-unsigned.exe 26 | c0461a61c60e9e298f4c9e24a1da7811347d593903c367c9a31314727bf64d81 bitcoin-25.2-win64-unsigned.tar.gz 27 | c2ac84f55ee879caefd4414868d318a741c52a7286da190bf7233d86a2ffca69 bitcoin-25.2-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-26.0-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 665b532b8e1f84336931c3fdd71f983ca51fbe9983b7872e4e6ff955c388ea3e bitcoin-26.0-aarch64-linux-gnu-debug.tar.gz 2 | 9cf64f42c72d8a96892aa1e2ec9cbca6f3b7094148a8261127390bc6fb4d20c4 bitcoin-26.0-aarch64-linux-gnu.tar.gz 3 | d114cf094f2ea39d1086f99c0b7956a57bca48846eb1ae41b2ff42fd94b6b067 bitcoin-26.0-arm-linux-gnueabihf-debug.tar.gz 4 | e02b8b02fffc74f603bd7030809fefd3d95808e059f1da5e3269d5d98f18809b bitcoin-26.0-arm-linux-gnueabihf.tar.gz 5 | 06932a519f4d3cc3ce5df98b966b8f4c5e1c5d8c391bc5ab95c1828ce36e47db bitcoin-26.0-arm64-apple-darwin.zip 6 | b7ea1ccd4453b8bcbc05d12f7af1e0b201e509c3eb6cb17c931d9a7aa24d483c bitcoin-26.0-arm64-apple-darwin-unsigned.tar.gz 7 | 4371db6fb85036ac5c456a8c66c868a90137cd065a65238887f14600de22de55 bitcoin-26.0-arm64-apple-darwin-unsigned.zip 8 | c25af199a4006f23528985492ea33437574b3203c11ad1aa3bd1b8d33c6f6576 bitcoin-26.0-arm64-apple-darwin.tar.gz 9 | 777527bd3b6cc09f76e90b91c50390f0b6417bd6bf44e82f14a8addd9ee04e3d bitcoin-26.0-codesignatures-26.0.tar.gz 10 | ab1d99276e28db62d1d9f3901e85ac358d7f1ebcb942d348a9c4e46f0fcdc0a1 bitcoin-26.0.tar.gz 11 | 9a662145d6e0c66de880131dd21c4d1d86f7de58c998b5918c741d9d0c5924a4 bitcoin-26.0-powerpc64-linux-gnu-debug.tar.gz 12 | 525bbb814bb2f5ab8c479dcf07568954a28e169afdbbb54711457a7b8bb09976 bitcoin-26.0-powerpc64-linux-gnu.tar.gz 13 | 9e391555e0bdd6a51f8bbe430ab34f28d07a230b093c4cf372c1245a69255061 bitcoin-26.0-powerpc64le-linux-gnu-debug.tar.gz 14 | dfcf4db4edd6323b10239e166d65b044bd9ba3be407c6a129dfb906ff694c296 bitcoin-26.0-powerpc64le-linux-gnu.tar.gz 15 | 6a2746c8f5e7124074fa8d3bb3f8f8caaa1edc2f434e3677ad399c58dd41eea3 bitcoin-26.0-riscv64-linux-gnu-debug.tar.gz 16 | 456f7ac03717a9f549a4e29e3cd1c24a8e9c44b7cf930d2f9e721fa3e85d2d2d bitcoin-26.0-riscv64-linux-gnu.tar.gz 17 | 97449ecc2149ae59c6d6538ddf05645e127ccc28888d69e36daca8bcb6339b97 bitcoin-26.0-x86_64-apple-darwin.zip 18 | fdbe700b0c85af8a8025bb57cd590ee09b03031e60081627a30d2dc2fd5ddc47 bitcoin-26.0-x86_64-apple-darwin-unsigned.tar.gz 19 | 0db31c4f60fa719a9cc0d88de8465260c534b7b37859fe7a4acfb5a5923ab464 bitcoin-26.0-x86_64-apple-darwin-unsigned.zip 20 | 6e9864d0f59d5b7e8769ee867dd4b1f91602584b5736796e37d292e5c34d885a bitcoin-26.0-x86_64-apple-darwin.tar.gz 21 | 61b01b23fbbf7ca610acb567cc256eb2517868515f412be5fce9521bb897c20d bitcoin-26.0-x86_64-linux-gnu-debug.tar.gz 22 | 23e5ab226d9e01ffaadef5ffabe8868d0db23db952b90b0593652993680bb8ab bitcoin-26.0-x86_64-linux-gnu.tar.gz 23 | fe95ec448ce211829c9629ad6d750236291b53f05f50e270e97fef6b08ffe3c8 bitcoin-26.0-win64-setup.exe 24 | 14244bcaa55180a388d6b7cadc9aad8d8b313ea16af7f45a5fcef4fe85ea8206 bitcoin-26.0-win64-debug.zip 25 | cc91b2a09e59b2e0c48d27ae7476e6ddc739fb228a4cd6c17d98ecdb5f8af170 bitcoin-26.0-win64-setup-unsigned.exe 26 | 49a4f8207e5be1fefb0ca01f8d470d9683c6037034fe7638c157419fc82dcfed bitcoin-26.0-win64-unsigned.tar.gz 27 | 8d0e909280012d91d08f0321c53a3ceea064682ca635098910b33e4e94c82ed1 bitcoin-26.0-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-26.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 401c093314fb517d801d4930155e5bf9fb67f45408fa81fda8dd44dd5cd915b6 bitcoin-26.1-aarch64-linux-gnu-debug.tar.gz 2 | e198461d981b675d39caaec4d5e69e79d7fd52c3d3508f5821e2effe7d4f12c2 bitcoin-26.1-aarch64-linux-gnu.tar.gz 3 | f515ac510dc685a8466ca09c2180b60c0be2e7eb24b46aaf80e7e3e3fa650e37 bitcoin-26.1-arm-linux-gnueabihf-debug.tar.gz 4 | 7e655c8fd72277f6b3467ae2330e5b24913f5e06089ffb24ec4464d961d5e0c2 bitcoin-26.1-arm-linux-gnueabihf.tar.gz 5 | 8f0bdc51733a94f83cb96a215943291de64b501bbe0298a9b897f79d8ad517e9 bitcoin-26.1-arm64-apple-darwin.zip 6 | ac5ec560807023d33ea4a5d01c61b7ea8ba9d1756fda1408d96f5c403d3bafbe bitcoin-26.1-arm64-apple-darwin-unsigned.tar.gz 7 | 2d180af4902519f88252b973f054fbac656232aed420ab60663a7944a3864a31 bitcoin-26.1-arm64-apple-darwin-unsigned.zip 8 | 8a8e415763b7ffd5988153cf03967d812eca629016dd3b0ddf6da3ab6f4a3621 bitcoin-26.1-arm64-apple-darwin.tar.gz 9 | fe57b905ecbb1793356315c947bfd60933cdce25940d9fbc7e8d94896a5e49af bitcoin-26.1-codesignatures-26.1.tar.gz 10 | 9164ee5d717b4a20cb09f0496544d9d32f365734814fe399f5cdb4552a9b35ee bitcoin-26.1.tar.gz 11 | 646538125b7575db2bbecf22222353957b5ce625d94bc35a66ca1a6a3c3b754d bitcoin-26.1-powerpc64-linux-gnu-debug.tar.gz 12 | d7ed4a32d0242a4183b34dcc223d6aa23d18dee31fe683636139b4532fda2f46 bitcoin-26.1-powerpc64-linux-gnu.tar.gz 13 | 16ec62a47413b0153c67e989ec6a80501ea23f027df680a30d30a32345bf36ac bitcoin-26.1-powerpc64le-linux-gnu-debug.tar.gz 14 | 574e82550b261db0826391b5b41c687235646b7c0179371f617ed3a61d142bab bitcoin-26.1-powerpc64le-linux-gnu.tar.gz 15 | 12675195b33a559a0152f3598eb42a93cdbaebaee3e3ecf58b13764ee3dbb423 bitcoin-26.1-riscv64-linux-gnu-debug.tar.gz 16 | b05b6b10c4ec2bd9c2fb340d019397e55d592cd431fed3bc0acf4479964969d0 bitcoin-26.1-riscv64-linux-gnu.tar.gz 17 | 8fd415bfd0ba2d967d1fd03433b150e9b739a08f86c58c6d4dd0f8506a41fc12 bitcoin-26.1-x86_64-apple-darwin.zip 18 | 10a63e6ac62cfb8132ba94b88c597c1fa768185478759663541ee9e19fe02a99 bitcoin-26.1-x86_64-apple-darwin-unsigned.tar.gz 19 | e6bedda1cd8b852df6885b2252d86547da645e2d9ade25aaf9ec28264b4aec5e bitcoin-26.1-x86_64-apple-darwin-unsigned.zip 20 | acb50edd20692a9d023de12da573b64ca0fd9b4e9a2b88d1251020a3022b0f27 bitcoin-26.1-x86_64-apple-darwin.tar.gz 21 | 4c7fdad8f76458b91fe84c1f66f76ef0292b0de3d6408070c6ede104b36967c1 bitcoin-26.1-x86_64-linux-gnu-debug.tar.gz 22 | a5b7d206384a8100058d3f2e2f02123a8e49e83f523499e70e86e121a4897d5b bitcoin-26.1-x86_64-linux-gnu.tar.gz 23 | 8ed4feeae2ab631f5f48e9f56c52a7bcf442501cf2f04c990f1e85b761314a67 bitcoin-26.1-win64-setup.exe 24 | a0aaea3e7b2bab22dfe4a4cc33aef5bc23dccf2eda14e26f65872ed79af75f9f bitcoin-26.1-win64-debug.zip 25 | 946f92d27a6b05b09bd63e245208be639ff26699d2d4ab7d7c9f6e3649185982 bitcoin-26.1-win64-setup-unsigned.exe 26 | b6f5b28de625c34e0bffee449cdb5324e36c6b80a1b92cb894f436ed8157842a bitcoin-26.1-win64-unsigned.tar.gz 27 | 7bd0849e47472aeff99a0ea2c0cefd98f5be829e5a2d3b0168b5a54456cc638a bitcoin-26.1-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-26.2-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 49521ec94ebb523b49007a96eb18c1ab7c650c28222203104d17cdb569c58ded bitcoin-26.2-aarch64-linux-gnu-debug.tar.gz 2 | f9d723aec022b9a857f27a76fc3500f8d82ce02ca496e0d907c07081437204c8 bitcoin-26.2-aarch64-linux-gnu.tar.gz 3 | b5bc5a35e3bef4ee2633563df57e38b83cd1103f259a7844dc7e283049986fb0 bitcoin-26.2-arm-linux-gnueabihf-debug.tar.gz 4 | 4b767fe48867825b9e1efa8ef16570410adeb099869103eaec99b664708118d6 bitcoin-26.2-arm-linux-gnueabihf.tar.gz 5 | d3f8f9a8da2ff6c0f7d29646c23c0028c6042bbcda35c28830ce6511c840d9c0 bitcoin-26.2-arm64-apple-darwin.zip 6 | 0d104144ee3888fbf4ac0cb01c087966625025a70394852a9db33425debce4e9 bitcoin-26.2-arm64-apple-darwin-unsigned.tar.gz 7 | edd5e07d0b99a05d88b79f6f19e8619a24a27e27225232f3b904db567644a7d5 bitcoin-26.2-arm64-apple-darwin-unsigned.zip 8 | 863960b4f78130ebb9a5e7f68e5cc021778892ff9b3f8b060056c485470640d5 bitcoin-26.2-arm64-apple-darwin.tar.gz 9 | 633fa765be8b371ef9dc174803dd7b2d716855f4c87e8f27e9ade0b588b9030a bitcoin-26.2-codesignatures-26.2.tar.gz 10 | 78d59418741f45cbdaa9bf20ebc49a5e95ff9f7172f72fc78d14307eaf341b3c bitcoin-26.2.tar.gz 11 | a4cebb8873f05609b10763c35a32da8f798db55676c669e3d64249fecc7f1409 bitcoin-26.2-powerpc64-linux-gnu-debug.tar.gz 12 | 3fe1350951e72be109ce28d679776cb8f630d0db39a5b1c342856e0527478142 bitcoin-26.2-powerpc64-linux-gnu.tar.gz 13 | 015b925c04590fbe8d198e5bf2d5a5903efdbd71a052df94a836390cbbd9283b bitcoin-26.2-powerpc64le-linux-gnu-debug.tar.gz 14 | 0344a286b16c117d486dcd2e721a055072b77bab7cfa542ab6c22268591de1f6 bitcoin-26.2-powerpc64le-linux-gnu.tar.gz 15 | bf12bcc0aeae60abf51841a14b67c48fdca5ee8e276d1bd72a76867e5825cc45 bitcoin-26.2-riscv64-linux-gnu-debug.tar.gz 16 | 60bf104a6467d105439507526be0ebee47cc0436a831562a4253e4e113af3a21 bitcoin-26.2-riscv64-linux-gnu.tar.gz 17 | dd83901d294e7d9de150a85cffd1aadb2d674c15e8b23473e8d3770e21df5ef5 bitcoin-26.2-x86_64-apple-darwin.zip 18 | f238818530a9c0cbc1ad6d5ece3099a3eb324a407b4742ab9baf127e084e1774 bitcoin-26.2-x86_64-apple-darwin-unsigned.tar.gz 19 | a6efec89816073246d40b29b5bb4ec3426f624c7e1a16252cba3f60ca8cac896 bitcoin-26.2-x86_64-apple-darwin-unsigned.zip 20 | 8a15491cb1ea1a11c667b31606563e3a325e0ae1ff250e86a8453630f3c966f1 bitcoin-26.2-x86_64-apple-darwin.tar.gz 21 | bb60a33684301e5848f21e573f18440ac1a8cc5ed711372766c8174b4f33ba04 bitcoin-26.2-x86_64-linux-gnu-debug.tar.gz 22 | 77c63bec845b318c07f3a7660c579f63da18b58d25699ab8b8df6034e8ed55c0 bitcoin-26.2-x86_64-linux-gnu.tar.gz 23 | f9e359602e138681cb652013901dd9c5d9341b9da2507e7180bc35c8db13e288 bitcoin-26.2-win64-setup.exe 24 | 0ec3e2e1c3a198612c3ce97b279fdebe85cf47ac8caf3e34395988d51e8249b2 bitcoin-26.2-win64-debug.zip 25 | 1d9d030f1b7f105ed3d58a52c9285d4f175f9d89b1eedacb0515c55a01b7023c bitcoin-26.2-win64-setup-unsigned.exe 26 | 0232ae5c288a1c2ccc3d0966da2162f7f9998f5fc947a3febf2f1f9ec77fbea0 bitcoin-26.2-win64-unsigned.tar.gz 27 | 9251aa806244ac176d09bbe0a3808247d791e48ce3a6b6256adfdd14d9135e0f bitcoin-26.2-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-27.0-SHA256SUMS: -------------------------------------------------------------------------------- 1 | dcd49a8e3711d867c4ad5d7ffbc1ff20f66c82cc8bf660b5f6964eeaa289a739 bitcoin-27.0-aarch64-linux-gnu-debug.tar.gz 2 | cb35e250ae9d0328aa90e7aad0b877ed692597420a1092e8ab1a5dd756209722 bitcoin-27.0-aarch64-linux-gnu.tar.gz 3 | 61e1225d9c00b50c2e1712e722b285b6e4de1f1dd9da969596511b8a8986c1f0 bitcoin-27.0-arm-linux-gnueabihf-debug.tar.gz 4 | 9d4c28e7620d03bf346ebea388f222e4d6d2b996d7eb32fab72707b8320d5249 bitcoin-27.0-arm-linux-gnueabihf.tar.gz 5 | 7f060f2cd07746ff9d09b000b4195fee88dfca8444ab7a73f0c76aff4225227c bitcoin-27.0-arm64-apple-darwin.zip 6 | d1ddb2855a6c76ab4d2cc31315303cba77ef44fdd877b01ffd5918e548b07cae bitcoin-27.0-arm64-apple-darwin-unsigned.tar.gz 7 | 48d47cf0944034d7ef288f24ce73a6e2f85a9b6199dad5425464dd589ecf96e9 bitcoin-27.0-arm64-apple-darwin-unsigned.zip 8 | 1d9d9b837297a73fc7a3b1cfed376644e3fa25c4e1672fbc143d5946cb52431d bitcoin-27.0-arm64-apple-darwin.tar.gz 9 | d22f0f8b2d9eb8eac0819d5ebc4b3c4c5f5984cf6e0acefa81ebc6e914938293 bitcoin-27.0-codesignatures-27.0.tar.gz 10 | 9c1ee651d3b157baccc3388be28b8cf3bfcefcd2493b943725ad6040ca6b146b bitcoin-27.0.tar.gz 11 | 837c72fea5ceca69b3d06870dd4926c011dec7924f3f8f3428b2153945bbbb4a bitcoin-27.0-powerpc64-linux-gnu-debug.tar.gz 12 | 6ceaedb59ca33b751387b15f2c8da7f2f7cd2739c6464fc6cbef440852869b92 bitcoin-27.0-powerpc64-linux-gnu.tar.gz 13 | 81102572b0aee8627b162680699ce1d2828908cc4dd317e34697404ac04220fa bitcoin-27.0-powerpc64le-linux-gnu-debug.tar.gz 14 | 3c00f81a7c67b4cf3e382fae7eaa2c7facea2dfdf39f4c281512237c06b71960 bitcoin-27.0-powerpc64le-linux-gnu.tar.gz 15 | 7274aedbfc363adc28d3b19340e4578b983cfbd617f328313fb5b95e24864799 bitcoin-27.0-riscv64-linux-gnu-debug.tar.gz 16 | 371e53b21c3ba29a90e69c30b7213d75c165d084bde50ae6d73ee0e1ef179e68 bitcoin-27.0-riscv64-linux-gnu.tar.gz 17 | 8c94d3a7e34b59effdcf283263d5e84f2b009e601076282e9697ab4244bef3e8 bitcoin-27.0-x86_64-apple-darwin.zip 18 | 8cdabb19c0b2464ec21306615e0429362b6de9b73d5e796dc4dbc82437e76ddd bitcoin-27.0-x86_64-apple-darwin-unsigned.tar.gz 19 | 0b347bd2474eab483ee24e1751a2de3e37260826bf71340eaad233f6017af306 bitcoin-27.0-x86_64-apple-darwin-unsigned.zip 20 | e1efd8c4605b2aabc876da93b6eee2bedd868ce7d1f02b0220c1001f903b3e2c bitcoin-27.0-x86_64-apple-darwin.tar.gz 21 | 3d9ed703ceaeba9d234d05bf7ae20dde48fb52287eae236e8c2b2021a8db0fbc bitcoin-27.0-x86_64-linux-gnu-debug.tar.gz 22 | 2a6974c5486f528793c79d42694b5987401e4a43c97f62b1383abf35bcee44a8 bitcoin-27.0-x86_64-linux-gnu.tar.gz 23 | a2aa3db390a768383e8556878250a44f3eb3b7a6e91e94e47fa35c06b6e8d09f bitcoin-27.0-win64-setup.exe 24 | 33fadef48835acf9b2dfda42b2d2015f30403608dc8af7a3f3dd2b9ec224e56e bitcoin-27.0-win64-debug.zip 25 | e8114ed85a976ff439bd78cbf026e3f9bfafdf40d0fe75121e73bd4b7af347a4 bitcoin-27.0-win64-setup-unsigned.exe 26 | 1578aa2b88427086336e6990e4ce9b752d3d83b34b38ecc29f6325abb6ad3694 bitcoin-27.0-win64-unsigned.tar.gz 27 | ca75babeaa3fb75f5a166f544adaa93fd7c1f06cf20d4e2c8c2a8b010f4c7603 bitcoin-27.0-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-27.1-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 438bc93fb78b2063036920ca00e85398c31acbf4e7e92f47e8e37facfb62ce8c bitcoin-27.1-aarch64-linux-gnu-debug.tar.gz 2 | bb878df4f8ff8fb8acfb94207c50f959c462c39e652f507c2a2db20acc6a1eee bitcoin-27.1-aarch64-linux-gnu.tar.gz 3 | 2355ba267820ef0e5114fc50658a04766d6bc51aa51a1a339e74afcefce150ca bitcoin-27.1-arm-linux-gnueabihf-debug.tar.gz 4 | 83bf6da65ebac189c7e14f1e68a758b32b8f83558b36b53a8cc8037c674ab045 bitcoin-27.1-arm-linux-gnueabihf.tar.gz 5 | 06bf5d34aef01f21dac88708efa32d5e673c3ce1c8f17b1ca34b0e517ed8e43f bitcoin-27.1-arm64-apple-darwin.zip 6 | 1372fad4fa8b2a5284cf54279cd3bf41399526e59e2e76d88f08423d9587a0f5 bitcoin-27.1-arm64-apple-darwin-unsigned.tar.gz 7 | b91767a820ccc3f5149a921249c95a4f06d2a4832db5fa1c02178282c0335b22 bitcoin-27.1-arm64-apple-darwin-unsigned.zip 8 | ad4a3fd484077224a82dd56d194efb6e614467f413ab1dfb8776da4d08a4c227 bitcoin-27.1-arm64-apple-darwin.tar.gz 9 | bce6f981c198c616dcedd802bfda7693ec5a8a04aa57804edfad94305f7796b0 bitcoin-27.1-codesignatures-27.1.tar.gz 10 | 0c1051fd921b8fae912f5c2dfd86b085ab45baa05cd7be4585b10b4d1818f3da bitcoin-27.1.tar.gz 11 | 3a058dbefa68439b0c4f54f4c71f135c6ff2bb46469e09550f1d599a64568d96 bitcoin-27.1-powerpc64-linux-gnu-debug.tar.gz 12 | 69dbc7ca9a676f1471c88cf078cd559447ce47ad325a965331edaee846685fdb bitcoin-27.1-powerpc64-linux-gnu.tar.gz 13 | 418f298ab96599986a3c2abc4e5c73f6c3727b1de11d4e26f539c4fdc57e8973 bitcoin-27.1-powerpc64le-linux-gnu-debug.tar.gz 14 | f22157123133da4a91439e7e115191a08087fe71d000aa7c445df588cfcd5113 bitcoin-27.1-powerpc64le-linux-gnu.tar.gz 15 | 19ed4f547e7ff67b81feb97a610b56c93c7176674aef661e5e72133f33a7a6ec bitcoin-27.1-riscv64-linux-gnu-debug.tar.gz 16 | 192a16de497d52ec15aab95aea0c049b8c485a796dfdee41cec38b0be6926c24 bitcoin-27.1-riscv64-linux-gnu.tar.gz 17 | 25445080e2616d7c621f48f51e7a4294698d92016ef27ab88608cbe824f93364 bitcoin-27.1-x86_64-apple-darwin.zip 18 | 79eb9d48d9439f3479d1a678e872a23376b35299c28e19a94298ef552e2c1df8 bitcoin-27.1-x86_64-apple-darwin-unsigned.tar.gz 19 | 01d6a0159012df214125a2a5f25bd9fe0035074a13ed8d293a854ddd1d2d7176 bitcoin-27.1-x86_64-apple-darwin-unsigned.zip 20 | 6d94bde5541a18964c1c36b0f12334004e45e195f244e381fd459827b1fdc395 bitcoin-27.1-x86_64-apple-darwin.tar.gz 21 | 8abc5bd792b729097dcd664b6ef814e0bd3f9ae6bf3e8386dab2fb38504fd7fc bitcoin-27.1-x86_64-linux-gnu-debug.tar.gz 22 | c9840607d230d65f6938b81deaec0b98fe9cb14c3a41a5b13b2c05d044a48422 bitcoin-27.1-x86_64-linux-gnu.tar.gz 23 | e8ab7a8161c5a0846c81275809c9f90302874cc71b4378dee540f0b380a6d049 bitcoin-27.1-win64-setup.exe 24 | baa0153e8b08526ed1d1008234a00eea0537dba28bff2d6a7ced451e056ffd05 bitcoin-27.1-win64-debug.zip 25 | a598fd0b7740f809fc005aceeccf43f50e04d68f494a1797a38f415975df12da bitcoin-27.1-win64-setup-unsigned.exe 26 | db285fcaea11b7e705b4acb3307840e27b68ae8c5a9a2c188c486403db20f6b1 bitcoin-27.1-win64-unsigned.tar.gz 27 | 9719871a2c9a45c741e33d670d2319dcd3f8f52a6059e9c435a9a2841188b932 bitcoin-27.1-win64.zip 28 | -------------------------------------------------------------------------------- /regtest/sha256/bitcoin-core-28.0-SHA256SUMS: -------------------------------------------------------------------------------- 1 | 919a346c3fab1408734d0849069a2cecdac441f3f7f6a611ef442c4caa534f31 bitcoin-28.0-aarch64-linux-gnu-debug.tar.gz 2 | 7fa582d99a25c354d23e371a5848bd9e6a79702870f9cbbf1292b86e647d0f4e bitcoin-28.0-aarch64-linux-gnu.tar.gz 3 | a7a7be3eb075ea6757455e4bc721a29c243884acddcdb503d6363458dbd3f2c3 bitcoin-28.0-arm-linux-gnueabihf-debug.tar.gz 4 | e004b7910bedd6dd18b6c52b4eef398d55971da666487a82cd48708d2879727e bitcoin-28.0-arm-linux-gnueabihf.tar.gz 5 | cb5935484998a74eda6b8caa699be844567b2942de9e723a875debbbc01a53c1 bitcoin-28.0-arm64-apple-darwin.zip 6 | 7d6d488f82c29284ce59f71b4d19d0850fb7c88f6ea8a0298ad44ab578c2d866 bitcoin-28.0-arm64-apple-darwin-unsigned.tar.gz 7 | 6f9e9751574689e02cd99f68285100f13f1e68c11cc226ab01c9f7885946f8b4 bitcoin-28.0-arm64-apple-darwin-unsigned.zip 8 | c8108f30dfcc7ddffab33f5647d745414ef9d3298bfe67d243fe9b9cb4df4c12 bitcoin-28.0-arm64-apple-darwin.tar.gz 9 | 198516b630219b4a4032690e864e3e21dc2385d0e5905f98f02c1b1acf2525cd bitcoin-28.0-codesignatures-28.0.tar.gz 10 | 700ae2d1e204602eb07f2779a6e6669893bc96c0dca290593f80ff8e102ff37f bitcoin-28.0.tar.gz 11 | 76f2ebf0fdc7bf852d2cd991302a19b178d12521796715d63ed8bb7a5b479062 bitcoin-28.0-powerpc64-linux-gnu-debug.tar.gz 12 | 756df50d8f0c2a3d4111389a7be5f4849e0f5014dd5bfcbc37a8c3aaaa54907b bitcoin-28.0-powerpc64-linux-gnu.tar.gz 13 | a868a41534b4db317cca8d070beddcfdf0e8435cf368bd2438027294e8e993d5 bitcoin-28.0-riscv64-linux-gnu-debug.tar.gz 14 | 6ee1a520b638132a16725020146abea045db418ce91c02493f02f541cd53062a bitcoin-28.0-riscv64-linux-gnu.tar.gz 15 | 04c39cec7ed4c56da11811b382db85e6c211d0e12eb6e5bdf2701eba9de292e7 bitcoin-28.0-x86_64-apple-darwin.zip 16 | cfa72f45b9b6f08a80f5dfe4fba4e392b66e9a9972f7fbe66c4139fd0e0b83eb bitcoin-28.0-x86_64-apple-darwin-unsigned.tar.gz 17 | 0b0f583bc50fbd186bad00fc3b9c55036f566e4552e4cad5bb6292f8ebdabda4 bitcoin-28.0-x86_64-apple-darwin-unsigned.zip 18 | 77e931bbaaf47771a10c376230bf53223f5380864bad3568efc7f4d02e40a0f7 bitcoin-28.0-x86_64-apple-darwin.tar.gz 19 | f19502b406ce1fc20f60b21705f0418f345fdf6a0118196af23563697a0505f4 bitcoin-28.0-x86_64-linux-gnu-debug.tar.gz 20 | 7fe294b02b25b51acb8e8e0a0eb5af6bbafa7cd0c5b0e5fcbb61263104a82fbc bitcoin-28.0-x86_64-linux-gnu.tar.gz 21 | b59ddff8564413d433ce8bdac37ad65332e5e6b143573da08ff427be839d3b41 bitcoin-28.0-win64-setup.exe 22 | 8990def2e611323d4c7a8cf17187a138dca64f98fc0ecebda0a3e999dbdd083d bitcoin-28.0-win64-debug.zip 23 | d8170c342ac049fab953f87841cbbba6c0e3f277703ddc29c678b6ab93dae966 bitcoin-28.0-win64-setup-unsigned.exe 24 | 8ec39e7bf66ea419ea79e5f1b7bee1b03a28b51ddd1daa6e167bff6abac0a5d2 bitcoin-28.0-win64-unsigned.tar.gz 25 | 85282f4ec1bcb0cfe8db0f195e8e0f6fb77cfbe89242a81fff2bc2e9292f7acf bitcoin-28.0-win64.zip 26 | -------------------------------------------------------------------------------- /regtest/src/versions.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "28_0")] 2 | pub const VERSION: &str = "28.0"; 3 | 4 | #[cfg(all(feature = "27_1", not(feature = "28_0")))] 5 | pub const VERSION: &str = "27.1"; 6 | 7 | #[cfg(all(feature = "27_0", not(feature = "27_1")))] 8 | pub const VERSION: &str = "27.0"; 9 | 10 | #[cfg(all(feature = "26_2", not(feature = "27_0")))] 11 | pub const VERSION: &str = "26.2"; 12 | 13 | #[cfg(all(feature = "26_1", not(feature = "26_2")))] 14 | pub const VERSION: &str = "26.1"; 15 | 16 | #[cfg(all(feature = "26_0", not(feature = "26_1")))] 17 | pub const VERSION: &str = "26.0"; 18 | 19 | #[cfg(all(feature = "25_2", not(feature = "26_0")))] 20 | pub const VERSION: &str = "25.2"; 21 | 22 | #[cfg(all(feature = "25_1", not(feature = "25_2")))] 23 | pub const VERSION: &str = "25.1"; 24 | 25 | #[cfg(all(feature = "25_0", not(feature = "25_1")))] 26 | pub const VERSION: &str = "25.0"; 27 | 28 | #[cfg(all(feature = "24_2", not(feature = "25_0")))] 29 | pub const VERSION: &str = "24.2"; 30 | 31 | #[cfg(all(feature = "24_1", not(feature = "24_2")))] 32 | pub const VERSION: &str = "24.1"; 33 | 34 | #[cfg(all(feature = "24_0_1", not(feature = "24_1")))] 35 | pub const VERSION: &str = "24.0.1"; 36 | 37 | #[cfg(all(feature = "23_2", not(feature = "24_0_1")))] 38 | pub const VERSION: &str = "23.2"; 39 | 40 | #[cfg(all(feature = "23_1", not(feature = "23_2")))] 41 | pub const VERSION: &str = "23.1"; 42 | 43 | #[cfg(all(feature = "23_0", not(feature = "23_1")))] 44 | pub const VERSION: &str = "23.0"; 45 | 46 | #[cfg(all(feature = "22_1", not(feature = "23_0")))] 47 | pub const VERSION: &str = "22.1"; 48 | 49 | #[cfg(all(feature = "22_0", not(feature = "22_1")))] 50 | pub const VERSION: &str = "22.0"; 51 | 52 | #[cfg(all(feature = "0_21_2", not(feature = "22_0")))] 53 | pub const VERSION: &str = "0.21.2"; 54 | 55 | #[cfg(all(feature = "0_20_2", not(feature = "0_21_2")))] 56 | pub const VERSION: &str = "0.20.2"; 57 | 58 | #[cfg(all(feature = "0_19_1", not(feature = "0_20_2")))] 59 | pub const VERSION: &str = "0.19.1"; 60 | 61 | #[cfg(all(feature = "0_18_1", not(feature = "0_19_1")))] 62 | pub const VERSION: &str = "0.18.1"; 63 | 64 | #[cfg(all(feature = "0_17_1", not(feature = "0_18_1")))] 65 | pub const VERSION: &str = "0.17.1"; 66 | 67 | // To make --no-default-features work we have to enable some feature, use most recent version same as for default. 68 | #[cfg(all(not(feature = "28_0"), not(feature = "27_1"), not(feature = "27_0"), not(feature = "26_2"), not(feature = "26_1"), not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] 69 | #[allow(dead_code)] // for --no-default-features 70 | pub const VERSION: &str = "28.0"; 71 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | ignore = [] 2 | hard_tabs = false 3 | tab_spaces = 4 4 | newline_style = "Auto" 5 | indent_style = "Block" 6 | 7 | max_width = 100 # This is number of characters. 8 | # `use_small_heuristics` is ignored if the granular width config values are explicitly set. 9 | use_small_heuristics = "Max" # "Max" == All granular width settings same as `max_width`. 10 | # # Granular width configuration settings. These are percentages of `max_width`. 11 | # fn_call_width = 60 12 | # attr_fn_like_width = 70 13 | # struct_lit_width = 18 14 | # struct_variant_width = 35 15 | # array_width = 60 16 | # chain_width = 60 17 | # single_line_if_else_max_width = 50 18 | 19 | wrap_comments = false 20 | format_code_in_doc_comments = false 21 | comment_width = 100 # Default 80 22 | normalize_comments = false 23 | normalize_doc_attributes = false 24 | format_strings = false 25 | format_macro_matchers = false 26 | format_macro_bodies = true 27 | hex_literal_case = "Preserve" 28 | empty_item_single_line = true 29 | struct_lit_single_line = true 30 | fn_single_line = true # Default false 31 | where_single_line = false 32 | imports_indent = "Block" 33 | imports_layout = "Mixed" 34 | imports_granularity = "Module" # Default "Preserve" 35 | group_imports = "StdExternalCrate" # Default "Preserve" 36 | reorder_imports = true 37 | reorder_modules = true 38 | reorder_impl_items = false 39 | type_punctuation_density = "Wide" 40 | space_before_colon = false 41 | space_after_colon = true 42 | spaces_around_ranges = false 43 | binop_separator = "Front" 44 | remove_nested_parens = true 45 | combine_control_expr = true 46 | overflow_delimited_expr = false 47 | struct_field_align_threshold = 0 48 | enum_discrim_align_threshold = 0 49 | match_arm_blocks = false # Default true 50 | match_arm_leading_pipes = "Never" 51 | force_multiline_blocks = false 52 | fn_params_layout = "Tall" 53 | brace_style = "SameLineWhere" 54 | control_brace_style = "AlwaysSameLine" 55 | trailing_semicolon = true 56 | trailing_comma = "Vertical" 57 | match_block_trailing_comma = false 58 | blank_lines_upper_bound = 1 59 | blank_lines_lower_bound = 0 60 | edition = "2021" 61 | version = "One" 62 | inline_attribute_width = 0 63 | format_generated_files = true 64 | merge_derives = true 65 | use_try_shorthand = false 66 | use_field_init_shorthand = false 67 | force_explicit_abi = true 68 | condense_wildcard_suffixes = false 69 | color = "Auto" 70 | unstable_features = false 71 | disable_all_formatting = false 72 | skip_children = false 73 | show_parse_errors = true 74 | error_on_line_overflow = false 75 | error_on_unformatted = false 76 | emit_mode = "Files" 77 | make_backup = false 78 | --------------------------------------------------------------------------------