| 142 | } |
| 143 | |
| 144 | void ScriptToUniv(const CScript& script, UniValue& out, bool include_address) |
| 145 | { |
| 146 | out.pushKV("asm", ScriptToAsmStr(script)); |
| 147 | out.pushKV("hex", HexStr(script.begin(), script.end())); |
| 148 | |
| 149 | std::vector<std::vector<unsigned char>> solns; |
| 150 | txnouttype type; |
| 151 | Solver(script, type, solns); |
| 152 | out.pushKV("type", GetTxnOutputType(type)); |
| 153 | |
| 154 | CTxDestination address; |
| 155 | if (include_address && ExtractDestination(script, address)) { |
| 156 | out.pushKV("address", EncodeDestination(address)); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | void ScriptPubKeyToUniv(const CScript& scriptPubKey, |
| 161 | UniValue& out, bool fIncludeHex) |
no test coverage detected