* Specified DLC TLV messages and added happy-path test vectors * Responded to Ben's review * Updated test vectors to use correct Multisignature ordering and up-to-date BIP 340 * Responded to Tibo's review * Attempted to specify funding inputs and funding signatures in a general way * Regenerated test vectors as per the updated funding input and funding signature specification * Specified generalized fee computation and fixed test vectors * Added oracle signature and signed transactions to test vectors * Responded to review from Tibo * Fixed table of contents * Clarified TLV vs. LN Message format, fixed off-by-one fee computation, updated test vectors for fees, have not yet updated test vectors for LN Message format * Made offer, accept and sign conform with Lightning Message format * Added a clarification * Made contract_info a proper object * Fixed test vector contract id hashes * Made redeem script use compact size uint and removed test vectors from this PR
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.