blockbook 1.1.2

Blockbook library #

pub package

A library for communicating with the Blockbook API. Some calls are missing.

Usage #

A simple usage example:

import 'package:blockbook/blockbook.dart';

main() {
  var client = new Blockbook();
}

Installing #

Add it to your pubspec.yaml:

dependencies:
  bity: any

Licence overview #

All files in this repository fall under the license specified in COPYING. The project is licensed as AGPL with a lesser clause. It may be used within a proprietary project, but the core library and any changes to it must be published online. Source code for this library must always remain free for everybody to access.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.1.2 #

  • Export configured URLs

1.1.1 #

  • Fix websocket call

1.1.0 #

  • Add websocket calls

1.0.0 #

  • Initial version with REST calls

example/blockbook_example.dart

import 'package:blockbook/blockbook.dart';

main(List<String> args) async {
  var client = Blockbook("https://btc1.trezor.io", "wss://btc1.trezor.io/websocket");
  print('status:\n ${await client.status()}');

  Stream txs = client.subscribeAddresses([args[0]]);
  txs = txs.handleError(print);
  await for (var tx in txs) {
    print(tx);
  };
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  blockbook: ^1.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:blockbook/blockbook.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
6
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
92
Overall:
Weighted score of the above. [more]
51
Learn more about scoring.

We analyzed this package on Jul 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, other

Primary library: package:blockbook/blockbook.dart with components: io.

Health suggestions

Fix lib/src/blockbook_base.dart. (-0.50 points)

Analysis of lib/src/blockbook_base.dart reported 1 hint:

line 17 col 23: The value of the field '_sendTransactionPath' isn't used.

Maintenance suggestions

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
http ^0.12.0+2 0.12.0+2
web_socket_channel ^1.0.14 1.0.14
Transitive dependencies
async 2.2.0
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
http_parser 3.1.3
meta 1.1.7
path 1.6.2
source_span 1.5.5
stream_channel 2.0.0
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
mock_web_server
pedantic ^1.7.0 1.8.0+1
test ^1.6.0

Admin