Is the line
scriptOutputsAt ownHash
equivalent to pubKeyOutputsAt scrptAddress
?
More importantly, is (valueLockedBy (scriptContextInfoTx ctx) ownHash)
just the sum of the outputs at the script address? IE is it the same as
let values = pubKeyOutputsAt scptAddress (scriptContextInfoTx ctx) in fold values