- Rust 98.7%
- Shell 1.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Audit / Security audit (push) Successful in 2m59s
Continuous integration / Verify - stable toolchain (push) Successful in 1m5s
Continuous integration / Format - nightly toolchain (push) Successful in 1m54s
Continuous integration / Docs (push) Successful in 2m37s
Continuous integration / Integration tests 0_17_2 - stable toolchain (push) Successful in 5m19s
Continuous integration / Integration tests 0_21_2 - stable toolchain (push) Successful in 4m48s
Continuous integration / Lint - nightly toolchain (push) Successful in 6m38s
Continuous integration / Integration tests 0_18_1 - stable toolchain (push) Successful in 5m42s
Continuous integration / Integration tests 23_2 - stable toolchain (push) Successful in 4m19s
Continuous integration / Integration tests 22_1 - stable toolchain (push) Successful in 4m39s
Continuous integration / Integration tests 0_19_1 - stable toolchain (push) Successful in 6m0s
Continuous integration / Integration tests 0_20_2 - stable toolchain (push) Successful in 5m44s
Continuous integration / Integration tests 24_2 - stable toolchain (push) Successful in 4m10s
Continuous integration / Integration tests 25_2 - stable toolchain (push) Successful in 4m35s
Continuous integration / Test Electrs bitcoind_22_1,bitcoind_download,electrs_0_10_6,download (push) Successful in 1m18s
Continuous integration / Integration tests 26_2 - stable toolchain (push) Successful in 4m5s
Continuous integration / Test Electrs bitcoind_22_1,bitcoind_download,electrs_0_8_10,download (push) Successful in 1m25s
Continuous integration / Test Electrs bitcoind_22_1,bitcoind_download,electrs_0_9_1,download (push) Successful in 1m14s
Continuous integration / Integration tests 27_2 - stable toolchain (push) Successful in 3m52s
Continuous integration / Integration tests 28_2 - stable toolchain (push) Successful in 4m11s
Continuous integration / Integration tests 29_0 - stable toolchain (push) Successful in 3m56s
Continuous integration / Test Electrs bitcoind_22_1,bitcoind_download,electrs_0_9_11,download (push) Successful in 1m12s
Continuous integration / Integration tests 30_2 - stable toolchain (push) Successful in 4m8s
Continuous integration / Integration tests 31_1 - stable toolchain (push) Successful in 3m50s
Continuous integration / Integration tests 31_0 - stable toolchain (push) Successful in 4m13s
Continuous integration / Test - nightly toolchain (minimal) (push) Successful in 15m36s
Continuous integration / Test - stable toolchain (recent) (push) Successful in 14m56s
Continuous integration / Test - nightly toolchain (recent) (push) Successful in 15m13s
Continuous integration / Test - stable toolchain (minimal) (push) Successful in 15m41s
Continuous integration / Test - msrv toolchain (minimal) (push) Successful in 17m12s
Continuous integration / Test - msrv toolchain (recent) (push) Successful in 17m34s
Continuous integration / Test Electrs no auto-download features (push) Successful in 8m25s
|
||
| .cargo | ||
| .forgejo | ||
| bitcoind | ||
| bitreq | ||
| client | ||
| contrib | ||
| electrsd | ||
| fuzz | ||
| integration_test | ||
| jsonrpc | ||
| regtest-client | ||
| types | ||
| verify | ||
| .gitignore | ||
| Cargo-minimal.lock | ||
| Cargo-recent.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| CODEOWNERS | ||
| justfile | ||
| LICENSE | ||
| nightly-version | ||
| notes.md | ||
| README.md | ||
| rustfmt.toml | ||
Bitcoin Core JSON-RPC support
There are two primary purposes of this repository:
-
Provide the
corepc-typescrate for use in production software. -
Provide tools for integration testing Rust code that interacts with the Bitcoin network. Primarily consumers of the
rust-bitcoinlibrary. And enable doing so against multiple versions of Bitcoin Core.
If you require a JSON RPC client in production software it is expected you write your own and only
use the corepc-types crate in your dependency graph. Feel free to copy/steal/plagiarise or
otherwise enjoy yourself with anything in this repository - no attribution required.
Contributing
PRs, feature requests, and bug reports against corepc-types most welcome and appreciated.
PRs, feature requests, and bug reports against the other crates welcome if you are using them for integration testing.
Please be considerate of reviewer time when using LLMs. We have the same AI tooling policy as LLVM: https://llvm.org/docs/AIToolPolicy.html
Please do not use corepc-regtest-client in production and raise bugs, issues, or feature requests.
Crate/directory listing
bitcoind/:bitcoind: Runsbitcoindregtest nodes.bitreq/:bitreq: Simple, minimal-dependency HTTP client, with optional features for proxies, async, and https.client/:corepc-client: Async JSON-RPC client for Bitcoin Core.regtest-client/:corepc-regtest-client: Blocking JSON-RPC client for integration/regtest testing.contrib/: Contains scripts including one to run local regtestbitcoindnodes using versions specified in the config file. A template config file and bitcoind aliases are in the subdirectorytemplates/electrsd/:electrsd: Utility to run a regtest electrs process connected to a given bitcoind instance.integration_test/: Integration tests that usecorepc-clientandbitcoindto testcorepc-types.jsonrpc/:jsonrpc: Rudimentary support for sending JSONRPC 2.0 requests and receiving responses.types/:corepc-types: Rust types returned by the JSON-RPC API of Bitcoin Core.verify/: Provides a tool to help verify the rest of the repository.
Design
This repository is a bit oddly designed. It was done so very intentionally. The aim is to provide data types for every single JSON RPC method provided by Core for many versions going back to v17. Furthermore we want to explicitly test every method call using every data structure to ensure we got it correct.
Fundamentally when you make an arbitrary RPC call against a miscellaneous Bitcoin Core instance you do not know which version of Core you are talking to. No crate in this repository makes any effort to solve this problem - it is left to the application. If however you want to run a specific RPC call against a specific version of Core this repository is your friend.
Original code
I don't know who is using bitcoind and/or rust-bitcoincore-rpc in the wild and I do not want to
disrupt them. As such bitcoind was pulled in here with permission of the original author.
Some code shamelessly stolen from rust-bitcoincore-rpc (credit to Steven).
Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on Rust 1.75.0.
Use Cargo-minimal.lock to build the MSRV by copying to Cargo.lock and building.
Security audit
Forgejo audits a freshly resolved lockfile and the minimal and recent lockfiles daily. The scheduled audit creates an issue for each RustSec advisory unless its ID already appears in the title of an issue or pull request, including closed ones. Yanked crates are reported in the audit log but do not create issues. The workflow fails if an audit report is empty or cannot be parsed.