Scorum
Functions
Management

Wallet Management. More...

Functions

void scorum::wallet::wallet_api::exit ()
 
variant_object scorum::wallet::wallet_api::about () const
 
std::string scorum::wallet::wallet_api::help () const
 
std::string scorum::wallet::wallet_api::gethelp (const std::string &method) const
 
std::string scorum::wallet::wallet_api::get_wallet_filename () const
 
bool scorum::wallet::wallet_api::is_new () const
 
bool scorum::wallet::wallet_api::is_locked () const
 
void scorum::wallet::wallet_api::lock ()
 
void scorum::wallet::wallet_api::unlock (const std::string &password)
 
void scorum::wallet::wallet_api::set_password (const std::string &password)
 
bool scorum::wallet::wallet_api::load_wallet_file (const std::string &wallet_filename="")
 
void scorum::wallet::wallet_api::save_wallet_file (const std::string &wallet_filename="")
 
void scorum::wallet::wallet_api::set_wallet_filename (const std::string &wallet_filename)
 

Detailed Description

Wallet Management.

Function Documentation

◆ about()

variant_object scorum::wallet::wallet_api::about ( ) const

Returns info such as client version, git version of graphene/fc, version of boost, openssl.

Returns
compile time info and client and dependencies versions

Definition at line 1198 of file wallet.cpp.

◆ exit()

void scorum::wallet::wallet_api::exit ( )

Close wallet application

Definition at line 3382 of file wallet.cpp.

◆ get_wallet_filename()

std::string scorum::wallet::wallet_api::get_wallet_filename ( ) const

Returns the current wallet filename.

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

See also
set_wallet_filename()
Returns
the wallet filename

Definition at line 1154 of file wallet.cpp.

◆ gethelp()

std::string scorum::wallet::wallet_api::gethelp ( const std::string &  method) const

Returns detailed help on a single API command.

Parameters
methodthe name of the API command you want help with
Returns
a multi-line string suitable for displaying on a terminal

Definition at line 1272 of file wallet.cpp.

◆ help()

std::string scorum::wallet::wallet_api::help ( ) const

Returns a list of all commands supported by the wallet API.

This lists each command, along with its arguments and return types. For more detailed help on a single command, use get_help()

Returns
a multi-line string suitable for displaying on a terminal

Definition at line 1254 of file wallet.cpp.

◆ is_locked()

bool scorum::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().

Returns
true if the wallet is locked

Definition at line 1303 of file wallet.cpp.

◆ is_new()

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

Returns
true if the wallet is new

Definition at line 1307 of file wallet.cpp.

◆ load_wallet_file()

bool scorum::wallet::wallet_api::load_wallet_file ( const std::string &  wallet_filename = "")

Loads a specified Graphene wallet.

The current wallet is closed before the new wallet is loaded.

Warning
This does not change the filename that will be used for futrue wallet writes, so this may cause you to overwrite your original wallet unless you also call set_wallet_filename()
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 1287 of file wallet.cpp.

◆ lock()

void scorum::wallet::wallet_api::lock ( )

Locks the wallet immediately.

Definition at line 1317 of file wallet.cpp.

◆ save_wallet_file()

void scorum::wallet::wallet_api::save_wallet_file ( const std::string &  wallet_filename = "")

Saves the current wallet to the given filename.

Warning
This does not change the wallet filename that will be used for futrue writes, so think of this function as 'Save a Copy As...' instead of 'Save As...'. Use set_wallet_filename() to make the filename persist.
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 1292 of file wallet.cpp.

◆ set_password()

void scorum::wallet::wallet_api::set_password ( const std::string &  password)

Sets a new password on the wallet.

The wallet must be either 'new' or 'unlocked' to execute this command.

Definition at line 1348 of file wallet.cpp.

◆ set_wallet_filename()

void scorum::wallet::wallet_api::set_wallet_filename ( const std::string &  wallet_filename)

Sets the wallet filename used for futrue writes.

This does not trigger a save, it only changes the default filename that will be used the next time a save is triggered.

Parameters
wallet_filenamethe new filename to use for futrue saves

Definition at line 1220 of file wallet.cpp.

◆ unlock()

void scorum::wallet::wallet_api::unlock ( const std::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 1332 of file wallet.cpp.