#include "util/StringUtils.hpp" #include "rpc/RPCHelpers.hpp" #include #include #include #include std::string hexStringToBinaryString(std::string const& hex) { auto const blob = ripple::strUnHex(hex); std::string strBlob; for (auto c : *blob) strBlob += c; return strBlob; } ripple::uint256 binaryStringToUint256(std::string const& bin) { return ripple::uint256::fromVoid(static_cast(bin.data())); } std::string ledgerHeaderToBinaryString(ripple::LedgerHeader const& info) { auto const blob = rpc::ledgerHeaderToBlob(info, true); std::string strBlob; for (auto c : blob) strBlob += c; return strBlob; };