Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haarts/blockchain_monitor
A library to monitor certain Bitcoin blockchain events with multiple redundancies
https://github.com/haarts/blockchain_monitor
Last synced: 9 days ago
JSON representation
A library to monitor certain Bitcoin blockchain events with multiple redundancies
- Host: GitHub
- URL: https://github.com/haarts/blockchain_monitor
- Owner: haarts
- License: mit
- Created: 2020-01-02T16:18:37.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-30T10:44:12.000Z (over 4 years ago)
- Last Synced: 2024-03-20T13:21:00.407Z (8 months ago)
- Language: Dart
- Homepage:
- Size: 168 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
Awesome Lists containing this project
README
# A high level blockchain monitoring library.
[![pub package](https://img.shields.io/pub/v/blockchain_monitor.svg)](https://pub.dartlang.org/packages/blockchain_monitor)
[![GH Actions](https://github.com/inapay/blockchain_monitor/workflows/dart/badge.svg)](https://github.com/inapay/blockchain_monitor/actions)This library allows you to monitor blockchain events:
- new block
- new transaction for a particular address
- new confirmation for a particular transactionIt does so by using 4 different public API's:
- Blockbook (https://wiki.trezor.io/Blockbook)
- Blockcypher (https://www.blockcypher.com/dev/bitcoin/#introduction)
- Blockchain.info (https://www.blockchain.com/api)
- Blockchair (https://blockchair.com/api)It uses 4 different API's for redundancy reasons. All events are normalized and de-duplicated.
Please note that this library does not contain any querying capabilities. Use the individual clients for that instead.
## Usage
A simple usage example:
```dart
import 'package:blockchain_monitor/blockchain_monitor.dart';main() async {
var monitor = new Monitor();
Stream txs = monitor.address('some Bitcoin address');
await for (tx in txs) {
print(tx);
}
Stream confirmations = monitor.confirmations('some tx hash');
await for (confirmation in confirmations) {
print(confirmation);
}
Stream blocks = monitor.blocks();
await for (block in blocks) {
print(block);
}
}
```## Features and bugs
Please file feature requests and bugs at the [issue tracker][tracker].
[tracker]: http://github.com/inapay/blockchain_monitor/issues