MCPcopy Create free account
hub / github.com/ElementsProject/elements / ScriptPubKeyToUniv

Function ScriptPubKeyToUniv

src/core_write.cpp:216–227  ·  view source on GitHub ↗

TODO: from v23 ("addresses" and "reqSigs" deprecated) this method should be refactored to remove the `include_addresses` option this method can also be combined with `ScriptToUniv` as they will overlap

Source from the content-addressed store, hash-verified

214// TODO: from v23 ("addresses" and "reqSigs" deprecated) this method should be refactored to remove the `include_addresses` option
215// this method can also be combined with `ScriptToUniv` as they will overlap
216void ScriptPubKeyToUniv(const CScript& scriptPubKey,
217 UniValue& out, bool fIncludeHex, bool include_addresses)
218{
219 SidechainScriptPubKeyToJSON(scriptPubKey, out, fIncludeHex, include_addresses, false);
220
221 uint256 pegout_chain;
222 CScript pegout_scriptpubkey;
223 if (scriptPubKey.IsPegoutScript(pegout_chain, pegout_scriptpubkey)) {
224 out.pushKV("pegout_chain", pegout_chain.GetHex());
225 SidechainScriptPubKeyToJSON(pegout_scriptpubkey, out, fIncludeHex, include_addresses, true);
226 }
227}
228
229void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex, int serialize_flags, const CTxUndo* txundo, TxVerbosity verbosity)
230{

Callers 7

ScriptToUnivFunction · 0.85
TxToUnivFunction · 0.85
rest_getutxosFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
decodescriptFunction · 0.85
decodepsbtFunction · 0.85
gettxoutFunction · 0.85

Calls 4

IsPegoutScriptMethod · 0.80
pushKVMethod · 0.45
GetHexMethod · 0.45

Tested by 1

FUZZ_TARGET_INITFunction · 0.68