<p>Yes. This is one of the main purposes of Miniscript to make it possible to construct witnesses in a general yet safe manner. The <a href="https://github.com/bitcoin/bips/blob/master/bip-0379.md#satisfaction" rel="nofollow noreferrer">satisfaction table in the Miniscript BIP</a> defines the witness stack element(s) to satisfy each fragment.</p>

CC BY-SA 4.0
2024-11-08T15:34:32.387Z
2024-11-08T15:34:32.387Z
Antoine Poinsot
<p>Is there an exact &quot;calling convention&quot; produced when you compile a policy? I am guessing this information must be available somewhere since the compiler has to perform its own validity analysis. I would just like to know exactly what I have to put in the witness stack to unlock the output without trying to figure it out from the script.</p>

<transactions><script><hash-time-locked-contract><miniscript>
How to determine the input stack format for a Miniscript script?
rdong8
# How to determine the input stack format for a Miniscript script?

(Asked by: username_0 on 2024-11-08)

Is there an exact "calling convention" produced when you compile a policy? I am guessing this information must be available somewhere since the compiler has to perform its own validity analysis. I would just like to know exactly what I have to put in the witness stack to unlock the output without trying to figure it out from the script.

**Tags:** transactions, script, hash-time-locked-contract, miniscript


---

## 1 answers

### Answer by username_1 on 2024-11-08. Score: 2 | Accepted answer

Yes. This is one of the main purposes of Miniscript to make it possible to construct witnesses in a general yet safe manner. The [satisfaction table in the Miniscript BIP](https://github.com/bitcoin/bips/blob/master/bip-0379.md#satisfaction) defines the witness stack element(s) to satisfy each fragment.


---

