public WalletAccount createAccount(CoinType coin, @Nullable KeyParameter key) { return createAccount(coin, false, key); }
@Override protected Void doInBackground(Void... params) { KeyParameter key = null; exception = null; try { if (wallet.isEncrypted() && wallet.getKeyCrypter() != null) { key = wallet.getKeyCrypter().deriveKey(password); } newAccount = wallet.createAccount(type, true, key); if (description != null && !description.trim().isEmpty()) { newAccount.setDescription(description); } wallet.saveNow(); } catch (Exception e) { exception = e; } return null; }
wallet.createAccount(type, false, aesKey);
@Before public void setup() throws MnemonicException, UnreadableWalletException { DeterministicSeed seed = new DeterministicSeed(recoveryPhrase, null, "", 0); DeterministicKey masterKey = HDKeyDerivation.createMasterPrivateKey(seed.getSeedBytes()); hierarchy = new DeterministicHierarchy(masterKey); wallet = new Wallet(recoveryPhrase); nxtAccount = (NxtFamilyWallet)wallet.createAccount(NXT, null); otherAccount = new NxtFamilyWallet(hierarchy.get(NXT.getBip44Path(1), false, true), NXT); }