use QPlainTextEdit instead of QTextEdit
fix syntax of redeem_script
store output type explicitly in tuple