MCPcopy Create free account
hub / github.com/bcndev/bytecoin / import_view_key

Method import_view_key

src/Core/WalletHDsqlite.cpp:436–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436void WalletHDsqlite::import_view_key() {
437 if (!m_hw || m_view_secret_key != SecretKey{})
438 return;
439 SecretKey audit_key_base_secret_key;
440 Hash view_seed;
441 Signature view_secrets_signature;
442 m_hw->export_view_only(&audit_key_base_secret_key, &m_view_secret_key, &view_seed, &view_secrets_signature);
443 // We do not store other secrets and will continue using hardware wallet for them
444 invariant(secret_key_to_public_key(m_view_secret_key, &m_view_public_key), "");
445
446 put("view_key", m_view_secret_key.as_binary_array(), true);
447 commit();
448}
449
450std::string WalletHDsqlite::export_keys() const {
451 std::string mnemonic;

Callers

nothing calls this directly

Calls 4

secret_key_to_public_keyFunction · 0.85
putFunction · 0.85
export_view_onlyMethod · 0.45
as_binary_arrayMethod · 0.45

Tested by

no test coverage detected