I have extracted file interpreter.cpp from Bitcoin sources with dependencies.
I call:
EvalScript(stack, scriptOut, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker(), SIGVERSION_BASE);
scriptOut is "76a914592fc3990026334c8c6fb2b9da457179cdb5c68888ac":
OP_DUP OP_HASH160 N/A_20 [20 bytes] OP_EQUALVERIFY OP_CHECKSIG
But is error: at start, stack is empty and need OP_DUP opcode.
Next I try interpret input script, then output:
int err = EvalScript(stack, scriptInp, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker(), SIGVERSION_BASE);
err = EvalScript(stack, scriptOut, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker(), SIGVERSION_BASE);
but is also badly.
How to use EvalScript and maybe VerifyScript instead?
p.s.I must use SCRIPT_VERIFY_STRICTENC or SCRIPT_VERIFY_NONE,SCRIPT_VERIFY_P2SH? class BaseSignatureChecker or TransactionSignatureChecker?
--Goal: acquire address from script (or addresses from multisig script) using Bitcoin script interperter