5 #ifndef BITCOIN_SCRIPT_SIGHASHTYPE_H 6 #define BITCOIN_SCRIPT_SIGHASHTYPE_H 44 explicit SigHashType(uint32_t sigHashIn) : sigHash(sigHashIn) {}
47 return SigHashType((sigHash & ~0x1f) | uint32_t(baseSigHashType));
51 return SigHashType((forkId << 8) | (sigHash & 0xff));
85 template <
typename Stream>
void Serialize(Stream &s)
const {
107 #endif // BITCOIN_SCRIPT_SIGHASHTYPE_H friend constexpr bool operator!=(const SigHashType &a, const SigHashType &b)
bool hasAnyoneCanPay() const
uint32_t getRawSigHashType() const
BaseSigHashType getBaseType() const
SigHashType withAnyoneCanPay(bool anyoneCanPay=true) const
void Unserialize(Stream &s)
void Serialize(Stream &s, char a)
void Serialize(Stream &s) const
SigHashType withForkId(bool forkId=true) const
SigHashType withForkValue(uint32_t forkId) const
uint32_t getForkValue() const
SigHashType withBaseType(BaseSigHashType baseSigHashType) const
SigHashType(uint32_t sigHashIn)
void Unserialize(Stream &s, char &a)
friend constexpr bool operator==(const SigHashType &a, const SigHashType &b)
Handy operators.
Signature hash type wrapper class.
BaseSigHashType
Base signature hash types Base sig hash types not defined in this enum may be used, but they will be represented as UNSUPPORTED.