MCPcopy Create free account
hub / github.com/Clarionos/clarion / to_string

Method to_string

libraries/fc/src/crypto/private_key.cpp:114–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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() << ')';

Callers 2

private_key.cppFile · 0.45
to_variantFunction · 0.45

Calls 4

to_wifFunction · 0.85
stringClass · 0.85
whichMethod · 0.45
visitMethod · 0.45

Tested by

no test coverage detected