Scorum
|
Wallet Key API. More...
Functions | |
bool | scorum::wallet::wallet_api::import_key (const std::string &wif_key) |
brain_key_info | scorum::wallet::wallet_api::suggest_brain_key () const |
std::map< public_key_type, std::string > | scorum::wallet::wallet_api::list_keys () |
std::string | scorum::wallet::wallet_api::get_private_key (const public_key_type &pubkey) const |
std::pair< public_key_type, std::string > | scorum::wallet::wallet_api::get_private_key_from_password (const std::string &account, const std::string &role, const std::string &password) const |
std::string | scorum::wallet::wallet_api::normalize_brain_key (const std::string &s) const |
Wallet Key API.
std::string scorum::wallet::wallet_api::get_private_key | ( | const public_key_type & | pubkey | ) | const |
Get the WIF private key corresponding to a public key. The private key must already be in the wallet.
Definition at line 1362 of file wallet.cpp.
std::pair< public_key_type, std::string > scorum::wallet::wallet_api::get_private_key_from_password | ( | const std::string & | account, |
const std::string & | role, | ||
const std::string & | password | ||
) | const |
Get private key from password
account | |
role | active | owner | posting | memo |
password |
Definition at line 1367 of file wallet.cpp.
bool scorum::wallet::wallet_api::import_key | ( | const std::string & | wif_key | ) |
Imports a WIF Private Key into the wallet to be used to sign transactions by an account.
example: import_key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
wif_key | the WIF Private Key to import |
Definition at line 1169 of file wallet.cpp.
std::map< public_key_type, std::string > scorum::wallet::wallet_api::list_keys | ( | ) |
Dumps all private keys owned by the wallet.
The keys are printed in WIF format. You can import these keys into another wallet using import_key()
Definition at line 1356 of file wallet.cpp.
std::string scorum::wallet::wallet_api::normalize_brain_key | ( | const std::string & | s | ) | const |
Transforms a brain key to reduce the chance of errors when re-entering the key from memory.
This takes a user-supplied brain key and normalizes it into the form used for generating private keys. In particular, this upper-cases all ASCII characters and collapses multiple spaces into one.
s | the brain key as supplied by the user |
Definition at line 1188 of file wallet.cpp.
brain_key_info scorum::wallet::wallet_api::suggest_brain_key | ( | ) | const |
Suggests a safe brain key to use for creating your account.
create_account_with_brain_key()
requires you to specify a 'brain key', a long passphrase that provides enough entropy to generate cyrptographic keys. This function will suggest a suitably random string that should be easy to write down (and, with effort, memorize).
Definition at line 1225 of file wallet.cpp.