How can I get the raw private key from a WalletFile object?
Here is how I am creating the wallet.
String seed = UUID.randomUUID().toString();
ECKeyPair exKey = Keys.createEcKeyPair();
BigInteger privateKey = exKey.getPrivateKey();
BigInteger publicKey = exKey.getPublicKey();
WalletFile wallet = Wallet.createLight(seed,exKey);
Here is the code where I am sending a transaction,and I need the private key created previously.
Credentials credentials = Credentials.create("MY PRIVATE KEY");
TransactionReceipt transactionReceipt = Transfer.sendFunds(
web3j, credentials, accountTo,
BigDecimal.valueOf(0.5),Convert.Unit.ETHER).sendAsync().get();