Data Types¶
Minsc runtime values are represented using the minsc::Value enum.
Core Types¶
There are 8 core data types:
| Type | Underlying Repr | Coerces From |
|---|---|---|
Bool |
bool |
None |
Int |
i64 |
None |
Float |
f64 |
Int |
String |
String |
Any |
Bytes |
Vec<u8> |
Bool|Int|String|Transaction|Script|Psbt|PubKey|SecKey |
Array |
minsc::Array |
None |
Function |
minsc::Function |
None |
Symbol |
minsc::Symbol |
None |
Bitcoin Types¶
| Type | Underlying Repr | Coerces From |
|---|---|---|
PubKey |
miniscript::DescriptorPublicKey |
Bytes|SecKey |
SecKey |
miniscript::DescriptorSecretKey |
Bytes |
Transaction |
bitcoin::Transaction |
Bytes|Psbt|Array |
Script |
bitcoin::ScriptBuf |
Bytes |
Psbt |
bitcoin::Psbt |
Transaction|Bytes|String|Array |
Address |
bitcoin::Address |
None |
Network |
bitcoin::Network |
None |
TapInfo |
bitcoin::TaprootSpendInfo |
Descriptor<Tr> |
Descriptor |
miniscript::Descriptor |
None |
Policy |
miniscript::Policy |
PubKey|SecKey |
WshInfo |
minsc::WshInfo |
None |