Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Sep 7, 2023
1 parent 3b96709 commit 4bec86d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions txscript/miniscript/miniscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ import (
"github.com/btcsuite/btcd/wire"
)

// 1. argCheck: checks that the nodes have the correct number of arguments
// 2. expandWrappers: dewraps the numbers before the colon : E.g. dv:older(144) is d(v(older(144)))
// 3. deSugar: Miniscript defines six instances of syntactic sugar. We replace these with fixed equations
// 4. typecheck: Not all fragments compose with each other to produce a valid Bitcoin Script and valid witness. This function checks that and sets the types of the Miniscript fragments. Only if the toplevel basic type is of type B the miniscript is valid.
// 5. canCollapseVerify If the rightmost scriptbyte of a node is OP_EQUAL, OP_CHECKSIG or OP_CHECKMULTISIG. We can convert it to the VERIFY version of the opcode, e.g. OP_EQUALVERIFY
// 6. malleabilityCheck checks each not if it is malleable (checking that the transaction hash can not be changes without altering the content)
// 7. computeScriptLen simply computes the script length.
// 8. computeOpCount counts the amount of opcodes the script contains (edited)

const (
// pubKeyLen is the length of a public key inside P2WSH, which are 33
// byte compressed public keys.
Expand Down

0 comments on commit 4bec86d

Please sign in to comment.