November 2018
Intermediate to advanced
528 pages
13h 21m
English
In the first line of our code, we activate BitcoinJ's logging using a Java logging formatter that writes more compact output than the default:
BriefLogFormatter.init();
Then we indicate which bitcoin network we want to use. In this scenario, we choose testnet, as our Node.js server is already running on the testnet network by default:
final static NetworkParameters params = TestNet3Params.get();
The other available options are MainNetParams and RegTestParams.
Next, we start by initializing (inside the main function) a WalletAppKit object, to create a lightweight SPV (short for Simplified Payment Verification) BitcoinJ wallet. As mentioned in the BitcoinJ documentation, the WalletAppKit class wraps the boilerplate ...
Read now
Unlock full access