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

Function GetTxnOutputType

src/script/standard.cpp:61–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61std::string GetTxnOutputType(TxoutType t)
62{
63 switch (t) {
64 case TxoutType::NONSTANDARD: return "nonstandard";
65 case TxoutType::PUBKEY: return "pubkey";
66 case TxoutType::PUBKEYHASH: return "pubkeyhash";
67 case TxoutType::SCRIPTHASH: return "scripthash";
68 case TxoutType::MULTISIG: return "multisig";
69 case TxoutType::NULL_DATA: return "nulldata";
70 case TxoutType::WITNESS_V0_KEYHASH: return "witness_v0_keyhash";
71 case TxoutType::WITNESS_V0_SCRIPTHASH: return "witness_v0_scripthash";
72 case TxoutType::WITNESS_V1_TAPROOT: return "witness_v1_taproot";
73 case TxoutType::WITNESS_UNKNOWN: return "witness_unknown";
74 case TxoutType::OP_TRUE: return "true";
75 case TxoutType::FEE: return "fee";
76 }
77 assert(false);
78}
79
80static bool MatchPayToPubkey(const CScript& script, valtype& pubkey)
81{

Callers 3

ProcessSubScriptMethod · 0.85
GetAllOutputTypesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected