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

Class BaseSignatureChecker

src/script/interpreter.h:312–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310uint256 SignatureHash(const CScript& scriptCode, const T& txTo, unsigned int nIn, int nHashType, const CConfidentialValue& amount, SigVersion sigversion, unsigned int flags, const PrecomputedTransactionData* cache = nullptr, SigHashCache* sighash_cache = nullptr);
311
312class BaseSignatureChecker
313{
314public:
315 virtual bool CheckECDSASignature(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion, unsigned int flags) const
316 {
317 return false;
318 }
319
320 virtual bool CheckSchnorrSignature(Span<const unsigned char> sig, Span<const unsigned char> pubkey, SigVersion sigversion, ScriptExecutionData& execdata, ScriptError* serror = nullptr) const
321 {
322 return false;
323 }
324
325 virtual bool CheckLockTime(const CScriptNum& nLockTime) const
326 {
327 return false;
328 }
329
330 virtual bool CheckSequence(const CScriptNum& nSequence) const
331 {
332 return false;
333 }
334
335 virtual const std::vector<CTxIn>* GetTxvIn() const
336 {
337 return nullptr;
338 }
339
340 virtual const std::vector<CTxOut>* GetTxvOut() const
341 {
342 return nullptr;
343 }
344
345 virtual uint32_t GetLockTime() const
346 {
347 return 0;
348 }
349
350 virtual int32_t GetTxVersion() const
351 {
352 return 0;
353 }
354
355 virtual const PrecomputedTransactionData* GetPrecomputedTransactionData() const
356 {
357 return nullptr;
358 }
359
360 virtual uint32_t GetnIn() const
361 {
362 return std::numeric_limits<uint32_t>::max();
363 }
364
365 virtual bool CheckSimplicity(const std::vector<unsigned char>& witness, const std::vector<unsigned char>& program, const rawElementsTapEnv& simplicityRawTap, int64_t budget, ScriptError* serror) const
366 {
367 return false;
368 }
369

Callers 7

AreInputsStandardFunction · 0.85
IsWitnessStandardFunction · 0.85
StacksMethod · 0.85
ReplaceRedeemScriptFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
VerifyNestedIfScriptFunction · 0.85

Calls

no outgoing calls

Tested by 3

ReplaceRedeemScriptFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68