MCPcopy Create free account
hub / github.com/LUX-Core/lux / import

Method import

src/cpp-ethereum/libethcore/KeyManager.cpp:213–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213h128 KeyManager::import(Secret const& _s, string const& _accountName, string const& _pass, string const& _passwordHint)
214{
215 Address addr = KeyPair(_s).address();
216 auto passHash = hashPassword(_pass);
217 cachePassword(_pass);
218 m_passwordHint[passHash] = _passwordHint;
219 auto uuid = m_store.importSecret(_s.asBytesSec(), _pass);
220 m_keyInfo[addr] = KeyInfo{passHash, _accountName, ""};
221 m_addrLookup[addr] = uuid;
222 m_uuidLookup[uuid] = addr;
223 write(m_keysFile);
224 return uuid;
225}
226
227Secret KeyManager::brain(string const& _seed)
228{

Callers 6

executeMethod · 0.45
importPresaleFunction · 0.45
main.cppFile · 0.45
personal_newAccountMethod · 0.45
admin_eth_newAccountMethod · 0.45
executeMethod · 0.45

Calls 4

importSecretMethod · 0.80
asBytesSecMethod · 0.80
KeyPairClass · 0.50
addressMethod · 0.45

Tested by

no test coverage detected