Rust Bitcoin Core ZMQ Subscriber
Usage example
For more examples, have a look in the examples directory.
Features
- Minimal dependencies: the 2 crates
bitcoinandzmq, optionally 2 additional crates are needed for the async subscriber,async_zmqandfutures-util. - Handles all message types from Bitcoin Core:
hashblock,hashtx,block,txandsequence. - Flexible: choose between blocking functions with a callback, reading from a Receiver or reading from an asynchronous Stream without locking to a specific async runtime.
Testing
Tests run on every push and pull request. Integration tests use the latest minor version of the 5 most recent major Bitcoin Core versions, see integration_tests.yml for the version numbers.
Useful resources
TODO:
- This README
- SequenceMessage itest
- Easy addEventListener like functionality with help of the
getzmqnotificationsrpc - raw messages
- zmq publisher
- include source in message