Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
KeyCLI Class Reference

#include <KeyAux.h>

Collaboration diagram for KeyCLI:
[legend]

Public Types

enum  OperationMode {
  OperationMode::None, OperationMode::ListBare, OperationMode::NewBare, OperationMode::ImportBare,
  OperationMode::ExportBare, OperationMode::RecodeBare, OperationMode::KillBare, OperationMode::InspectBare,
  OperationMode::CreateWallet, OperationMode::List, OperationMode::New, OperationMode::Import,
  OperationMode::ImportWithAddress, OperationMode::ImportPresale, OperationMode::Export, OperationMode::Recode,
  OperationMode::Kill, OperationMode::Inspect, OperationMode::SignTx, OperationMode::DecodeTx
}
 

Public Member Functions

 KeyCLI (OperationMode _mode=OperationMode::None)
 
bool interpretOption (int &i, int argc, char **argv)
 
KeyPair makeKey () const
 
Secret getSecret (std::string const &_signKey)
 
std::string userVisible (Address const &_a) const
 
void execute ()
 
std::string lockPassword (std::string const &_accountName)
 

Static Public Member Functions

static void streamHelp (ostream &_out)
 
static bytes inputData (std::string const &_input, bool *_isFile=nullptr)
 
static bool isTrue (std::string const &_m)
 
static bool isFalse (std::string const &_m)
 

Private Member Functions

void openWallet (KeyManager &_w)
 
KDF kdf () const
 
Address userToAddress (std::string const &_s)
 
KeyManagerkeyManager (bool walletLess=false)
 
SecretStoresecretStore ()
 

Private Attributes

unique_ptr< SecretStorem_secretStore
 Where the keys are. More...
 
unique_ptr< KeyManagerm_keyManager
 
OperationMode m_mode
 Operating mode. More...
 
string m_secretsPath = SecretStore::defaultPath()
 Wallet stuff. More...
 
string m_walletPath = KeyManager::defaultPath()
 
string m_masterPassword
 Wallet passphrase stuff. More...
 
strings m_unlocks
 
string m_lock
 
string m_lockHint
 
bool m_icap = true
 
string m_name
 Creating/importing. More...
 
Address m_address
 
bool m_showSecret = false
 Inspecting. More...
 
strings m_inputs
 Importing. More...
 
string m_signKey
 Signing. More...
 
TransactionSkeleton m_toSign
 
u256 m_forceNonce
 
string m_kdf = "scrypt"
 
map< string, string > m_kdfParams
 

Detailed Description

Definition at line 89 of file KeyAux.h.

Member Enumeration Documentation

enum KeyCLI::OperationMode
strong
Enumerator
None 
ListBare 
NewBare 
ImportBare 
ExportBare 
RecodeBare 
KillBare 
InspectBare 
CreateWallet 
List 
New 
Import 
ImportWithAddress 
ImportPresale 
Export 
Recode 
Kill 
Inspect 
SignTx 
DecodeTx 

Definition at line 92 of file KeyAux.h.

Constructor & Destructor Documentation

KeyCLI::KeyCLI ( OperationMode  _mode = OperationMode::None)
inline

Definition at line 116 of file KeyAux.h.

Member Function Documentation

void KeyCLI::execute ( )
inline

Definition at line 324 of file KeyAux.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Secret KeyCLI::getSecret ( std::string const &  _signKey)
inline

Definition at line 286 of file KeyAux.h.

Here is the call graph for this function:

static bytes KeyCLI::inputData ( std::string const &  _input,
bool *  _isFile = nullptr 
)
inlinestatic

Definition at line 761 of file KeyAux.h.

Here is the call graph for this function:

bool KeyCLI::interpretOption ( int &  i,
int  argc,
char **  argv 
)
inline

Definition at line 118 of file KeyAux.h.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool KeyCLI::isFalse ( std::string const &  _m)
inlinestatic

Definition at line 783 of file KeyAux.h.

static bool KeyCLI::isTrue ( std::string const &  _m)
inlinestatic

Definition at line 778 of file KeyAux.h.

KDF KeyCLI::kdf ( ) const
inlineprivate

Definition at line 804 of file KeyAux.h.

KeyManager& KeyCLI::keyManager ( bool  walletLess = false)
inlineprivate

Definition at line 817 of file KeyAux.h.

std::string KeyCLI::lockPassword ( std::string const &  _accountName)
inline

Definition at line 693 of file KeyAux.h.

Here is the call graph for this function:

KeyPair KeyCLI::makeKey ( ) const
inline

Definition at line 278 of file KeyAux.h.

Here is the call graph for this function:

void KeyCLI::openWallet ( KeyManager _w)
inlineprivate

Definition at line 789 of file KeyAux.h.

Here is the call graph for this function:

SecretStore& KeyCLI::secretStore ( )
inlineprivate

Definition at line 833 of file KeyAux.h.

static void KeyCLI::streamHelp ( ostream &  _out)
inlinestatic

Definition at line 698 of file KeyAux.h.

Here is the caller graph for this function:

Address KeyCLI::userToAddress ( std::string const &  _s)
inlineprivate

Definition at line 806 of file KeyAux.h.

Here is the call graph for this function:

std::string KeyCLI::userVisible ( Address const &  _a) const
inline

Definition at line 322 of file KeyAux.h.

Here is the call graph for this function:

Member Data Documentation

Address KeyCLI::m_address
private

Definition at line 862 of file KeyAux.h.

u256 KeyCLI::m_forceNonce
private

Definition at line 873 of file KeyAux.h.

bool KeyCLI::m_icap = true
private

Definition at line 858 of file KeyAux.h.

strings KeyCLI::m_inputs
private

Importing.

Definition at line 868 of file KeyAux.h.

string KeyCLI::m_kdf = "scrypt"
private

Definition at line 875 of file KeyAux.h.

map<string, string> KeyCLI::m_kdfParams
private

Definition at line 876 of file KeyAux.h.

unique_ptr<KeyManager> KeyCLI::m_keyManager
private

Definition at line 844 of file KeyAux.h.

string KeyCLI::m_lock
private

Definition at line 856 of file KeyAux.h.

string KeyCLI::m_lockHint
private

Definition at line 857 of file KeyAux.h.

string KeyCLI::m_masterPassword
private

Wallet passphrase stuff.

Definition at line 854 of file KeyAux.h.

OperationMode KeyCLI::m_mode
private

Operating mode.

Definition at line 847 of file KeyAux.h.

string KeyCLI::m_name
private

Creating/importing.

Definition at line 861 of file KeyAux.h.

string KeyCLI::m_secretsPath = SecretStore::defaultPath()
private

Wallet stuff.

Definition at line 850 of file KeyAux.h.

unique_ptr<SecretStore> KeyCLI::m_secretStore
private

Where the keys are.

Definition at line 843 of file KeyAux.h.

bool KeyCLI::m_showSecret = false
private

Inspecting.

Definition at line 865 of file KeyAux.h.

string KeyCLI::m_signKey
private

Signing.

Definition at line 871 of file KeyAux.h.

TransactionSkeleton KeyCLI::m_toSign
private

Definition at line 872 of file KeyAux.h.

strings KeyCLI::m_unlocks
private

Definition at line 855 of file KeyAux.h.

string KeyCLI::m_walletPath = KeyManager::defaultPath()
private

Definition at line 851 of file KeyAux.h.


The documentation for this class was generated from the following file: