Wire Sysio Wire Sysion 1.0.0
|
#include <wallet.hpp>
Public Attributes | |
std::shared_ptr< detail::soft_wallet_impl > | my |
This wallet assumes it is connected to the database server with a high-bandwidth, low-latency connection and performs minimal caching.
Definition at line 29 of file wallet.hpp.
sysio::wallet::soft_wallet::soft_wallet | ( | const wallet_data & | initial_data | ) |
Definition at line 266 of file wallet.cpp.
sysio::wallet::soft_wallet::~soft_wallet | ( | ) |
Definition at line 270 of file wallet.cpp.
|
overridevirtual |
Checks the password of the wallet
Validates the password on a wallet even if the wallet is already unlocked, throws if bad password given.
password | the password previously set with set_password() |
Implements sysio::wallet::wallet_api.
Definition at line 363 of file wallet.cpp.
bool sysio::wallet::soft_wallet::copy_wallet_file | ( | string | destination_filename | ) |
Definition at line 272 of file wallet.cpp.
Creates a key within the wallet to be used to sign transactions by an account.
example: create_key K1
key_type | the key type to create. May be empty to allow wallet to pick appropriate/"best" key type |
Implements sysio::wallet::wallet_api.
Definition at line 306 of file wallet.cpp.
void sysio::wallet::soft_wallet::encrypt_keys | ( | ) |
|
overridevirtual |
Get the WIF private key corresponding to a public key. The private key must already be in the wallet.
Implements sysio::wallet::wallet_api.
Definition at line 394 of file wallet.cpp.
pair< public_key_type, private_key_type > sysio::wallet::soft_wallet::get_private_key_from_password | ( | string | account, |
string | role, | ||
string | password ) const |
role | - active | owner | posting | memo |
Definition at line 403 of file wallet.cpp.
string sysio::wallet::soft_wallet::get_wallet_filename | ( | ) | const |
Returns the current wallet filename.
This is the filename that will be used when automatically saving the wallet.
Definition at line 277 of file wallet.cpp.
|
overridevirtual |
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 |
Implements sysio::wallet::wallet_api.
Definition at line 282 of file wallet.cpp.
|
overridevirtual |
Checks whether the wallet is locked (is unable to use its private keys).
This state can be changed by calling lock()
or unlock()
.
Implements sysio::wallet::wallet_api.
Definition at line 325 of file wallet.cpp.
bool sysio::wallet::soft_wallet::is_new | ( | ) | const |
Checks whether the wallet has just been created and has not yet had a password set.
Calling set_password
will transition the wallet to the locked state.
Definition at line 330 of file wallet.cpp.
|
overridevirtual |
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()
Implements sysio::wallet::wallet_api.
Definition at line 381 of file wallet.cpp.
|
overridevirtual |
Dumps all public keys owned by the wallet.
Implements sysio::wallet::wallet_api.
Definition at line 387 of file wallet.cpp.
bool sysio::wallet::soft_wallet::load_wallet_file | ( | string | wallet_filename = "" | ) |
Loads a specified Graphene wallet.
The current wallet is closed before the new wallet is loaded.
set_wallet_filename()
wallet_filename | the filename of the wallet JSON file to load. If wallet_filename is empty, it reloads the existing wallet file |
Definition at line 315 of file wallet.cpp.
|
overridevirtual |
Locks the wallet immediately.
Implements sysio::wallet::wallet_api.
Definition at line 340 of file wallet.cpp.
|
overridevirtual |
Removes a key from the wallet.
example: remove_key SYS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
key | the Public Key to remove |
Implements sysio::wallet::wallet_api.
Definition at line 294 of file wallet.cpp.
void sysio::wallet::soft_wallet::save_wallet_file | ( | string | wallet_filename = "" | ) |
Saves the current wallet to the given filename.
set_wallet_filename()
to make the filename persist. wallet_filename | the filename of the new wallet JSON file to create or overwrite. If wallet_filename is empty, save to the current filename. |
Definition at line 320 of file wallet.cpp.
|
overridevirtual |
Sets a new password on the wallet.
The wallet must be either 'new' or 'unlocked' to execute this command.
Implements sysio::wallet::wallet_api.
Definition at line 373 of file wallet.cpp.
void sysio::wallet::soft_wallet::set_wallet_filename | ( | string | wallet_filename | ) |
Sets the wallet filename used for future writes.
This does not trigger a save, it only changes the default filename that will be used the next time a save is triggered.
wallet_filename | the new filename to use for future saves |
Definition at line 411 of file wallet.cpp.
|
overridevirtual |
Returns a signature given the digest and public_key, if this wallet can sign via that public key
Implements sysio::wallet::wallet_api.
Definition at line 399 of file wallet.cpp.
|
overridevirtual |
Unlocks the wallet.
The wallet remain unlocked until the lock
is called or the program exits.
password | the password previously set with set_password() |
Implements sysio::wallet::wallet_api.
Definition at line 351 of file wallet.cpp.
std::shared_ptr<detail::soft_wallet_impl> sysio::wallet::soft_wallet::my |
Definition at line 182 of file wallet.hpp.