A Rust library for working with Discreet Log Contracts.
A sample is provided as an example usage of this library.
Contributions are welcome. Check the contributing and development documents for more information.
This library is still in early stage and while test coverage is decent it has not been thoroughly tested in production yet. We thus recommend avoiding using it on main-net at the moment.
The implementation is mainly based on the DLC specifications but is not yet fully compliant with it.
The library provides several crates to let users chose which functionality they want to utilize within their applications.
The dlc crate provides basic functionalities for creating, signing and verifying DLC transactions.
The dlc-trie crate provides data structures for facilitating the storage and retrieval of information related to DLC based on numerical events.
The dlc-manager crate provides functionalities for handling the creation and processing of DLC, as well as the generation of messages to be exchanged between two parties of a DLC.
The dlc-messages crate provides data structures and serialization functionalities for messages to be exchanged between DLC peers.
The bitcoin-rpc-provider crate implements interfaces required by the dlc-manager for interacting with the Bitcoin blockchain and proving wallet functionalities through the bitcoin-core RPC.
The p2pd-oracle-client crate implements the oracle interface required by the dlc-manager to interact with an instance of the P2PDerivatives oracle.
The sled-storage-provider crate implements the storage interface required by the dlc-manager to provide persistent storage of data.
The bitcoin-test-utils, fuzz and mocks crates are used for testing purpose and are not intended to be used externally.