Skip to content

Commit 78c9df6

Browse files
committed
Add some high level notes about rust-miniscript design
1 parent 780dbc6 commit 78c9df6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

doc/high_level_design.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Miniscript High level design
2+
3+
![alt text](./miniscript_high_level_arch.png)
4+
5+
As of 10.0.0 rust-miniscript is roughly divided into following components:
6+
7+
* **Miniscript Core**(<span style="color:green">Green box</span>): This is the core of the library. It contains the core data structures and algorithms for miniscript and output descriptors.
8+
All the users are expected to interact with the library using the descriptor APIs. Raw miniscript should be used only if you know what you are doing.
9+
* **Policy**(<span style="color:red">Red box</span>): This is the policy language for miniscript.
10+
- It is a simple language which allows users to specify the policy for a descriptor. This simple user provided policy is referred as concrete policy. The miniscript compiler compiles this concrete policy into a descriptor.
11+
- The policy also provides a semantic policy for analysis of descriptors and miniscript. Users can use the APIs in the module to analyze the descriptors and miniscript for various properties.
12+
* **Psbt**(<span style="color:blue">Blue box</span>): Psbt support for descriptors. Provides several new extension APIs to interact for miniscript descriptors in a psbt including finalizer, planning, signing, descriptor updates, etc.
13+
* **Interpreter**(<span style="color:yellow">Yellow box</span>): Script Interpreter for miniscript. It also provides APIs to figure out the satisfied constraints for a given transaction input. Useful for detecting which spend path the transaction output was spend with, as in the case of watchtowers or general monitoring, block explorers, etc.

doc/miniscript_high_level_arch.png

354 KB
Loading

0 commit comments

Comments
 (0)