Rust Bitcoin Core ZMQ Subscriber
Usage example
For more examples, have a look in the examples directory.
Features
- Minimal dependencies: the 2 crates
bitcoin
andzmq
, optionally 2 additional crates are needed for the async subscriber,async_zmq
andfutures-util
. - Handles all message types from Bitcoin Core:
hashblock
,hashtx
,block
,tx
andsequence
. - 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 version of the 5 most recent major Bitcoin Core versions, see integration_tests.yml.
Useful resources
TODO:
- This README
- SequenceMessage itest
- Easy addEventListener like functionality with help of the
getzmqnotifications
rpc - raw messages
- zmq publisher
- include source in message