DECENT
Functions

Functions

vector< account_objectgraphene::wallet::wallet_api::list_my_accounts ()
 Lists all accounts controlled by this wallet. This returns a list of the full account objects for all accounts whose private keys we possess. More...
 
string graphene::wallet::wallet_api::get_wallet_filename () const
 Returns the current wallet filename. More...
 
void graphene::wallet::wallet_api::set_wallet_filename (const string &wallet_filename)
 Sets the wallet filename used for future writes. More...
 
string graphene::wallet::wallet_api::get_private_key (public_key_type pubkey) const
 Get the WIF private key corresponding to a public key. The private key must already be imported in the wallet. More...
 
bool graphene::wallet::wallet_api::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. More...
 
bool graphene::wallet::wallet_api::is_locked () const
 Checks whether the wallet is locked (is unable to use its private keys). This state can be changed by calling lock() or unlock(). More...
 
void graphene::wallet::wallet_api::lock ()
 Locks the wallet immediately. More...
 
void graphene::wallet::wallet_api::unlock (const string &password)
 Unlocks the wallet. The wallet remain unlocked until the lock() is called or the program exits. More...
 
void graphene::wallet::wallet_api::set_password (const string &password)
 Sets a new password on the wallet. The wallet must be either new or unlocked to execute this command. More...
 
bool graphene::wallet::wallet_api::load_wallet_file (const string &wallet_filename=string())
 Loads a specified wallet file. The current wallet is closed before the new wallet is loaded. More...
 
void graphene::wallet::wallet_api::save_wallet_file (const string &wallet_filename=string())
 Saves the current wallet to the given filename. More...
 
bool graphene::wallet::wallet_api::import_key (const string &account_name_or_id, const string &wif_key)
 Imports the private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account. More...
 
bool graphene::wallet::wallet_api::import_single_key (const string &account_name_or_id, const string &wif_key)
 Imports a private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account. More...
 
variant graphene::wallet::wallet_api::dump_private_keys ()
 Dumps all private keys successfully imported in the wallet. More...
 
vector< account_object > list_my_accounts ()
 Lists all accounts controlled by this wallet. This returns a list of the full account objects for all accounts whose private keys we possess. More...
 
string get_wallet_filename () const
 Returns the current wallet filename. More...
 
void set_wallet_filename (const string &wallet_filename)
 Sets the wallet filename used for future writes. More...
 
string get_private_key (public_key_type pubkey) const
 Get the WIF private key corresponding to a public key. The private key must already be imported in the wallet. More...
 
bool 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. More...
 
bool is_locked () const
 Checks whether the wallet is locked (is unable to use its private keys). This state can be changed by calling lock() or unlock(). More...
 
void lock ()
 Locks the wallet immediately. More...
 
void unlock (const string &password)
 Unlocks the wallet. The wallet remain unlocked until the lock() is called or the program exits. More...
 
void set_password (const string &password)
 Sets a new password on the wallet. The wallet must be either new or unlocked to execute this command. More...
 
bool load_wallet_file (const string &wallet_filename=string())
 Loads a specified wallet file. The current wallet is closed before the new wallet is loaded. More...
 
void save_wallet_file (const string &wallet_filename=string())
 Saves the current wallet to the given filename. More...
 
bool import_key (const string &account_name_or_id, const string &wif_key)
 Imports the private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account. More...
 
bool import_single_key (const string &account_name_or_id, const string &wif_key)
 Imports a private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account. More...
 
variant dump_private_keys ()
 Dumps all private keys successfully imported in the wallet. More...
 

Detailed Description

Function Documentation

variant dump_private_keys ( )

Dumps all private keys successfully imported in the wallet.

Note
The keys are printed in WIF format. You can import these keys into another wallet using import_key()
Returns
a map containing the private keys and corresponding public keys
variant wallet_api::dump_private_keys ( )

Dumps all private keys successfully imported in the wallet.

Note
The keys are printed in WIF format. You can import these keys into another wallet using import_key()
Returns
a map containing the private keys and corresponding public keys

Definition at line 145 of file wallet.cpp.

string get_private_key ( public_key_type  pubkey) const

Get the WIF private key corresponding to a public key. The private key must already be imported in the wallet.

Parameters
pubkeypublic key
Returns
WIF private key corresponding to a public key
string wallet_api::get_private_key ( public_key_type  pubkey) const

Get the WIF private key corresponding to a public key. The private key must already be imported in the wallet.

Parameters
pubkeypublic key
Returns
WIF private key corresponding to a public key

Definition at line 18 of file wallet.cpp.

string get_wallet_filename ( ) const

Returns the current wallet filename.

Note
This is the filename that will be used when automatically saving the wallet.
Returns
the wallet filename
string wallet_api::get_wallet_filename ( ) const

Returns the current wallet filename.

Note
This is the filename that will be used when automatically saving the wallet.
Returns
the wallet filename

Definition at line 8 of file wallet.cpp.

bool import_key ( const string &  account_name_or_id,
const string &  wif_key 
)

Imports the private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account.

Note
This command also automatically derives and imports active and memo key if the private key match the owner key.
See also
dump_private_keys()
list_my_accounts()
Parameters
account_name_or_idthe account owning the key
wif_keythe private key in WIF format
Returns
true if the key was imported
bool wallet_api::import_key ( const string &  account_name_or_id,
const string &  wif_key 
)

Imports the private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account.

Note
This command also automatically derives and imports active and memo key if the private key match the owner key.
See also
dump_private_keys()
list_my_accounts()
Parameters
account_name_or_idthe account owning the key
wif_keythe private key in WIF format
Returns
true if the key was imported

Definition at line 127 of file wallet.cpp.

bool import_single_key ( const string &  account_name_or_id,
const string &  wif_key 
)

Imports a private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account.

See also
dump_private_keys()
list_my_accounts()
Parameters
account_name_or_idthe account owning the key
wif_keythe private key in WIF format
Returns
true if the key was imported
bool wallet_api::import_single_key ( const string &  account_name_or_id,
const string &  wif_key 
)

Imports a private key for an existing account. The private key should match an owner key, an active key or a memo key for the named account.

See also
dump_private_keys()
list_my_accounts()
Parameters
account_name_or_idthe account owning the key
wif_keythe private key in WIF format
Returns
true if the key was imported

Definition at line 136 of file wallet.cpp.

bool is_locked ( ) const

Checks whether the wallet is locked (is unable to use its private keys). This state can be changed by calling lock() or unlock().

See also
unlock()
Returns
true if the wallet is locked
bool wallet_api::is_locked ( ) const

Checks whether the wallet is locked (is unable to use its private keys). This state can be changed by calling lock() or unlock().

See also
unlock()
Returns
true if the wallet is locked

Definition at line 28 of file wallet.cpp.

bool 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.

Returns
true if the wallet is new
bool wallet_api::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.

Returns
true if the wallet is new

Definition at line 23 of file wallet.cpp.

vector<account_object> list_my_accounts ( )

Lists all accounts controlled by this wallet. This returns a list of the full account objects for all accounts whose private keys we possess.

Returns
a list of accounts imported in the wallet
vector< account_object > wallet_api::list_my_accounts ( )

Lists all accounts controlled by this wallet. This returns a list of the full account objects for all accounts whose private keys we possess.

Returns
a list of accounts imported in the wallet

Definition at line 3 of file wallet.cpp.

bool load_wallet_file ( const string &  wallet_filename = string())

Loads a specified wallet file. The current wallet is closed before the new wallet is loaded.

Warning
This changes the filename that will be used for future wallet writes.
Parameters
wallet_filenamethe filename of the wallet JSON file to load. If wallet_filename is empty, it reloads the existing wallet file
Returns
true if the specified wallet is loaded
bool wallet_api::load_wallet_file ( const string &  wallet_filename = string())

Loads a specified wallet file. The current wallet is closed before the new wallet is loaded.

Warning
This changes the filename that will be used for future wallet writes.
Parameters
wallet_filenamethe filename of the wallet JSON file to load. If wallet_filename is empty, it reloads the existing wallet file
Returns
true if the specified wallet is loaded

Definition at line 115 of file wallet.cpp.

void lock ( )

Locks the wallet immediately.

See also
unlock()
void wallet_api::lock ( )

Locks the wallet immediately.

See also
unlock()

Definition at line 33 of file wallet.cpp.

void save_wallet_file ( const string &  wallet_filename = string())

Saves the current wallet to the given filename.

Warning
This does not change the wallet filename that will be used for future writes, so think of this function as 'Save a Copy As...' instead of 'Save As...'.
Parameters
wallet_filenamethe filename of the new wallet JSON file to create or overwrite. If wallet_filename is empty, save to the current filename.
void wallet_api::save_wallet_file ( const string &  wallet_filename = string())

Saves the current wallet to the given filename.

Warning
This does not change the wallet filename that will be used for future writes, so think of this function as 'Save a Copy As...' instead of 'Save As...'.
Parameters
wallet_filenamethe filename of the new wallet JSON file to create or overwrite. If wallet_filename is empty, save to the current filename.

Definition at line 122 of file wallet.cpp.

void set_password ( const string &  password)

Sets a new password on the wallet. The wallet must be either new or unlocked to execute this command.

Parameters
password
void wallet_api::set_password ( const string &  password)

Sets a new password on the wallet. The wallet must be either new or unlocked to execute this command.

Parameters
password

Definition at line 107 of file wallet.cpp.

void set_wallet_filename ( const string &  wallet_filename)

Sets the wallet filename used for future writes.

Parameters
wallet_filenamethe wallet filename that will be used when automatically saving the wallet
void wallet_api::set_wallet_filename ( const string &  wallet_filename)

Sets the wallet filename used for future writes.

Parameters
wallet_filenamethe wallet filename that will be used when automatically saving the wallet

Definition at line 13 of file wallet.cpp.

void unlock ( const string &  password)

Unlocks the wallet. The wallet remain unlocked until the lock() is called or the program exits.

Parameters
passwordthe password previously set with set_password()
void wallet_api::unlock ( const string &  password)

Unlocks the wallet. The wallet remain unlocked until the lock() is called or the program exits.

Parameters
passwordthe password previously set with set_password()

Definition at line 45 of file wallet.cpp.