1
0
Fork 0
mirror of https://github.com/eosswedenorg/libantelope synced 2026-06-17 20:10:03 +02:00

WIF: Support PVT_K1 format.

This commit is contained in:
Henrik Hautakoski 2023-03-25 16:25:02 +01:00
parent ea411793a2
commit 1aa6906ba2
7 changed files with 157 additions and 38 deletions

View file

@ -34,13 +34,14 @@ namespace libeosio {
*/
const std::string WIF_PUB_LEG = "EOS";
const std::string WIF_PUB_K1 = "PUB_K1_";
const std::string WIF_PVT_LEG = "";
const std::string WIF_PVT_K1 = "PVT_K1_";
/**
* Encode an EC private key to WIF String.
*/
std::string wif_priv_encode(const ec_privkey_t& priv);
std::string wif_priv_encode(const ec_privkey_t& priv, const std::string& prefix = WIF_PVT_LEG);
/**
* Decode an WIF String to EC private key