public static String generateWalletFile( String password, ECKeyPair ecKeyPair, File destinationDirectory, boolean useFullScrypt) throws CipherException, IOException { WalletFile walletFile; if (useFullScrypt) { walletFile = Wallet.createStandard(password, ecKeyPair); } else { walletFile = Wallet.createLight(password, ecKeyPair); } String fileName = getWalletFileName(walletFile); File destination = new File(destinationDirectory, fileName); objectMapper.writeValue(destination, walletFile); return fileName; }