* Added test vectors deleted from #81 * Fixed dlc_test redeemscript and added new dlc message parsing tests * Fixed chain_hash endianness * Added Schnorr signature point computation test vectors * Restructured contract info json * Restructured signature TLVs dlc_message_test.json * UInt16 prefixed scripts and added hash pre-images to test vectors * Added Nicolas' tests for NFC normalization and hashing * Added dlc fee computation tests * Added clarification to redeemscript in funding_input_v0 wrt fee computation * Added basic tx building tests * Updated test vectors to use 107 witness bytes for P2WPKH * Updated test vectors to include non-p2wpkh inputs as well as dummy scripts to be used in fee tests for less modular APIs * Added maxWitnessLen to inputs explicitly * Fixed order and serialization of signatures * Fixed backward stack funding signatures
Discreet Log Contract In Progress Specification
The specifications are currently a work-in-progress and currently being drafted.
Pull requests and comments welcome.
Please see our introduction for what a DLC is and a glossary of terms used in DLCs.
For learning more about DLC have a look at the resources page.
Specification Roadmap
Works in Progress
- DLC transaction specification (Transactions.md)
- DLC negoation protocol (Protocol.md)
- Oracle Specification Proposals
TODO
- ECDSA Adaptor Signature Variant Specification
- On-Chain Handling
- For more information on TODO see our v0.1 project dashboard
Future Work
- Construction and neogatiation of DLCs in Lightning (#3)
Implementations
bitcoin-s
The team at Suredbits is working on a implementation of discreet log contracts in bitcoin-s.
cfd-dlc
The team at CryptoGarage is working on a C++ implementation library. A JavaScript wrapper is also available. This wrapper is currently used as inside the p2pderivatives application.
rust-dlc
@Tibo-lg and others are working on a new Rust DLC implementation
NDLC
@NicolasDorier has created a wip DLC implementation in C# which can be used with BTCPayServer
This work is licensed under a Creative Commons Attribution 4.0 International License.