Skip to content

comit-network/rust-elements-consensus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-elements-consensus

This library provides native bindings to elements' consensus module and exposes it via a simple API.

Should I use this?

This is using the same code as elementsd to validate consensus rules. In theory you should therefore never see any mismatch (assuming we vendor the code regularly to get bugfixes etc).

Nevertheless, we urge you to make your own judgement.

This crate has primarily been developed to speed up testing of complex contracts and protocols. By testing against the consensus rules directly, you don't need to spin up instances of elementsd to verify that your signed transaction would verify.

Usage

The native code provided by this library depends on the C++ standard library. It is the user's responsibility to specify, which standard library to link.

The easiest way of doing this through link_cplusplus. The default behaviour has been tested on Ubuntu and MacOS, so most likely you only need to:

  1. Depend on link_cplusplus:
[dev-dependencies]
link-cplusplus = "1"
  1. Add extern crate link_cplusplus;:
#[cfg(test)]
extern crate link_cplusplus;

See the documentation of link_cplusplus for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published