use of org.bitcoinj.wallet.KeyChainGroup in project bitcoin-wallet by bitcoin-wallet.
the class SweepWalletFragment method askConfirmSweep.
private void askConfirmSweep(final ECKey key) {
// create non-HD wallet
final KeyChainGroup group = new KeyChainGroup(Constants.NETWORK_PARAMETERS);
group.importKeys(key);
walletToSweep = new Wallet(Constants.NETWORK_PARAMETERS, group);
setState(State.CONFIRM_SWEEP);
// delay until fragment is resumed
handler.post(requestWalletBalanceRunnable);
}
use of org.bitcoinj.wallet.KeyChainGroup in project bitcoin-wallet by bitcoin-wallet.
the class WalletUtils method restorePrivateKeysFromBase58.
public static Wallet restorePrivateKeysFromBase58(final InputStream is, final NetworkParameters expectedNetworkParameters) throws IOException {
final BufferedReader keyReader = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
// create non-HD wallet
final KeyChainGroup group = new KeyChainGroup(expectedNetworkParameters);
group.importKeys(WalletUtils.readKeys(keyReader, expectedNetworkParameters));
return new Wallet(expectedNetworkParameters, group);
}
Aggregations