MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / ScriptToUniv

Function ScriptToUniv

src/core_write.cpp:179–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179void ScriptToUniv(const CScript &script, UniValue &out, bool include_address) {
180 out.pushKV("asm", ScriptToAsmStr(script));
181 out.pushKV("hex", HexStr(script));
182
183 std::vector<std::vector<uint8_t>> solns;
184 TxoutType type = Solver(script, solns);
185 out.pushKV("type", GetTxnOutputType(type));
186
187 CTxDestination address;
188 if (include_address && ExtractDestination(script, address) &&
189 type != TxoutType::PUBKEY) {
190 out.pushKV("address", EncodeDestination(address, GetConfig()));
191 }
192}
193
194void ScriptPubKeyToUniv(const CScript &scriptPubKey, UniValue &out,
195 bool fIncludeHex) {

Callers 2

FUZZ_TARGET_INITFunction · 0.85
decodepsbtFunction · 0.85

Calls 7

ScriptToAsmStrFunction · 0.85
SolverFunction · 0.85
GetTxnOutputTypeFunction · 0.85
ExtractDestinationFunction · 0.85
EncodeDestinationFunction · 0.85
pushKVMethod · 0.80
HexStrFunction · 0.50

Tested by 1

FUZZ_TARGET_INITFunction · 0.68