MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / ScriptToUniv

Function ScriptToUniv

src/core_write.cpp:144–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void 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
160void ScriptPubKeyToUniv(const CScript& scriptPubKey,
161 UniValue& out, bool fIncludeHex)

Callers 1

decodepsbtFunction · 0.85

Calls 9

ScriptToAsmStrFunction · 0.85
HexStrFunction · 0.85
SolverFunction · 0.85
GetTxnOutputTypeFunction · 0.85
ExtractDestinationFunction · 0.85
EncodeDestinationFunction · 0.85
pushKVMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected