cruzawl 1.0.9+9

  • Readme
  • Changelog
  • Example
  • Installing
  • 62

cruzawl pub package Build Status Coverage Status documentation

Dart package for CRUZ cryptocurrency wallet cruzall and block explorer cruzweb. See the documentation.

Build #

Follow the same procedure as the continuous integration

Project Map #

License #

cruzawl is released under the terms of the MIT license. See LICENSE for more information or see https://opensource.org/licenses/MIT.

Discussion #

  • Discord server for general chat as well as updates, including development status.

Donations #

Right on! RWEgB+NQs/T83EkmIFNVJG+xK64Hm90GmQgrdR2V7BI=

1.0.0+0 #

  • Initial release.

1.0.1+1 #

  • pub.dev Health suggestions.

1.0.2+2 #

  • Add ExchangeRates and HttpRequest.
  • Upgrade sembast to ^2.0.1

1.0.3+3 #

  • Add [CruzTransaction.computeHashListRoot]

1.0.4+4 #

  • Add [FileSystem] interface
  • Remove dart:io import

1.0.5+5 #

  • Update tweetnacl.

1.0.6+6 #

  • Add TestWebSocket
  • Add TestHttpClient

1.0.7+7 #

  • pub.dev Health suggestions.

1.0.8+8 #

  • Add Contacts.
  • PreferenceLocalStorage.

1.0.9+9 #

  • Add test suite.

example/example.dart

// Copyright 2019 cruzawl developers
// Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:cruzawl/currency.dart';
import 'package:cruzawl/network.dart';
import 'package:cruzawl/preferences.dart';

// bash-3.2$ dart example.dart
// *** Latest Block ***
// Height: 19527
void main() {
  PeerNetwork network = cruz.createNetwork();

  /// Print the latest [BlockHeader] in the block chain.
  network.tipChanged = () {
    print('*** Latest Block ***');
    print('Height: ${network.tipHeight}');
    exit(0);
  };

  /// Connect [PeerNetwork] to public seeder.
  network
      .addPeer(network.createPeerWithSpec(
          PeerPreference('SatoshiLocomoco', 'wallet.cruzbit.xyz', 'CRUZ', '',
              debugPrint: (x) {/* print('DEBUG: $x'); */})))
      .connect();
}

Use this package as a library

1. Depend on it

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


dependencies:
  cruzawl: ^1.0.9+9

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:cruzawl/cruz.dart';
import 'package:cruzawl/cruz.g.dart';
import 'package:cruzawl/currency.dart';
import 'package:cruzawl/exchange.dart';
import 'package:cruzawl/http.dart';
import 'package:cruzawl/http_html.dart';
import 'package:cruzawl/http_io.dart';
import 'package:cruzawl/network.dart';
import 'package:cruzawl/preferences.dart';
import 'package:cruzawl/preferences.g.dart';
import 'package:cruzawl/sembast.dart';
import 'package:cruzawl/sha3.dart';
import 'package:cruzawl/storage_html.dart';
import 'package:cruzawl/test.dart';
import 'package:cruzawl/util.dart';
import 'package:cruzawl/wallet.dart';
import 'package:cruzawl/wallet.g.dart';
import 'package:cruzawl/websocket.dart';
import 'package:cruzawl/websocket_html.dart';
import 'package:cruzawl/websocket_io.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
23
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]
62
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: web

Platform components identified in package: html, io.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
bip39 ^1.0.3 1.0.3
collection ^1.14.11 1.14.12
convert ^2.1.1 2.1.1
ed25519_hd_key ^1.0.1 1.0.1
fixnum ^0.10.9 0.10.9
json_annotation ^3.0.0 3.0.0
meta ^1.1.6 1.1.7
pedantic ^1.8.0 1.8.0+1
pointycastle ^1.0.1 1.0.1
sembast ^2.0.1 2.1.0
tweetnacl ^0.3.2 0.3.2
Transitive dependencies
charcode 1.1.2
crypto 2.1.3
hex 0.1.2
path 1.6.4
synchronized 2.1.0+1
typed_data 1.1.6
Dev dependencies
build_runner ^1.4.0
json_serializable ^3.2.0
test ^1.6.5