blockchair 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new67

Blockbook library #

pub package

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

Usage #

A simple usage example:

import 'package:blockchair/blockchair.dart';

main() async {
  var client = new Blockchair('https://api.blockchair.com/bitcoin/', apiKey: 'some key');
  print(await client.stats());
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0.1.1 #

  • Add address calls

0.1.0 #

  • Initial version, created by Stagehand

example/blockchair_example.dart

import 'package:blockchair/blockchair.dart';

// ignore_for_file: avoid_print
main() async {
  var client = Blockchair('https://api.blockchair.com/bitcoin/');
  print(await client.stats());

  print(await client.blocks([1,2]));

  client.close();
}

Use this package as a library

1. Depend on it

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


dependencies:
  blockchair: ^0.1.1

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:blockchair/blockchair.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
67
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
http ^0.12.0 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
pedantic ^1.8.0 1.9.0
test ^1.6.0