6#ifndef ALT_INTEGRATION_INCLUDE_VERIBLOCK_ENTITIES_BTCTX_HPP_
7#define ALT_INTEGRATION_INCLUDE_VERIBLOCK_ENTITIES_BTCTX_HPP_
13#include <veriblock/pop/hashutil.hpp>
14#include <veriblock/pop/serde.hpp>
15#include <veriblock/pop/slice.hpp>
16#include <veriblock/pop/uint.hpp>
31 std::vector<uint8_t> tx{};
34 BtcTx(std::vector<uint8_t> bytes) : tx(std::move(bytes)) {}
37 friend bool operator==(
const BtcTx& a,
const BtcTx& b) {
41 friend bool operator!=(
const BtcTx& a,
const BtcTx& b) {
42 return !(a.tx == b.tx);
57 size_t estimateSize()
const;
Class that is used for storing validation state.
Binary writer that is useful for binary serialization.
bool DeserializeFromVbkEncoding(ReadStream &stream, AltBlockAddon &out, ValidationState &state)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Blob< SHA256_HASH_SIZE > uint256
This is an overloaded member function, provided for convenience. It differs from the above function o...
Bitcoin transaction representation.
void toVbkEncoding(WriteStream &stream) const
Convert BtcTx to data stream using BtcTx VBK byte format.
void toRaw(WriteStream &stream) const
Convert BtcTx to data stream using BtcTx basic byte format.
hash_t getHash() const
Calculate the hash of the btc transaction.
Binary reading stream, that is useful during binary deserialization.
Non-owning contiguous array.