You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### A Miniscript-based scripting language for Bitcoin contracts
10
-
11
-
Minsc is a high-level scripting language for expressing Bitcoin Script spending conditions.
9
+
### A mini scripting language for all things Bitcoin
10
+
11
+
Minsc is a high-level, domain-specific, embeddable language for Bitcoin scripting that simplifies the creation and fulfillment of complex spending conditions, using an expressive pseudo-code-like syntax.
12
+
13
+
It includes built-in support for Descriptors, Miniscript, Script, Transactions, PSBT, Taproot, Xpubs/Xprvs, CTV and more.
14
+
15
+
The language is dynamically typed, purely functional and immutable.
16
+
17
+
> [!NOTE]
18
+
> The documentation and playground on the [`min.sc`](https://min.sc/) website are severely outdated.
19
+
>
20
+
> To explore some of Minsc's new abilities, check out the [`min.sc/v0.3`](https://min.sc/v0.3/) playground and the following examples:
> -[Recovery after a delay period](https://min.sc/v0.3/#github=examples/recovery-after-delay.minsc) (simple CSV-based, delay period since the coins last moved)
29
+
> -[Inheritance after a contest period](https://min.sc/v0.3/#github=examples/inheritance-after-contest-presigned.minsc) (2-stage using pre-signed txs, contest delay period following the 'trigger')
30
+
>
31
+
> #### Manual Scripting/Signing
32
+
> -[Manual Signing](https://min.sc/v0.3/#github=examples/manual-signing-p2wpkh.minsc) (P2WPKH *without* Descriptors, Miniscript or PSBT)
> -[Token Sale with royalty](https://min.sc/v0.3/#github=examples/elements-sale-royalty.minsc) (recursive stateful contract, WIP code)
42
+
>
43
+
> To learn more about the language internals, you can also check out the Minsc standard library parts implemented in Minsc:
44
+
>
45
+
> -[`src/stdlib/stdlib.minsc`](https://min.sc/v0.3/#github=src/stdlib/stdlib.minsc) (utilities for arrays, strings, testing and more)
46
+
> -[`src/stdlib/btc.minsc`](https://min.sc/v0.3/#github=src/stdlib/btc.minsc) (transaction utilities, script opcodes, loop unrolling, control structures and more)
47
+
> -[`src/stdlib/elements.minsc`](https://min.sc/v0.3/#github=src/stdlib/elements.minsc) (Elements introspection, 64-bit arithmetic and more)
48
+
49
+
<!-- Minsc is a high-level scripting language for expressing Bitcoin Script spending conditions.
12
50
It is based on the [Miniscript](http://bitcoin.sipa.be/miniscript/) Policy language,
13
51
with additional features and syntactic sugar sprinkled on top, including variables, functions, infix notation, human-readable times and more.
14
52
15
-
Documentation & live playground are available on the website: https://min.sc
53
+
Documentation & live playground are available on the website: https://min.sc
16
54
17
-
Support development: [⛓️ on-chain or ⚡ lightning via BTCPay](https://btcpay.shesek.info/)
55
+
Support development: [⛓️ on-chain or ⚡ lightning via BTCPay](https://btcpay.shesek.info/)
18
56
19
57
## Examples
20
58
@@ -68,7 +106,7 @@ Support development: [⛓️ on-chain or ⚡ lightning via BTCPay](https://btcpa
68
106
```
69
107
[:arrow_forward: Try it live](https://min.sc/#c=%2F%2F%20Two%20factor%20authentication%20with%20a%20timeout%20recovery%20clause%0Afn%20two_factor%28%24user%2C%20%24provider%2C%20%24delay%29%20%3D%20%0A%20%20%24user%20%26%26%20%28likely%40%24provider%20%7C%7C%20older%28%24delay%29%29%3B%0A%0A%2F%2F%202FA%20where%20the%20user%20has%20a%202-of-2%20setup%20and%20the%20provider%20is%20a%203-of-4%20federation%0A%0A%24user%20%3D%20pk%28desktop_pk%29%20%26%26%20pk%28mobile_pk%29%3B%0A%24providers%20%3D%20%5B%20pk%28A%29%2C%20pk%28B%29%2C%20pk%28C%29%2C%20pk%28D%29%20%5D%3B%0A%0Atwo_factor%28%24user%2C%203%20of%20%24providers%2C%204%20months%29)
70
108
71
-
More examples are available on https://min.sc.
109
+
More examples are available on https://min.sc.-->
72
110
73
111
## Local installation
74
112
@@ -77,29 +115,26 @@ More examples are available on https://min.sc.
0 commit comments