Skip to content

henriquetft/bitcoin-listener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitcoin-listener

A simple and minimalist Bitcoin blockchain listener.

It connects directly to a bitcoin node and listen for events (e.g. new transactions)

This project does not require any external dependencies for connecting to the bitcoin network.

Sample Usage

BitcoinClient c = new BitcoinClient("localhost", 8333, NetworkParameters.TestNet3);
		
c.addTransactionListener(new TransactionListener() {
	@Override
	public void onTransaction(TxMessage tx, BitcoinConnection conn) {
		System.out.println("New Trasaction: " + tx);
	}
});

c.addBlockListener((block, conn) -> {
    System.out.println("New Block: " + block);
});

c.connect();

About

A simple and minimalist Bitcoin blockchain listener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages