mirror of
https://github.com/monero-project/monero.git
synced 2025-12-22 23:26:44 -08:00
Wallet API: Create wallet from keys
This commit is contained in:
@@ -72,6 +72,22 @@ Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::st
|
||||
return wallet;
|
||||
}
|
||||
|
||||
Wallet *WalletManagerImpl::createWalletFromKeys(const std::string &path,
|
||||
const std::string &language,
|
||||
bool testnet,
|
||||
uint64_t restoreHeight,
|
||||
const std::string &addressString,
|
||||
const std::string &viewKeyString,
|
||||
const std::string &spendKeyString)
|
||||
{
|
||||
WalletImpl * wallet = new WalletImpl(testnet);
|
||||
if(restoreHeight > 0){
|
||||
wallet->setRefreshFromBlockHeight(restoreHeight);
|
||||
}
|
||||
wallet->recoverFromKeys(path, language, addressString, viewKeyString, spendKeyString);
|
||||
return wallet;
|
||||
}
|
||||
|
||||
bool WalletManagerImpl::closeWallet(Wallet *wallet)
|
||||
{
|
||||
WalletImpl * wallet_ = dynamic_cast<WalletImpl*>(wallet);
|
||||
|
||||
Reference in New Issue
Block a user