6#ifndef VERIBLOCK_POP_CPP_NETWORK_BYTE_PAIR_HPP
7#define VERIBLOCK_POP_CPP_NETWORK_BYTE_PAIR_HPP
11#include <veriblock/pop/json.hpp>
22 operator bool()
const {
return hasValue; }
32 std::string toPrettyString()
const {
34 return std::to_string(
value);
40 template <
typename JsonValue>
41 void putJson(JsonValue& obj)
const {
43 json::putIntKV(obj,
"networkByte",
value);
45 json::putNullKV(obj,
"networkByte");
VbkNetworkType networkType
< works as std::optional. if hasNetworkByte is true, networkByte is set
Stores pair of TxType and VBK network byte.
works as optional<uint8_t>
bool hasValue
if hasValue == false, it is mainnet
uint8_t value
otherwise, use value for network ID