Node DLC is a Discreet Log Contract (DLC) client written in TypeScript that allows you to create, manage, and execute DLCs on the Bitcoin blockchain.
Discreet Log Contracts (DLCs) are a type of smart contract that enables conditional payments on Bitcoin based on outcomes of real-world events, as determined by oracles. This implementation provides a complete toolkit for building DLC applications.
- 🔐 Complete DLC protocol implementation
- 📡 IRC transport layer for peer communication
- 💾 RocksDB storage backend (migrated to classic-level)
- 🔗 Bitcoin blockchain integration
- 📊 Oracle integration for external data
- 🛠️ Comprehensive development tools
This project was inspired by Node-Lightning and has now absorbed its functionality. The monorepo contains the following packages:
@node-dlc/bitcoin- Bitcoin primitives and utilities@node-dlc/core- Core DLC functionality and types@node-dlc/messaging- DLC messaging protocol implementation@node-dlc/leveldb- Storage layer using classic-level@node-dlc/transport- Network transport layer (IRC)
@node-dlc/bitcoind- Bitcoin Core RPC and ZMQ client@node-dlc/bufio- Buffer I/O utilities@node-dlc/chainmon- Blockchain monitoring tools@node-dlc/checksum- Checksum utilities@node-dlc/crypto- Cryptographic functions@node-dlc/logger- Logging infrastructure@node-dlc/noise- Noise protocol implementation@node-dlc/wire- Lightning Network wire protocol
# Clone the repository
git clone https://github.com/atomicfinance/node-dlc.git
cd node-dlc
# Install dependencies and bootstrap packages
yarn install
yarn bootstrap- Node.js v18+
- Yarn package manager
- Bitcoin Core node (for blockchain interaction)
# Build all packages
yarn build
# Run tests
yarn test
# Lint code
yarn lint
# Format code
yarn formatSee individual package READMEs for specific usage instructions.
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
MIT License - see LICENSE file for details.
This project builds upon the architecture and components originally developed in the Node-Lightning project.