separate wallet generation & confirmation

all methods of recovery & creation implemented
This commit is contained in:
m2049r
2017-08-16 21:28:00 +02:00
parent 952fb3a7f1
commit bd598deddd
12 changed files with 747 additions and 182 deletions
@@ -78,6 +78,8 @@ public class WalletManager {
return wallet;
}
private native long createWalletJ(String path, String password, String language, boolean isTestNet);
public Wallet openWallet(String path, String password) {
long walletHandle = openWalletJ(path, password, isTestNet());
Wallet wallet = new Wallet(walletHandle);
@@ -85,6 +87,8 @@ public class WalletManager {
return wallet;
}
private native long openWalletJ(String path, String password, boolean isTestNet);
public Wallet recoveryWallet(String path, String mnemonic) {
Wallet wallet = recoveryWallet(path, mnemonic, 0);
manageWallet(wallet.getName(), wallet);
@@ -98,12 +102,17 @@ public class WalletManager {
return wallet;
}
private native long createWalletJ(String path, String password, String language, boolean isTestNet);
private native long openWalletJ(String path, String password, boolean isTestNet);
private native long recoveryWalletJ(String path, String mnemonic, boolean isTestNet, long restoreHeight);
public Wallet createWalletFromKeys(String path, String language, long restoreHeight,
String addressString, String viewKeyString, String spendKeyString) {
long walletHandle = createWalletFromKeysJ(path, language, isTestNet(), restoreHeight,
addressString, viewKeyString, spendKeyString);
Wallet wallet = new Wallet(walletHandle);
manageWallet(wallet.getName(), wallet);
return wallet;
}
private native long createWalletFromKeysJ(String path, String language,
boolean isTestNet,
long restoreHeight,