Posts

Showing posts with the label How it is possible to wrap with BitcoinJ a Bitcoin Core RPC interface and drives regtest mode

How it is possible to wrap with BitcoinJ a Bitcoin Core RPC interface and drives regtest mode

How it is possible to wrap with BitcoinJ a Bitcoin Core RPC interface and drives regtest mode Despite the fact that I have already create an address in regtest network which has Bitcoins I can not import correctly this address to my BitcoinJ app in order to execute certain functions(OP_CODE tx, send tx.. etc). Is this possible? Here is my code: //create my ECKey DumpedPrivateKey dumpPrKey=new DumpedPrivateKey(params,"My private key"); ECKey ecKey =dumpPrKey.getKey(); wallet.importKey(ecKey); bitcoinAddress = ecKey.toAddress(params).toString(); System.out.println("My bitcoin address is : " +bitcoinAddress); // the regtest address System.out.println("My bitcoin balance is: " +wallet.getBalance()); //the balance In both cases the address is the correct one but: In Regtest network I have x bitcoins In BitcoinJ app I have 0 bitcoins http://ift.tt/2k6hHhn