6#ifndef ALT_INTEGRATION_ADDRESS_HPP
7#define ALT_INTEGRATION_ADDRESS_HPP
11#include <veriblock/pop/read_stream.hpp>
12#include <veriblock/pop/slice.hpp>
13#include <veriblock/pop/write_stream.hpp>
31 bool operator==(
const Address& other)
const noexcept;
32 bool operator!=(
const Address& other)
const noexcept;
33 bool operator==(
const std::string& other)
const noexcept;
69 static Address assertFromString(
const std::string& input);
84 size_t estimateSize() const;
92 : m_Type(type), m_Address(std::move(addr)) {}
95 std::string m_Address{};
99template <
typename Value>
101 return ToJSON<Value>(addr.
toString());
Class that is used for storing validation state.
Binary writer that is useful for binary serialization.
AddressType
VBK Address type (modelled after transaction type).
bool DeserializeFromVbkEncoding(ReadStream &stream, AltBlockAddon &out, ValidationState &state)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Represents address on VBK chain.
bool isDerivedFromPublicKey(Slice< const uint8_t > publicKey) const
Check if given address is generated with provided public key.
static Address fromPublicKey(Slice< const uint8_t > publicKey)
Convert public key to VBK standard address.
void toVbkEncoding(WriteStream &stream) const
Convert VBK address to data stream using VBK byte format.
AddressType getType() const noexcept
Return address type.
bool fromString(const std::string &input, ValidationState &state)
Parse provided string and convert it to VBK address.
void getPopBytes(WriteStream &stream) const
Return a Pop bytes from the address.
friend bool DeserializeFromVbkEncoding(ReadStream &stream, Address &out, ValidationState &state)
Read data from the stream and convert it to VBK address.
std::string toString() const noexcept
Convert VBK address to text representation.
Binary reading stream, that is useful during binary deserialization.
Non-owning contiguous array.