private BlockHeader parseBlockHeader(CoinType type, JSONObject json) throws JSONException { return new BlockHeader(type, json.getLong("timestamp"), json.getInt("block_height")); }
long timestamp = reply.getLong("timestamp"); int height = reply.getInt("height"); BlockHeader blockheader = new BlockHeader(type, timestamp, height);
@Override public void subscribeToBlockchain(TransactionEventListener<BitTransaction> listener) { listener.onNewBlock(new BlockHeader(coinType, blockTimestamp, blockHeight)); }