Bitcoin Core 28.99.0
P2P Digital Currency
Namespaces | Concepts | Functions
common-types.h File Reference
#include <clientversion.h>
#include <interfaces/types.h>
#include <primitives/transaction.h>
#include <serialize.h>
#include <streams.h>
#include <univalue.h>
#include <cstddef>
#include <mp/proxy-types.h>
#include <type_traits>
#include <utility>
Include dependency graph for common-types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ipc
 
namespace  ipc::capnp
 
namespace  mp
 Functions to serialize / deserialize common bitcoin types.
 

Concepts

concept  ipc::capnp::Deserializable
 Detect if type has a deserialize_type constructor, which is used to deserialize types like CTransaction that can't be unserialized into existing objects because they are immutable.
 

Functions

template<typename S >
auto ipc::capnp::Wrap (S &s)
 Construct a ParamStream wrapping a data stream with serialization parameters needed to pass transaction objects between bitcoin processes. More...
 
template<typename LocalType , typename Value , typename Output >
requires Serializable<LocalType, DataStream> && std::is_same_v<LocalType, std::remove_cv_t<std::remove_reference_t<LocalType>>>
void mp::CustomBuildField (TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
 Overload multiprocess library's CustomBuildField hook to allow any serializable object to be stored in a capnproto Data field or passed to a capnproto interface. More...
 
template<typename LocalType , typename Input , typename ReadDest >
requires Unserializable<LocalType, DataStream> && (!ipc::capnp::Deserializable<LocalType>)
decltype(auto) mp::CustomReadField (TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
 Overload multiprocess library's CustomReadField hook to allow any object with an Unserialize method to be read from a capnproto Data field or returned from capnproto interface. More...
 
template<typename LocalType , typename Input , typename ReadDest >
requires ipc::capnp::Deserializable<LocalType>
decltype(auto) mp::CustomReadField (TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
 Overload multiprocess library's CustomReadField hook to allow any object with a deserialize constructor to be read from a capnproto Data field or returned from capnproto interface. More...
 
template<class Rep , class Period , typename Value , typename Output >
void mp::CustomBuildField (TypeList< std::chrono::duration< Rep, Period > >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
 Overload CustomBuildField and CustomReadField to serialize std::chrono parameters and return values as numbers. More...
 
template<class Rep , class Period , typename Input , typename ReadDest >
decltype(auto) mp::CustomReadField (TypeList< std::chrono::duration< Rep, Period > >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
 
template<typename Value , typename Output >
void mp::CustomBuildField (TypeList< UniValue >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
 Overload CustomBuildField and CustomReadField to serialize UniValue parameters and return values as JSON strings. More...
 
template<typename Input , typename ReadDest >
decltype(auto) mp::CustomReadField (TypeList< UniValue >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
 
template<typename LocalType , typename Value , typename Output >
requires (std::is_same_v<decltype(output.get()), ::capnp::Data::Builder>) && (std::convertible_to<Value, std::span<const std::byte>> || std::convertible_to<Value, std::span<const char>> || std::convertible_to<Value, std::span<const unsigned char>> || std::convertible_to<Value, std::span<const signed char>>)
void mp::CustomBuildField (TypeList< LocalType >, Priority< 2 >, InvokeContext &invoke_context, Value &&value, Output &&output)
 Generic ::capnp::Data field builder for any C++ type that can be converted to a span of bytes, like std::vector<char> or std::array<uint8_t>, or custom blob types like uint256 or PKHash with data() and size() methods pointing to bytes. More...