Skip to content

A Dart client for communicating with the Blockcypher.com API

License

Notifications You must be signed in to change notification settings

haarts/blockcypher_client

Repository files navigation

Blockcypher library

pub package CircleCI

A library for communicating with the Blockcypher API. Only some websocket calls are implemented.

Examples

Listen for all new blocks:

  var client =
      Client(websocketUrl :"wss://socket.blockcypher.com/v1/btc/main", token: "YOUR-TOKEN");

  Stream<String> blocks = await client.newBlocks();
  await for (String block in blocks) {
    print("new block: $block");
  }

For more examples see the example directory.

Please note that the library treats the token argument as optional. This should work but experience has shown that the Blockcypher API does not always handle this particularly well. If you run into weird issues please use a valid token. Especially with the websocket stuff.

Installing

Add it to your pubspec.yaml:

dependencies:
  blockcypher: 0.3.0

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.

About

A Dart client for communicating with the Blockcypher.com API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages