I want to programmatically detect whenever someone sends Bitcoin to some address. This happens on a local testnet which I start using this docker-compose.yml file. Once the local testnet runs, I create a new address using Let’s say it returns 2N23tWAFEtBtTgxNjBNmnwzsiPdLcNek181. I put this address into the following Java code: Then I start the Java application with this class. Then
Tag: bitcoinj
Get compressed public key and the bitcoin address using only the private key in BitcoinJ
I already know to get the public key from base58 encoded private key using an ECKey object in BitcoinJ. See the example code. But I still don’t understand to take the compressed private key and the bitcoin address from the “key” object. I tried some with compressPoint() method. But I didn’t succeed. Answer In order to get the compressed public