I want to share a DSL I am building for describing and running bitcoin contracts.
It is not another effort to write Script in a higher level language.
Instead, the DSL is a tool for describing transactions, sending them to bitcoin node, and running assertions on the state of the system - using a declarative syntax.
The easiest way to describe it is by using an example
Docs: Bitcoin DSL | Bitcoin DSL Docs
The key features of the DSL are to provide a declarative syntax for the following:
- Describe transactions with a high level descriptive syntax
- Write locking using miniscript, descriptors and plain old Script
- Write unlocking scripts with high level constructs again - the runtime automatically tracks witness programs for generating signatures
- Execute multiple branches of contracts using system state transitions
- Interact with bitcoin node
- Assert system state
There is still some more things I want to build, for example, incorporate taproot constructions and making it easy for users to run experimental versions of bitcoin.
For the moment, I have example contracts for lightning (Lightning Contracts | Bitcoin DSL Docs) and ARK (ARK | Bitcoin DSL Docs) described using the DSL.
Being able to write the ARK and lightning contracts and execute them on regtest using a high level DSL has been fun for me. I hope others will find the DSL useful too.
Thanks,
Jungly