#include #include #include #include "wire/json.h" #include "wire/adapted/crypto.h" #include "ringct/rctTypes.h" int main() { std::string json = "\"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20\""; rct::key key; try { wire::json_reader reader{epee::as_byte_span(json)}; wire::read_bytes(reader, key); std::cout << "Parsed key: "; for (int i = 0; i < 32; ++i) printf("%02x", key.bytes[i]); std::cout << std::endl; } catch (const std::exception& e) { std::cerr << "Error: " << e.what() << std::endl; } return 0; }