| 112 | {} |
| 113 | |
| 114 | std::string private_key::to_string(const fc::yield_function_t& yield) const |
| 115 | { |
| 116 | auto which = _storage.which(); |
| 117 | |
| 118 | if (which == 0) { |
| 119 | using default_type = storage_type::template type_at<0>; |
| 120 | return to_wif(_storage.template get<default_type>(), yield); |
| 121 | } |
| 122 | |
| 123 | auto data_str = _storage.visit(base58str_visitor<storage_type, config::private_key_prefix>(yield)); |
| 124 | return std::string(config::private_key_base_prefix) + "_" + data_str; |
| 125 | } |
| 126 | |
| 127 | std::ostream& operator<<(std::ostream& s, const private_key& k) { |
| 128 | s << "private_key(" << k.to_string() << ')'; |
no test coverage detected