Expand description
Extensions to elements-miniscript
Users should implement the Extension
trait to extend miniscript to have newer leaf nodes
Look at examples for implementation of ver_eq fragment
Re-exports§
pub use self::param::ArgFromStr;
pub use self::param::CovExtArgs;
pub use self::param::ExtParam;
pub use self::param::NoExtParam;
Modules§
- param
- Parameters to certain covenants
Structs§
- Arith
- Wrapper around [
ArithInner
] that ensures that the expression is valid. See [ArithInner
] for more details. - Check
SigFrom Stack - CheckSigFromStack struct
<msg> <pk> CHECKSIGFROMSTACK
- CsfsKey
- Wrapper around XOnlyKeys used in CheckSigfromstack
- CsfsMsg
- Wrapper around CheckSigFromStack signature messages
- Expr
ExprInner
with some values cached- From
Token Iter Error - Failed to extract a token from an iterator of tokens
- Legacy
Outputs Pref - Prefix is initally encoded in the script pubkey User provides a suffix such that hash of (prefix || suffix) is equal to hashOutputs Since, there is a policy restriction that initial pushes must be only 80 bytes, we need user to provide suffix in separate items There can be atmost 7 cats, because the script element must be less than 520 bytes total in order to compute an hash256 on it. Even if the witness does not require 7 pushes, the user should push 7 elements with possibly empty values.
- Legacy
VerEq - Version struct
DEPTH <12> SUB PICK <num> EQUAL
- Spk
- Wrapper around
elements::Script
for representing script pubkeys - TxEnv
- A satisfier for Covenant descriptors that can do transaction introspection ’tx denotes the lifetime of the transaction being satisfied and ’ptx denotes the lifetime of the previous transaction inputs
Enums§
- Asset
Expr - Enum representing operations with transaction assets. Every variant of this enum pushes a 32 byte asset + 1 byte prefix on stack top.. These operations also support confidential assets. This will abort when - Supplied index is out of bounds.
- CovOps
- Miniscript Fragment containing arith expressions Expr cannot be directly used a miniscript fragment because it pushes a 64 bit value on stack. Two expressions can be combined with Arith to something is of Base type B to be used in miniscript expressions
- Covenant
Ext - All known Extensions for elements-miniscript
- Eval
Error - Evaluation Errors
- Expr
Inner - Enum representing arithmetic operations with transaction amounts. Every variant of this enum pushes a single singed 64 bit BE number on stack top. All of introspection opcodes explicitly assert the amount is explicit.
- IdxExpr
- Enum representing operations with input/output indexes. Pushes a single CScriptNum on stack top. This is used to represent the index of the input or output.
- NoExt
- No Extensions for elements-miniscript All the implementations for the this function are unreachable
- SpkExpr
- Enum representing operations with transaction script pubkeys. Every variant of this enum pushes a witness program + 1 byte witness version on stack top. If the script pubkey is not a witness program. Push a sha256 hash of the script pubkey followed by -1 witness version This will abort when - Supplied index is out of bounds.
- Value
Expr - Enum representing operations with transaction values. Every variant of this enum pushes a 32 byte value + 1 byte prefix on stack top.. These operations also support confidential values. This will abort when - Supplied index is out of bounds.
Traits§
- Extension
- Extensions to elements-miniscript. Refer to implementations(unimplemented!) for example and tutorials
- Parseable
Ext - Support for parsing/serializing/satisfaction of extensions.
Extension
trait reasons about extension in abstract way whereas this trait reasons about the concrete data structures. Extension is similar toMiniscriptKey
, whereas ParseableExt is similar toToPublicKey
.
Functions§
- check_
sig_ price_ oracle_ 1 - API to check sig from fragment
price_oracle_1
- sighash_
msg_ price_ oracle_ 1 secp256k1_zkp::Message
for fragmentprice_oracle_1
. To be used in for signing with schnorr signatures.