mirror of
https://github.com/monero-project/monero.git
synced 2025-05-19 22:30:30 -04:00
Wallet API: Create wallet from keys
This commit is contained in:
parent
4629ead8c5
commit
774a21394a
5 changed files with 178 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue