#include "abstracthophandler.hpp" #include namespace llarp::path { std::string make_onion_payload( const SymmNonce& nonce, const PathID_t& path_id, const std::string_view& inner_payload) { return make_onion_payload( nonce, path_id, ustring_view{ reinterpret_cast(inner_payload.data()), inner_payload.size()}); } std::string make_onion_payload( const SymmNonce& nonce, const PathID_t& path_id, const ustring_view& inner_payload) { oxenc::bt_dict_producer next_dict; next_dict.append("NONCE", nonce.ToView()); next_dict.append("PATHID", path_id.ToView()); next_dict.append("PAYLOAD", inner_payload); return std::move(next_dict).str(); } } // namespace llarp::path