#integration-testing #environment #process #elements #rpc #bitcoind #liquidregtest

elementsd

Utility to run a liquidregtest elements process, useful in integration testing environment

8 releases (breaking)

0.9.0 Jan 3, 2024
0.8.0 Apr 7, 2023
0.6.0 Sep 23, 2022
0.5.0 May 5, 2022
0.1.0 Dec 1, 2021

#58 in #integration-testing

Download history 9/week @ 2024-01-01 9/week @ 2024-02-19 36/week @ 2024-02-26 13/week @ 2024-03-04

58 downloads per month

MIT license

17KB
278 lines

MIT license Crates

ElementsD

Utility to run a liquidregtest elementsd process, useful in integration testing environment.

use elementsd::bitcoincore_rpc::RpcApi;
let exe = elementsd::exe_path().expect("elementsd executable must be provided in ELEMENTSD_EXE, or with a feature like '0_21_0', or be in PATH");
let elementsd = elementsd::ElementsD::new(exe).unwrap();
let info = elementsd
    .client()
    .call::<bitcoind::bitcoincore_rpc::jsonrpc::serde_json::Value>("getblockchaininfo", &[])
    .unwrap();
assert_eq!(info.get("chain").unwrap(), "liquidregtest");

Validate pegin

You can also start elementsd with validate pegin capability by connecting an instance of bitcoind. See test test_elementsd_with_validatepegin

See the similar BitcoinD for details

Doc

To build docs:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features download,doc --open

MSRV

  • 1.57.0 with one of the auto download features
  • 1.56.1 without features

MSRV 1.56.1 may require downgrading dependencies. See our .github/workflows/test.yml file for a complete list.

Dependencies

~10–21MB
~252K SLoC