* Create the assembly string representation of a CScript object. * @param[in] script CScript object to convert into the asm string * representation. * @param[in] fAttemptSighashDecode Whether to attempt to decode sighash * types on data within the script that matches the format of a signature. Only * pass true for scripts you believe could contain signatures. For example, pass * false,
| 89 | * false, or omit the this argument (defaults to false), for scriptPubKeys. |
| 90 | */ |
| 91 | std::string ScriptToAsmStr(const CScript& script, |
| 92 | const int32_t txnVersion, |
| 93 | const bool fAttemptSighashDecode) |
| 94 | { |
| 95 | CStringWriter stringWriter; |
| 96 | ScriptToAsmStr(script, stringWriter, txnVersion, fAttemptSighashDecode); |
| 97 | return stringWriter.MoveOutString(); |
| 98 | } |
| 99 | |
| 100 | void ScriptToAsmStr(const CScript& script, |
| 101 | CTextWriter& textWriter, |